task TNscope { | task TNscope { | ||||
File ref_dir | |||||
File dbsnp_dir | |||||
File? regions | |||||
String sample | |||||
String SENTIEON_INSTALL_DIR | |||||
String SENTIEON_LICENSE | |||||
String tumor_name | |||||
String normal_name | |||||
String docker | |||||
String cluster_config | |||||
String fasta | |||||
File corealigner_bam | |||||
File corealigner_bam_index | |||||
String dbsnp | |||||
String disk_size | |||||
Boolean set_pon | |||||
String? cosmic_vcf | |||||
File? cosmic_dir | |||||
File? pon_vcf | |||||
String pon_command = if set_pon then "--pon /cromwell_root/tmp/PON/$(basename ${pon_vcf}) --cosmic /cromwell_root/tmp/PON/${cosmic_vcf}" else "" | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
export SENTIEON_LICENSE=${SENTIEON_LICENSE} | |||||
nt=$(nproc) | |||||
if ${set_pon}; then | |||||
mkdir -p /cromwell_root/tmp/PON/ | |||||
cp ${cosmic_dir}/${cosmic_vcf} /cromwell_root/tmp/PON/ | |||||
cp ${pon_vcf} /cromwell_root/tmp/PON/ | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex /cromwell_root/tmp/PON/${cosmic_vcf} | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex /cromwell_root/tmp/PON/$(basename ${pon_vcf}) | |||||
fi | |||||
if [ ${regions} != "" ]; then | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt --interval ${regions} -r ${ref_dir}/${fasta} -i ${corealigner_bam} --algo TNscope --tumor_sample ${tumor_name} --normal_sample ${normal_name} --dbsnp ${dbsnp_dir}/${dbsnp} ${pon_command} ${sample}.TNscope.TN.vcf | |||||
else | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt -r ${ref_dir}/${fasta} -i ${corealigner_bam} --algo TNscope --tumor_sample ${tumor_name} --normal_sample ${normal_name} --dbsnp ${dbsnp_dir}/${dbsnp} ${pon_command} ${sample}.TNscope.TN.vcf | |||||
fi | |||||
>>> | |||||
runtime { | |||||
docker: docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File TNscope_vcf= "${sample}.TNscope.TN.vcf" | |||||
File TNscope_vcf_index = "${sample}.TNscope.TN.vcf.idx" | |||||
} | |||||
String sample | |||||
String SENTIEON_INSTALL_DIR | |||||
String SENTIEON_LICENSE | |||||
File tumor_recaled_bam | |||||
File tumor_recaled_bam_index | |||||
File tumor_recal_table | |||||
File normal_recaled_bam | |||||
File normal_recaled_bam_index | |||||
File normal_recal_table | |||||
String tumor_name | |||||
String normal_name | |||||
File ref_dir | |||||
String fasta | |||||
File dbsnp_dir | |||||
String dbsnp | |||||
File? regions | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
Boolean set_pon | |||||
File? pon_vcf | |||||
String pon_command = if set_pon then "--pon /cromwell_root/tmp/PON/$(basename ${pon_vcf})" else "" | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
export SENTIEON_LICENSE=${SENTIEON_LICENSE} | |||||
nt=$(nproc) | |||||
if ${set_pon}; then | |||||
mkdir -p /cromwell_root/tmp/PON/ | |||||
cp ${pon_vcf} /cromwell_root/tmp/PON/ | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex /cromwell_root/tmp/PON/$(basename ${pon_vcf}) | |||||
fi | |||||
if [ ${regions} != "" ]; then | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt \ | |||||
--interval ${regions} -r ${ref_dir}/${fasta} \ | |||||
-i ${tumor_recaled_bam} -q ${tumor_recal_table} \ | |||||
-i ${normal_recaled_bam} -q ${normal_recal_table} \ | |||||
--algo TNscope \ | |||||
--tumor_sample ${tumor_name} --normal_sample ${normal_name} \ | |||||
--dbsnp ${dbsnp_dir}/${dbsnp} \ | |||||
${pon_command} \ | |||||
${sample}.TNscope.TN.vcf | |||||
else | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt \ | |||||
-r ${ref_dir}/${fasta} \ | |||||
-i ${tumor_recaled_bam} -q ${tumor_recal_table} \ | |||||
-i ${normal_recaled_bam} -q ${normal_recal_table} \ | |||||
--algo TNscope \ | |||||
--tumor_sample ${tumor_name} --normal_sample ${normal_name} \ | |||||
--dbsnp ${dbsnp_dir}/${dbsnp} \ | |||||
${pon_command} \ | |||||
${sample}.TNscope.TN.vcf | |||||
fi | |||||
>>> | |||||
runtime { | |||||
docker: docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File TNscope_vcf= "${sample}.TNscope.TN.vcf" | |||||
File TNscope_vcf_index = "${sample}.TNscope.TN.vcf.idx" | |||||
} | |||||
} | } |
File normal_recaled_bam | File normal_recaled_bam | ||||
File normal_recaled_bam_index | File normal_recaled_bam_index | ||||
File normal_recal_table | File normal_recal_table | ||||
File TNhaplotyper2_PoN | |||||
File TNseq_PoN | |||||
String dbsnp | String dbsnp | ||||
String disk_size | String disk_size | ||||
File regions | File regions | ||||
export SENTIEON_LICENSE=${SENTIEON_LICENSE} | export SENTIEON_LICENSE=${SENTIEON_LICENSE} | ||||
nt=$(nproc) | nt=$(nproc) | ||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt --interval ${regions} -r ${ref_dir}/${fasta} -i ${corealigner_bam} --algo TNhaplotyper2 --tumor_sample ${tumor_name} --normal_sample ${normal_name} --dbsnp ${dbsnp_dir}/${dbsnp} ${sample}.TNhaplotyper2.TN.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt --interval ${regions} -r ${ref_dir}/${fasta} -i ${corealigner_bam} --algo TNhaplotyper2 --tumor_sample ${tumor_name} --normal_sample ${normal_name} --dbsnp ${dbsnp_dir}/${dbsnp} ${sample}.TNseq.TN.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt --interval ${regions} -r ${ref_dir}/${fasta} \ | ${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt --interval ${regions} -r ${ref_dir}/${fasta} \ | ||||
-i ${tumor_recaled_bam} -q ${tumor_recal_table} \ | -i ${tumor_recaled_bam} -q ${tumor_recal_table} \ | ||||
-i ${normal_recaled_bam} -q ${normal_recal_table} \ | -i ${normal_recaled_bam} -q ${normal_recal_table} \ | ||||
--algo TNhaplotyper2 --tumor_sample ${tumor_name} \ | |||||
--algo TNseq --tumor_sample ${tumor_name} \ | |||||
--normal_sample ${normal_name} \ | --normal_sample ${normal_name} \ | ||||
--germline_vcf ${germline_resource} \ | --germline_vcf ${germline_resource} \ | ||||
--pon ${TNhaplotyper2_PoN} \ | |||||
${sample}.TNhaplotyper2.TN.tmp.vcf \ | |||||
--pon ${TNseq_PoN} \ | |||||
${sample}.TNseq.TN.tmp.vcf \ | |||||
--algo OrientationBias --tumor_sample ${tumor_name} \ | --algo OrientationBias --tumor_sample ${tumor_name} \ | ||||
ORIENTATION_DATA \ | ORIENTATION_DATA \ | ||||
--algo ContaminationModel --tumor_sample ${tumor_name} \ | --algo ContaminationModel --tumor_sample ${tumor_name} \ | ||||
sentieon driver -r REFERENCE \ | sentieon driver -r REFERENCE \ | ||||
--algo TNfilter --tumor_sample ${tumor_name} \ | --algo TNfilter --tumor_sample ${tumor_name} \ | ||||
--normal_sample ${normal_name} \ | --normal_sample ${normal_name} \ | ||||
-v ${sample}.TNhaplotyper2.TN.tmp.vcf \ | |||||
-v ${sample}.TNseq.TN.tmp.vcf \ | |||||
--contamination CONTAMINATION_DATA \ | --contamination CONTAMINATION_DATA \ | ||||
--tumor_segments CONTAMINATION_DATA.segments \ | --tumor_segments CONTAMINATION_DATA.segments \ | ||||
--orientation_priors ORIENTATION_DATA \ | --orientation_priors ORIENTATION_DATA \ | ||||
${sample}.TNhaplotyper2.TN.vcf | |||||
${sample}.TNseq.TN.vcf | |||||
>>> | >>> | ||||
runtime { | runtime { | ||||
} | } | ||||
output { | output { | ||||
File TNhaplotyper2_vcf= "${sample}.TNhaplotyper2.TN.vcf" | |||||
File TNhaplotyper2_vcf_index = "${sample}.TNhaplotyper2.TN.vcf.idx" | |||||
File TNseq_vcf= "${sample}.TNseq.TN.vcf" | |||||
File TNseq_vcf_index = "${sample}.TNseq.TN.vcf.idx" | |||||
} | } | ||||
} | } |
input: | input: | ||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | ||||
SENTIEON_LICENSE=SENTIEON_LICENSE, | SENTIEON_LICENSE=SENTIEON_LICENSE, | ||||
fasta=fasta, | |||||
ref_dir=ref_dir, | |||||
regions=regions, | |||||
sample=sample_id, | |||||
normal_recaled_bam=normal_BQSR.recaled_bam, | normal_recaled_bam=normal_BQSR.recaled_bam, | ||||
normal_recaled_bam_index=normal_BQSR.recaled_bam_index, | normal_recaled_bam_index=normal_BQSR.recaled_bam_index, | ||||
normal_recal_table=normal_BQSR.recal_table, | normal_recal_table=normal_BQSR.recal_table, | ||||
tumor_recaled_bam=tumor_BQSR.recaled_bam, | tumor_recaled_bam=tumor_BQSR.recaled_bam, | ||||
tumor_recaled_bam_index=tumor_BQSR.recaled_bam_index, | tumor_recaled_bam_index=tumor_BQSR.recaled_bam_index, | ||||
tumor_recal_table=tumor_BQSR.recal_table, | tumor_recal_table=tumor_BQSR.recal_table, | ||||
normal_name=sample_id + "_normal", | |||||
tumor_name=sample_id + "_tumor", | |||||
fasta=fasta, | |||||
ref_dir=ref_dir, | |||||
regions=regions, | |||||
dbsnp=dbsnp, | dbsnp=dbsnp, | ||||
dbsnp_dir=dbsnp_dir, | dbsnp_dir=dbsnp_dir, | ||||
set_pon=set_pon, | set_pon=set_pon, | ||||
pon_vcf=pon_vcf, | pon_vcf=pon_vcf, | ||||
cosmic_vcf=cosmic_vcf, | |||||
cosmic_dir=cosmic_dir, | |||||
tumor_name=sample_id + "_tumor", | |||||
normal_name=sample_id + "_normal", | |||||
docker=sentieon_docker, | docker=sentieon_docker, | ||||
sample=sample_id, | |||||
disk_size=disk_size, | |||||
cluster_config=cluster_config | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | } | ||||
call annovar.annovar as TNseq_annovar { | call annovar.annovar as TNseq_annovar { |