${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt --algo QualCal --plot --before ${sample}_recal_data.table --after ${sample}_recal_data.table.post ${sample}_recal_data.csv | ${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt --algo QualCal --plot --before ${sample}_recal_data.table --after ${sample}_recal_data.table.post ${sample}_recal_data.csv | ||||
${SENTIEON_INSTALL_DIR}/bin/sentieon plot bqsr -o ${sample}_bqsrreport.pdf ${sample}_recal_data.csv | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon plot QualCal -o ${sample}_bqsrreport.pdf ${sample}_recal_data.csv | |||||
>>> | >>> | ||||
String SENTIEON_INSTALL_DIR | String SENTIEON_INSTALL_DIR | ||||
String SENTIEON_LICENSE | String SENTIEON_LICENSE | ||||
String sample | String sample | ||||
Boolean PONmode | |||||
File ref_dir | File ref_dir | ||||
String fasta | String fasta | ||||
set -e | set -e | ||||
export SENTIEON_LICENSE=${SENTIEON_LICENSE} | export SENTIEON_LICENSE=${SENTIEON_LICENSE} | ||||
nt=$(nproc) | nt=$(nproc) | ||||
mkdir -p /cromwell_root/tmp/cosmic/ | |||||
cp ${cosmic_dir}/${cosmic_vcf} /cromwell_root/tmp/cosmic/ | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex /cromwell_root/tmp/cosmic/${cosmic_vcf} | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt -r ${ref_dir}/${fasta} -i ${normal_recaled_bam} --algo TNhaplotyper --detect_pon --cosmic /cromwell_root/tmp/cosmic/${cosmic_vcf} --dbsnp ${dbsnp_dir}/${dbsnp} ${sample}_pon.vcf | |||||
if [ ${PONmode} ]; then | |||||
mkdir -p /cromwell_root/tmp/cosmic/ | |||||
cp ${cosmic_dir}/${cosmic_vcf} /cromwell_root/tmp/cosmic/ | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex /cromwell_root/tmp/cosmic/${cosmic_vcf} | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt -r ${ref_dir}/${fasta} -i ${normal_recaled_bam} --algo TNhaplotyper --detect_pon --cosmic /cromwell_root/tmp/cosmic/${cosmic_vcf} --dbsnp ${dbsnp_dir}/${dbsnp} ${sample}_pon.vcf | |||||
else | |||||
touch ${sample}_pon.vcf | |||||
fi | |||||
>>> | >>> | ||||
runtime { | runtime { |
cluster_config=cluster_config | cluster_config=cluster_config | ||||
} | } | ||||
if (PONmode) { | |||||
call PON.PON as PON { | |||||
input: | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
SENTIEON_LICENSE=SENTIEON_LICENSE, | |||||
sample=sample[0], | |||||
fasta=fasta, | |||||
ref_dir=ref_dir, | |||||
normal_recaled_bam=normal_BQSR.recaled_bam, | |||||
normal_recaled_bam_index=normal_BQSR.recaled_bam_index, | |||||
cosmic_vcf=cosmic_vcf, | |||||
cosmic_dir=cosmic_dir, | |||||
dbsnp=dbsnp, | |||||
dbsnp_dir=dbsnp_dir, | |||||
docker=sentieon_docker, | |||||
disk_size=disk_size, | |||||
cluster_config=cluster_config | |||||
} | |||||
call PON.PON as PON { | |||||
input: | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
SENTIEON_LICENSE=SENTIEON_LICENSE, | |||||
sample=sample[0], | |||||
PONmode=PONmode, | |||||
fasta=fasta, | |||||
ref_dir=ref_dir, | |||||
normal_recaled_bam=normal_BQSR.recaled_bam, | |||||
normal_recaled_bam_index=normal_BQSR.recaled_bam_index, | |||||
cosmic_vcf=cosmic_vcf, | |||||
cosmic_dir=cosmic_dir, | |||||
dbsnp=dbsnp, | |||||
dbsnp_dir=dbsnp_dir, | |||||
docker=sentieon_docker, | |||||
disk_size=disk_size, | |||||
cluster_config=cluster_config | |||||
} | } | ||||
File pon_vcf=PON.pon_vcf | |||||
} | } | ||||
call bcftools.bcftools as bcftools { | call bcftools.bcftools as bcftools { | ||||
input: | input: | ||||
PONmode=PONmode, | PONmode=PONmode, | ||||
pon_vcf=pon_vcf, | |||||
pon_vcf=PON.pon_vcf, | |||||
docker=bcftools_docker, | docker=bcftools_docker, | ||||
disk_size=disk_size, | disk_size=disk_size, | ||||
cluster_config=cluster_config | cluster_config=cluster_config |