task BQSR { | |||||
File ref_dir | |||||
File dbsnp_dir | |||||
File dbmills_dir | |||||
String sample | |||||
String SENTIEON_INSTALL_DIR | |||||
String SENTIEON_LICENSE | |||||
String fasta | |||||
File regions | |||||
String dbsnp | |||||
String db_mills | |||||
File realigned_bam1 | |||||
File realigned_bam_index1 | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
export SENTIEON_LICENSE=${SENTIEON_LICENSE} | |||||
nt=$(nproc) | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -r ${ref_dir}/${fasta} -t $nt -i ${realigned_bam1} --interval ${regions} --algo QualCal -k ${dbsnp_dir}/${dbsnp} -k ${dbmills_dir}/${db_mills} ${sample}_recal_data.table | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -r ${ref_dir}/${fasta} -t $nt -i ${realigned_bam1} -q ${sample}_recal_data.table --algo QualCal -k ${dbsnp_dir}/${dbsnp} -k ${dbmills_dir}/${db_mills} ${sample}_recal_data.table.post --algo ReadWriter ${sample}.sorted.deduped.realigned.recaled.bam | |||||
${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 QualCal -o ${sample}_bqsrreport.pdf ${sample}_recal_data.csv | |||||
>>> | |||||
runtime { | |||||
docker: docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File recal_table = "${sample}_recal_data.table" | |||||
File recal_post = "${sample}_recal_data.table.post" | |||||
File recaled_bam = "${sample}.sorted.deduped.realigned.recaled.bam" | |||||
File recaled_bam_index = "${sample}.sorted.deduped.realigned.recaled.bam.bai" | |||||
File recal_csv = "${sample}_recal_data.csv" | |||||
File bqsrreport_pdf = "${sample}_bqsrreport.pdf" | |||||
} | |||||
} |
task Dedup { | |||||
String SENTIEON_INSTALL_DIR | |||||
String SENTIEON_LICENSE | |||||
String sample | |||||
File sorted_bam | |||||
File sorted_bam_index | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
export SENTIEON_LICENSE=${SENTIEON_LICENSE} | |||||
nt=$(nproc) | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt -i ${sorted_bam} --algo LocusCollector --fun score_info ${sample}_score.txt | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt -i ${sorted_bam} --algo Dedup --rmdup --score_info ${sample}_score.txt --metrics ${sample}_dedup_metrics.txt ${sample}.sorted.deduped.bam | |||||
>>> | |||||
runtime { | |||||
docker: docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File score = "${sample}_score.txt" | |||||
File dedup_metrics = "${sample}_dedup_metrics.txt" | |||||
File Dedup_bam = "${sample}.sorted.deduped.bam" | |||||
File Dedup_bam_index = "${sample}.sorted.deduped.bam.bai" | |||||
} | |||||
} | |||||
task Haplotyper { | |||||
File ref_dir | |||||
File dbsnp_dir | |||||
String SENTIEON_INSTALL_DIR | |||||
String SENTIEON_LICENSE | |||||
String fasta | |||||
File recaled_bam | |||||
File recaled_bam_index | |||||
File regions | |||||
String dbsnp | |||||
String sample | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
export SENTIEON_LICENSE=${SENTIEON_LICENSE} | |||||
nt=$(nproc) | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver --interval ${regions} -r ${ref_dir}/${fasta} -t $nt -i ${recaled_bam} --algo Haplotyper -d ${dbsnp_dir}/${dbsnp} ${sample}_hc.vcf | |||||
>>> | |||||
runtime { | |||||
docker: docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File vcf = "${sample}_hc.vcf" | |||||
File vcf_idx = "${sample}_hc.vcf.idx" | |||||
} | |||||
} | |||||
task Metrics { | |||||
File ref_dir | |||||
String SENTIEON_INSTALL_DIR | |||||
String SENTIEON_LICENSE | |||||
String sample | |||||
String docker | |||||
String cluster_config | |||||
String fasta | |||||
File sorted_bam | |||||
File sorted_bam_index | |||||
String disk_size | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
export SENTIEON_LICENSE=${SENTIEON_LICENSE} | |||||
nt=$(nproc) | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -r ${ref_dir}/${fasta} -t $nt -i ${sorted_bam} --algo MeanQualityByCycle ${sample}_mq_metrics.txt --algo QualDistribution ${sample}_qd_metrics.txt --algo GCBias --summary ${sample}_gc_summary.txt ${sample}_gc_metrics.txt --algo AlignmentStat ${sample}_aln_metrics.txt --algo InsertSizeMetricAlgo ${sample}_is_metrics.txt --algo CoverageMetrics --omit_base_output ${sample}_coverage_metrics | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon plot metrics -o ${sample}_metrics_report.pdf gc=${sample}_gc_metrics.txt qd=${sample}_qd_metrics.txt mq=${sample}_mq_metrics.txt isize=${sample}_is_metrics.txt | |||||
>>> | |||||
runtime { | |||||
docker: docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File qd_metrics = "${sample}_qd_metrics.txt" | |||||
File qd_metrics_pdf = "${sample}_qd_metrics.pdf" | |||||
File mq_metrics = "${sample}_mq_metrics.txt" | |||||
File mq_metrics_pdf = "${sample}_mq_metrics.pdf" | |||||
File is_metrics = "${sample}_is_metrics.txt" | |||||
File is_metrics_pdf = "${sample}_is_metrics.pdf" | |||||
File gc_summary = "${sample}_gc_summary.txt" | |||||
File gc_metrics = "${sample}_gc_metrics.txt" | |||||
File gc_metrics_pdf = "${sample}_gc_metrics.pdf" | |||||
File aln_metrics = "${sample}_aln_metrics.txt" | |||||
File coverage_metrics_sample_summary = "${sample}_coverage_metrics.sample_summary" | |||||
File coverage_metrics_sample_statistics = "${sample}_coverage_metrics.sample_statistics" | |||||
File coverage_metrics_sample_interval_statistics = "${sample}_coverage_metrics.sample_interval_statistics" | |||||
File coverage_metrics_sample_cumulative_coverage_proportions = "${sample}_coverage_metrics.sample_cumulative_coverage_proportions" | |||||
File coverage_metrics_sample_cumulative_coverage_counts = "${sample}_coverage_metrics.sample_cumulative_coverage_counts" | |||||
} | |||||
} | |||||
task PON { | |||||
String SENTIEON_INSTALL_DIR | |||||
String SENTIEON_LICENSE | |||||
String sample | |||||
Boolean PONmode | |||||
File ref_dir | |||||
String fasta | |||||
File cosmic_dir | |||||
String cosmic_vcf | |||||
File dbsnp_dir | |||||
String dbsnp | |||||
File normal_recaled_bam | |||||
File normal_recaled_bam_index | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
export SENTIEON_LICENSE=${SENTIEON_LICENSE} | |||||
nt=$(nproc) | |||||
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 { | |||||
docker: docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File pon_vcf = "${sample}_pon.vcf" | |||||
} | |||||
} |
task Realigner { | |||||
File ref_dir | |||||
File dbmills_dir | |||||
String SENTIEON_INSTALL_DIR | |||||
String SENTIEON_LICENSE | |||||
String sample | |||||
String fasta | |||||
File regions | |||||
File Dedup_bam | |||||
File Dedup_bam_index | |||||
String db_mills | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
export SENTIEON_LICENSE=${SENTIEON_LICENSE} | |||||
nt=$(nproc) | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -r ${ref_dir}/${fasta} -t $nt -i ${Dedup_bam} --algo Realigner -k ${dbmills_dir}/${db_mills} --interval_list ${regions} ${sample}.sorted.deduped.realigned.bam | |||||
>>> | |||||
runtime { | |||||
docker: docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File realigner_bam = "${sample}.sorted.deduped.realigned.bam" | |||||
File realigner_bam_index = "${sample}.sorted.deduped.realigned.bam.bai" | |||||
} | |||||
} | |||||
task TNscope { | |||||
File ref_dir | |||||
File dbsnp_dir | |||||
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 PONmode | |||||
String? cosmic_vcf | |||||
File? cosmic_dir | |||||
File? panel_of_normal_vcf | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
export SENTIEON_LICENSE=${SENTIEON_LICENSE} | |||||
nt=$(nproc) | |||||
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} | |||||
PONcommand="--pon ${panel_of_normal_vcf} --cosmic /cromwell_root/tmp/cosmic/${cosmic_vcf}" | |||||
else | |||||
PONcommand="" | |||||
fi | |||||
${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} PONcommand ${sample}.TNscope.TN.vcf | |||||
>>> | |||||
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" | |||||
} | |||||
} |
task TNseq { | |||||
File ref_dir | |||||
File dbsnp_dir | |||||
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 PONmode | |||||
String? cosmic_vcf | |||||
File? cosmic_dir | |||||
File? panel_of_normal_vcf | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
export SENTIEON_LICENSE=${SENTIEON_LICENSE} | |||||
nt=$(nproc) | |||||
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} | |||||
PONcommand="--pon ${panel_of_normal_vcf} --cosmic /cromwell_root/tmp/cosmic/${cosmic_vcf}" | |||||
else | |||||
PONcommand="" | |||||
fi | |||||
${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} PONcommand ${sample}.TNseq.TN.vcf | |||||
>>> | |||||
runtime { | |||||
docker: docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File TNseq_vcf= "${sample}.TNseq.TN.vcf" | |||||
File TNseq_vcf_index = "${sample}.TNseq.TN.vcf.idx" | |||||
} | |||||
} | |||||
task annovar { | |||||
File tnscope_vcf_file | |||||
File tnseq_vcf_file | |||||
File database | |||||
String sample | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
nt=$(nproc) | |||||
/installations/annovar/table_annovar.pl ${tnscope_vcf_file} ${database} -buildver hg19 -out ${sample}_tnscope -remove -protocol refGene,cytoBand,genomicSuperDups,snp138,ljb26_all,cosmic78,clinvar_20170130,popfreq_all_20150413,intervar_20170202 -operation g,r,r,f,f,f,f,f,f -nastring . -vcfinput -thread $nt | |||||
/installations/annovar/table_annovar.pl ${tnseq_vcf_file} ${database} -buildver hg19 -out ${sample}_tnseq -remove -protocol refGene,cytoBand,genomicSuperDups,snp138,ljb26_all,cosmic78,clinvar_20170130,popfreq_all_20150413,intervar_20170202 -operation g,r,r,f,f,f,f,f,f -nastring . -vcfinput -thread $nt | |||||
>>> | |||||
runtime { | |||||
docker: docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File avinput_tnscope = "${sample}_tnscope.avinput" | |||||
File multianno_tnscope_txt = "${sample}_tnscope.hg19_multianno.txt" | |||||
File multianno_tnscope_vcf = "${sample}_tnscope.hg19_multianno.vcf" | |||||
File avinput_tnseq = "${sample}_tnseq.avinput" | |||||
File multianno_tnseq_txt = "${sample}_tnseq.hg19_multianno.txt" | |||||
File multianno_tnseq_vcf = "${sample}_tnseq.hg19_multianno.vcf" | |||||
} | |||||
} |
task bcftools { | task bcftools { | ||||
#File pon_vcf1 | |||||
#File pon_vcf2 | |||||
#File pon_vcf3 | |||||
File bcfpon | |||||
Array[File] bcfpon | |||||
String docker | String docker | ||||
String cluster_config | String cluster_config | ||||
String disk_size | String disk_size | ||||
Boolean PONmode | |||||
command <<< | command <<< | ||||
set -o pipefail | set -o pipefail | ||||
set -e | set -e | ||||
if [ ${PONmode} ]; then | |||||
bcftools view ${bcfpon} -Oz -o $(basename ${bcfpon}.gz) | |||||
mkdir -p /cromwell_root/tmp/bcftools | |||||
for i in ${sep=" " bcfpon} | |||||
do | |||||
bcftools view $i -Oz -o /cromwell_root/tmp/bcftools/$(basename $i.gz) | |||||
bcftools index /cromwell_root/tmp/bcftools/$(basename $i.gz) -f | |||||
done | |||||
cd /cromwell_root/tmp/bcftools | |||||
bcftools merge -m all -f PASS,. --force-samples *.gz | bcftools plugin fill-AN-AC | bcftools filter -i 'SUM(AC)>1' > panel_of_normal.vcf | |||||
#mkdir -p /cromwell_root/tmp/bcftools | #mkdir -p /cromwell_root/tmp/bcftools | ||||
#bcftools view ${pon_vcf1} -Oz -o /cromwell_root/tmp/bcftools/$(basename ${pon_vcf1}.gz) | #bcftools view ${pon_vcf1} -Oz -o /cromwell_root/tmp/bcftools/$(basename ${pon_vcf1}.gz) | ||||
#bcftools view ${pon_vcf2} -Oz -o /cromwell_root/tmp/bcftools/$(basename ${pon_vcf1}.gz) | #bcftools view ${pon_vcf2} -Oz -o /cromwell_root/tmp/bcftools/$(basename ${pon_vcf1}.gz) | ||||
#bcftools view ${pon_vcf1} -Oz -o $(basename ${pon_vcf1}.gz) | #bcftools view ${pon_vcf1} -Oz -o $(basename ${pon_vcf1}.gz) | ||||
#bcftools view ${pon_vcf2} -Oz -o $(basename ${pon_vcf2}.gz) | #bcftools view ${pon_vcf2} -Oz -o $(basename ${pon_vcf2}.gz) | ||||
#bcftools view ${pon_vcf2} -Oz -o $(basename ${pon_vcf3}.gz) | #bcftools view ${pon_vcf2} -Oz -o $(basename ${pon_vcf3}.gz) | ||||
#for i in `ls *.gz`; do bcftools index $i -f; done | #for i in `ls *.gz`; do bcftools index $i -f; done | ||||
#bcftools merge -m all -f PASS,. --force-samples *.vcf.gz | bcftools plugin fill-AN-AC | bcftools filter -i 'SUM(AC)>1' > panel_of_normal.vcf | #bcftools merge -m all -f PASS,. --force-samples *.vcf.gz | bcftools plugin fill-AN-AC | bcftools filter -i 'SUM(AC)>1' > panel_of_normal.vcf | ||||
else | |||||
echo 1 | |||||
#else | |||||
# echo 1 | |||||
#touch panel_of_normal.vcf | #touch panel_of_normal.vcf | ||||
fi | |||||
#fi | |||||
>>> | >>> | ||||
runtime { | runtime { |
task corealigner { | |||||
File ref_dir | |||||
File dbsnp_dir | |||||
File dbmills_dir | |||||
String SENTIEON_INSTALL_DIR | |||||
String SENTIEON_LICENSE | |||||
String docker | |||||
String cluster_config | |||||
String fasta | |||||
String sample | |||||
String dbsnp | |||||
String db_mills | |||||
File tumor_recaled_bam | |||||
File tumor_recaled_bam_index | |||||
File normal_recaled_bam | |||||
File normal_recaled_bam_index | |||||
String disk_size | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
export SENTIEON_LICENSE=${SENTIEON_LICENSE} | |||||
nt=$(nproc) | |||||
#${sep=" " tumor_recaled_bam} | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -r ${ref_dir}/${fasta} -t $nt -i ${tumor_recaled_bam} -i ${normal_recaled_bam} --algo Realigner -k ${dbmills_dir}/${db_mills} -k ${dbsnp_dir}/${dbsnp} ${sample}_corealigned.bam | |||||
>>> | |||||
runtime { | |||||
docker: docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File corealigner_bam = "${sample}_corealigned.bam" | |||||
File corealigner_bam_index = "${sample}_corealigned.bam.bai" | |||||
} | |||||
} | |||||
task deduped_Metrics { | |||||
File ref_dir | |||||
String SENTIEON_INSTALL_DIR | |||||
String SENTIEON_LICENSE | |||||
String sample | |||||
String fasta | |||||
File Dedup_bam | |||||
File Dedup_bam_index | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
export SENTIEON_LICENSE=${SENTIEON_LICENSE} | |||||
nt=$(nproc) | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -r ${ref_dir}/${fasta} -t $nt -i ${Dedup_bam} --algo CoverageMetrics --omit_base_output ${sample}_deduped_coverage_metrics --algo MeanQualityByCycle ${sample}_deduped_mq_metrics.txt --algo QualDistribution ${sample}_deduped_qd_metrics.txt --algo GCBias --summary ${sample}_deduped_gc_summary.txt ${sample}_deduped_gc_metrics.txt --algo AlignmentStat ${sample}_deduped_aln_metrics.txt --algo InsertSizeMetricAlgo ${sample}_deduped_is_metrics.txt | |||||
>>> | |||||
runtime { | |||||
docker: docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File deduped_coverage_metrics_sample_summary = "${sample}_deduped_coverage_metrics.sample_summary" | |||||
File deduped_coverage_metrics_sample_statistics = "${sample}_deduped_coverage_metrics.sample_statistics" | |||||
File deduped_coverage_metrics_sample_interval_statistics = "${sample}_deduped_coverage_metrics.sample_interval_statistics" | |||||
File deduped_coverage_metrics_sample_cumulative_coverage_proportions = "${sample}_deduped_coverage_metrics.sample_cumulative_coverage_proportions" | |||||
File deduped_coverage_metrics_sample_cumulative_coverage_counts = "${sample}_deduped_coverage_metrics.sample_cumulative_coverage_counts" | |||||
} | |||||
} |
task mapping { | |||||
File ref_dir | |||||
String fasta | |||||
File fastq_1 | |||||
File fastq_2 | |||||
String SENTIEON_INSTALL_DIR | |||||
String SENTIEON_LICENSE | |||||
String group | |||||
String sample | |||||
String pl | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
export SENTIEON_LICENSE=${SENTIEON_LICENSE} | |||||
nt=$(nproc) | |||||
${SENTIEON_INSTALL_DIR}/bin/bwa mem -M -R "@RG\tID:${group}\tSM:${sample}\tPL:${pl}" -t $nt -K 10000000 ${ref_dir}/${fasta} ${fastq_1} ${fastq_2} | ${SENTIEON_INSTALL_DIR}/bin/sentieon util sort -o ${sample}.sorted.bam -t $nt --sam2bam -i - | |||||
>>> | |||||
runtime { | |||||
docker: docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File sorted_bam = "${sample}.sorted.bam" | |||||
File sorted_bam_index = "${sample}.sorted.bam.bai" | |||||
} | |||||
} |
task vcf2maf { | |||||
File? multianno_tnscope_txt | |||||
File? multianno_tnseq_txt | |||||
String sample | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
vcf2maf ${multianno_tnscope_txt} ${sample}_tnscope.MAF | |||||
vcf2maf ${multianno_tnseq_txt} ${sample}_tnseq.MAF | |||||
>>> | |||||
runtime { | |||||
docker: docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File tnscope_maf = "${sample}_tnscope.MAF" | |||||
File tnseq_maf = "${sample}_tnseq.MAF" | |||||
} | |||||
} |
import "./tasks/corealigner.wdl" as corealigner | |||||
import "./tasks/bcftools1.wdl" as bcftools | |||||
import "./tasks/TNseq.wdl" as TNseq | |||||
import "./tasks/TNscope.wdl" as TNscope | |||||
import "./tasks/annovar.wdl" as annovar | |||||
import "./tasks/vcf2maf.wdl" as vcf2maf | |||||
import "./tasks/bcftools.wdl" as bcftools | |||||
workflow {{ project_name }} { | workflow {{ project_name }} { | ||||
String SENTIEON_INSTALL_DIR | |||||
String SENTIEON_LICENSE | |||||
String sentieon_docker | |||||
String annovar_docker | |||||
String vcf2maf_r_docker | |||||
String bcftools_docker | |||||
File ref_dir | |||||
String fasta | |||||
File dbmills_dir | |||||
String db_mills | |||||
File dbsnp_dir | |||||
String dbsnp | |||||
File regions | |||||
File database | |||||
String bcftools_docker | |||||
String disk_size | String disk_size | ||||
String cluster_config | String cluster_config | ||||
Boolean PONmode | |||||
File? cosmic_dir | |||||
String? cosmic_vcf | |||||
Boolean set_annovar | |||||
Boolean set_vcf2maf | |||||
#File pon_vcf1 | |||||
#File pon_vcf2 | |||||
#File pon_vcf3 | |||||
Array[File] BCF | Array[File] BCF | ||||
scatter (sample in BCF) { | |||||
call bcftools.bcftools as bcftools { | |||||
input: | |||||
PONmode=PONmode, | |||||
bcfpon=sample, | |||||
#pon_vcf1=pon_vcf1, | |||||
#pon_vcf2=pon_vcf2, | |||||
#pon_vcf3=pon_vcf3, | |||||
docker=bcftools_docker, | |||||
disk_size=disk_size, | |||||
cluster_config=cluster_config | |||||
} | |||||
call bcftools.bcftools as bcftools { | |||||
input: | |||||
bcfpon=BCF, | |||||
docker=bcftools_docker, | |||||
disk_size=disk_size, | |||||
cluster_config=cluster_config | |||||
} | } | ||||
} | } |