File? pon_vcf | 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 "" | String pon_command = if set_pon then "--pon /cromwell_root/tmp/PON/$(basename ${pon_vcf}) --cosmic /cromwell_root/tmp/PON/${cosmic_vcf}" else "" | ||||
String input_command = if defined(corealigner_bam) then "-i ${corealigner_bam} --tumor_sample ${tumor_name} --normal_sample ${normal_name}" else "-i ${tumor_recaled_bam} --tumor_sample ${tumor_name}" | |||||
command <<< | command <<< | ||||
set -o pipefail | set -o pipefail | ||||
set -e | set -e | ||||
cp ${pon_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/${cosmic_vcf} | ||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex /cromwell_root/tmp/PON/$(basename ${pon_vcf}) | ${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex /cromwell_root/tmp/PON/$(basename ${pon_vcf}) | ||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt -r ${ref_dir}/${fasta} --algo TNscope ${input_command} --dbsnp ${dbsnp_dir}/${dbsnp} ${pon_command} ${sample}.TNscope.TN.vcf | |||||
if ${corealigner_bam}; then | |||||
${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 | |||||
else | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt -r ${ref_dir}/${fasta} -i ${tumor_recaled_bam} --algo TNscope --tumor_sample ${tumor_name} --dbsnp ${dbsnp_dir}/${dbsnp} ${pon_command} ${sample}.TNscope.TN.vcf | |||||
fi | |||||
>>> | >>> | ||||
File? pon_vcf | 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 "" | String pon_command = if set_pon then "--pon /cromwell_root/tmp/PON/$(basename ${pon_vcf}) --cosmic /cromwell_root/tmp/PON/${cosmic_vcf}" else "" | ||||
String input_command = if defined(corealigner_bam) then "-i ${corealigner_bam} --tumor_sample ${tumor_name} --normal_sample ${normal_name}" else "-i ${tumor_recaled_bam} --tumor_sample ${tumor_name}" | |||||
command <<< | command <<< | ||||
set -o pipefail | set -o pipefail | ||||
set -e | set -e | ||||
cp ${pon_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/${cosmic_vcf} | ||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex /cromwell_root/tmp/PON/$(basename ${pon_vcf}) | ${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex /cromwell_root/tmp/PON/$(basename ${pon_vcf}) | ||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt -r ${ref_dir}/${fasta} --algo TNhaplotyper ${input_command} --dbsnp ${dbsnp_dir}/${dbsnp} ${pon_command} ${sample}.TNseq.TN.vcf | |||||
if ${corealigner_bam}; then | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt -r ${ref_dir}/${fasta} -i ${corealigner_bam} --algo TNhaplotyper --tumor_sample ${tumor_name} --normal_sample ${normal_name} --dbsnp ${dbsnp_dir}/${dbsnp} ${pon_command} ${sample}.TNseq.TN.vcf | |||||
else | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt -r ${ref_dir}/${fasta} -i ${tumor_recaled_bam} --algo TNhaplotyper --tumor_sample ${tumor_name} --dbsnp ${dbsnp_dir}/${dbsnp} ${pon_command} ${sample}.TNseq.TN.vcf | |||||
fi | |||||
>>> | >>> | ||||
runtime { | runtime { |
set -o pipefail | set -o pipefail | ||||
set -e | set -e | ||||
if [ ${set_pon} ]; then | |||||
if ${set_pon} ; then | |||||
mkdir -p /cromwell_root/tmp/bcftools/ | mkdir -p /cromwell_root/tmp/bcftools/ | ||||
for i in ${sep=" " pon_vcf} | for i in ${sep=" " pon_vcf} | ||||
do | do |
File? normal_recaled_bam | File? normal_recaled_bam | ||||
File? normal_recaled_bam_index | File? normal_recaled_bam_index | ||||
String type | String type | ||||
String SENTIEON_INSTALL_DIR | String SENTIEON_INSTALL_DIR | ||||
String SENTIEON_LICENSE | String SENTIEON_LICENSE | ||||
String sentieon_docker | String sentieon_docker | ||||
} | } | ||||
} | } | ||||
call TNseq.TNseq as TNseq { | |||||
input: | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
SENTIEON_LICENSE=SENTIEON_LICENSE, | |||||
fasta=fasta, | |||||
ref_dir=ref_dir, | |||||
corealigner_bam=corealigner.corealigner_bam, | |||||
corealigner_bam_index=corealigner.corealigner_bam_index, | |||||
tumor_recaled_bam=BQSR.recaled_bam, | |||||
tumor_recaled_bam_index=BQSR.recaled_bam_index, | |||||
dbsnp=dbsnp, | |||||
dbsnp_dir=dbsnp_dir, | |||||
set_pon=set_pon, | |||||
pon_vcf=pon_vcf, | |||||
cosmic_vcf=cosmic_vcf, | |||||
cosmic_dir=cosmic_dir, | |||||
tumor_name=sample + "_tumor", | |||||
normal_name=sample + "_normal", | |||||
docker=sentieon_docker, | |||||
sample=sample, | |||||
disk_size=disk_size, | |||||
cluster_config=cluster_config | |||||
} | |||||
call TNscope.TNscope as TNscope { | |||||
input: | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
SENTIEON_LICENSE=SENTIEON_LICENSE, | |||||
fasta=fasta, | |||||
ref_dir=ref_dir, | |||||
corealigner_bam=corealigner.corealigner_bam, | |||||
corealigner_bam_index=corealigner.corealigner_bam_index, | |||||
tumor_recaled_bam=BQSR.recaled_bam, | |||||
tumor_recaled_bam_index=BQSR.recaled_bam_index, | |||||
dbsnp=dbsnp, | |||||
dbsnp_dir=dbsnp_dir, | |||||
set_pon=set_pon, | |||||
pon_vcf=pon_vcf, | |||||
cosmic_vcf=cosmic_vcf, | |||||
cosmic_dir=cosmic_dir, | |||||
tumor_name=sample + "_tumor", | |||||
normal_name=sample + "_normal", | |||||
docker=sentieon_docker, | |||||
sample=sample, | |||||
disk_size=disk_size, | |||||
cluster_config=cluster_config | |||||
if (type == "tumor") { | |||||
call TNseq.TNseq as TNseq { | |||||
input: | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
SENTIEON_LICENSE=SENTIEON_LICENSE, | |||||
fasta=fasta, | |||||
ref_dir=ref_dir, | |||||
corealigner_bam=corealigner.corealigner_bam, | |||||
corealigner_bam_index=corealigner.corealigner_bam_index, | |||||
tumor_recaled_bam=BQSR.recaled_bam, | |||||
tumor_recaled_bam_index=BQSR.recaled_bam_index, | |||||
dbsnp=dbsnp, | |||||
dbsnp_dir=dbsnp_dir, | |||||
set_pon=set_pon, | |||||
pon_vcf=pon_vcf, | |||||
cosmic_vcf=cosmic_vcf, | |||||
cosmic_dir=cosmic_dir, | |||||
tumor_name=sample + "_tumor", | |||||
normal_name=sample + "_normal", | |||||
docker=sentieon_docker, | |||||
sample=sample, | |||||
disk_size=disk_size, | |||||
cluster_config=cluster_config | |||||
} | |||||
call TNscope.TNscope as TNscope { | |||||
input: | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
SENTIEON_LICENSE=SENTIEON_LICENSE, | |||||
fasta=fasta, | |||||
ref_dir=ref_dir, | |||||
corealigner_bam=corealigner.corealigner_bam, | |||||
corealigner_bam_index=corealigner.corealigner_bam_index, | |||||
tumor_recaled_bam=BQSR.recaled_bam, | |||||
tumor_recaled_bam_index=BQSR.recaled_bam_index, | |||||
dbsnp=dbsnp, | |||||
dbsnp_dir=dbsnp_dir, | |||||
set_pon=set_pon, | |||||
pon_vcf=pon_vcf, | |||||
cosmic_vcf=cosmic_vcf, | |||||
cosmic_dir=cosmic_dir, | |||||
tumor_name=sample + "_tumor", | |||||
normal_name=sample + "_normal", | |||||
docker=sentieon_docker, | |||||
sample=sample, | |||||
disk_size=disk_size, | |||||
cluster_config=cluster_config | |||||
} | |||||
} | } | ||||
if (set_annovar && defined(TNscope.TNscope_vcf) && defined(TNseq.TNseq_vcf)){ | if (set_annovar && defined(TNscope.TNscope_vcf) && defined(TNseq.TNseq_vcf)){ | ||||
call annovar.annovar as annovar { | |||||
input: | |||||
docker=annovar_docker, | |||||
database=database, | |||||
tnscope_vcf_file=TNscope.TNscope_vcf, | |||||
tnseq_vcf_file=TNseq.TNseq_vcf, | |||||
sample=sample, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call annovar.annovar as annovar { | |||||
input: | |||||
docker=annovar_docker, | |||||
database=database, | |||||
tnscope_vcf_file=TNscope.TNscope_vcf, | |||||
tnseq_vcf_file=TNseq.TNseq_vcf, | |||||
sample=sample, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
if (set_vcf2maf){ | |||||
call vcf2maf.vcf2maf as vcf2maf { | |||||
input: | |||||
docker=vcf2maf_r_docker, | |||||
multianno_tnscope_txt=annovar.multianno_tnscope_txt, | |||||
multianno_tnseq_txt=annovar.multianno_tnseq_txt, | |||||
sample=sample, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
if (set_vcf2maf){ | |||||
call vcf2maf.vcf2maf as vcf2maf { | |||||
input: | |||||
docker=vcf2maf_r_docker, | |||||
multianno_tnscope_txt=annovar.multianno_tnscope_txt, | |||||
multianno_tnseq_txt=annovar.multianno_tnseq_txt, | |||||
sample=sample, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
} | } | ||||
} | |||||
} | |||||
} | } |