{ | |||||
"{{ project_name }}.SENTIEON_INSTALL_DIR": "/opt/sentieon-genomics", | |||||
"{{ project_name }}.fasta": "GRCh38.d1.vd1.fa", | |||||
"{{ project_name }}.disk_size": "500", | |||||
"{{ project_name }}.inputSamplesFile": "{{ inputSamplesFile }}", | |||||
"{{ project_name }}.docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/sentieon-genomics:v2018.08.01", | |||||
"{{ project_name }}.project_name": "{{ project_name }}", | |||||
"{{ project_name }}.cluster_config": "OnDemand bcs.a2.7xlarge img-ubuntu-vpc", | |||||
"{{ project_name }}.ref_dir": "oss://pgx-reference-data/GRCh38.d1.vd1/" | |||||
} |
task BQSR { | |||||
File ref_dir | |||||
File dbsnp_dir | |||||
File dbmills_dir | |||||
String sample | |||||
String SENTIEON_INSTALL_DIR | |||||
String fasta | |||||
String dbsnp | |||||
String db_mills | |||||
File realigned_bam | |||||
File realigned_bam_index | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
export SENTIEON_LICENSE=192.168.0.55:8990 | |||||
nt=$(nproc) | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -r ${ref_dir}/${fasta} -t $nt -i ${realigned_bam} --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_bam} -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 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=192.168.0.55:8990 | |||||
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 GVCFtyper { | |||||
File ref_dir | |||||
String SENTIEON_INSTALL_DIR | |||||
String fasta | |||||
Array[File] vcf | |||||
Array[File] vcf_idx | |||||
String project_name | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
export SENTIEON_LICENSE=192.168.0.55:8990 | |||||
nt=$(nproc) | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -r ${ref_dir}/${fasta} --algo GVCFtyper ${project_name}.joint.g.vcf ${sep=" " vcf} | |||||
>>> | |||||
runtime { | |||||
docker:docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File gvcf = "${project_name}.joint.g.vcf" | |||||
File gvcf_idx = "${project_name}.joint.g.vcf.idx" | |||||
} | |||||
} | |||||
task Haplotyper { | |||||
File ref_dir | |||||
String SENTIEON_INSTALL_DIR | |||||
String fasta | |||||
File recaled_bam | |||||
File recaled_bam_index | |||||
String sample | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
export SENTIEON_LICENSE=192.168.0.55:8990 | |||||
nt=$(nproc) | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -r ${ref_dir}/${fasta} -t $nt -i ${recaled_bam} --algo Haplotyper --emit_mode gvcf ${sample}_hc.g.vcf | |||||
>>> | |||||
runtime { | |||||
docker:docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File vcf = "${sample}_hc.g.vcf" | |||||
File vcf_idx = "${sample}_hc.g.vcf.idx" | |||||
} | |||||
} | |||||
task Metrics { | |||||
File ref_dir | |||||
String SENTIEON_INSTALL_DIR | |||||
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=192.168.0.55:8990 | |||||
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 Realigner { | |||||
File ref_dir | |||||
File dbmills_dir | |||||
String SENTIEON_INSTALL_DIR | |||||
String sample | |||||
String fasta | |||||
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=192.168.0.55:8990 | |||||
nt=$(nproc) | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -r ${ref_dir}/${fasta} -t $nt -i ${Dedup_bam} --algo Realigner -k ${dbmills_dir}/${db_mills} ${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 SENTIEON_INSTALL_DIR | |||||
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 | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
export SENTIEON_LICENSE=192.168.0.55:8990 | |||||
nt=$(nproc) | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -r ${ref_dir}/${fasta} -t $nt -i ${corealigner_bam} --algo TNscope --tumor_sample ${tumor_name} --normal_sample ${normal_name} --dbsnp ${dbsnp_dir}/${dbsnp} ${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 SENTIEON_INSTALL_DIR | |||||
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 | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
export SENTIEON_LICENSE=192.168.0.55:8990 | |||||
nt=$(nproc) | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -r ${ref_dir}/${fasta} -t $nt -i ${corealigner_bam} --algo TNhaplotyper --tumor_sample ${tumor_name} --normal_sample ${normal_name} --dbsnp ${dbsnp_dir}/${dbsnp} ${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 corealigner { | |||||
File ref_dir | |||||
File dbsnp_dir | |||||
File dbmills_dir | |||||
String sample | |||||
String SENTIEON_INSTALL_DIR | |||||
String docker | |||||
String cluster_config | |||||
String fasta | |||||
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=192.168.0.55:8990 | |||||
nt=$(nproc) | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -r ${ref_dir}/${fasta} -t $nt -i ${tumor_recaled_bam} -i ${normal_recaled_bam} --algo Realigner -k ${db_mills} -k ${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 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=192.168.0.55:8990 | |||||
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 gVCF_chromo_split { | |||||
File gvcf | |||||
File gvcf_idx | |||||
String SENTIEON_INSTALL_DIR | |||||
String sample | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
cat ${gvcf} | grep '#' > header | |||||
for i in chr1 chr2 chr3 chr4 chr5 chr6 chr7 chr8 chr9 chr10 chr11 chr12 chr13 chr14 chr15 chr16 chr17 chr18 chr19 chr20 chr21 chr22 chrX | |||||
do | |||||
cat ${gvcf} | grep -w $i | cat header - > ${sample}.$i.vcf | |||||
done | |||||
set -o pipefail | |||||
set -e | |||||
export SENTIEON_LICENSE=192.168.0.55:8990 | |||||
nt=$(nproc) | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chr1.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chr2.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chr3.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chr4.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chr5.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chr6.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chr7.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chr8.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chr9.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chr10.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chr11.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chr12.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chr13.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chr14.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chr15.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chr16.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chr17.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chr18.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chr19.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chr20.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chr21.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chr22.vcf | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${sample}.chrX.vcf | |||||
>>> | |||||
runtime { | |||||
docker:docker | |||||
cluster:cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File chr1_gvcf = "${sample}.chr1.vcf" | |||||
File chr2_gvcf = "${sample}.chr2.vcf" | |||||
File chr3_gvcf = "${sample}.chr3.vcf" | |||||
File chr4_gvcf = "${sample}.chr4.vcf" | |||||
File chr5_gvcf = "${sample}.chr5.vcf" | |||||
File chr6_gvcf = "${sample}.chr6.vcf" | |||||
File chr7_gvcf = "${sample}.chr7.vcf" | |||||
File chr8_gvcf = "${sample}.chr8.vcf" | |||||
File chr9_gvcf = "${sample}.chr9.vcf" | |||||
File chr10_gvcf = "${sample}.chr10.vcf" | |||||
File chr11_gvcf = "${sample}.chr11.vcf" | |||||
File chr12_gvcf = "${sample}.chr12.vcf" | |||||
File chr13_gvcf = "${sample}.chr13.vcf" | |||||
File chr14_gvcf = "${sample}.chr14.vcf" | |||||
File chr15_gvcf = "${sample}.chr15.vcf" | |||||
File chr16_gvcf = "${sample}.chr16.vcf" | |||||
File chr17_gvcf = "${sample}.chr17.vcf" | |||||
File chr18_gvcf = "${sample}.chr18.vcf" | |||||
File chr19_gvcf = "${sample}.chr19.vcf" | |||||
File chr20_gvcf = "${sample}.chr20.vcf" | |||||
File chr21_gvcf = "${sample}.chr21.vcf" | |||||
File chr22_gvcf = "${sample}.chr22.vcf" | |||||
File chrX_gvcf = "${sample}.chrX.vcf" | |||||
File chr1_gvcf_idx = "${sample}.chr1.vcf.idx" | |||||
File chr2_gvcf_idx = "${sample}.chr2.vcf.idx" | |||||
File chr3_gvcf_idx = "${sample}.chr3.vcf.idx" | |||||
File chr4_gvcf_idx = "${sample}.chr4.vcf.idx" | |||||
File chr5_gvcf_idx = "${sample}.chr5.vcf.idx" | |||||
File chr6_gvcf_idx = "${sample}.chr6.vcf.idx" | |||||
File chr7_gvcf_idx = "${sample}.chr7.vcf.idx" | |||||
File chr8_gvcf_idx = "${sample}.chr8.vcf.idx" | |||||
File chr9_gvcf_idx = "${sample}.chr9.vcf.idx" | |||||
File chr10_gvcf_idx = "${sample}.chr10.vcf.idx" | |||||
File chr11_gvcf_idx = "${sample}.chr11.vcf.idx" | |||||
File chr12_gvcf_idx = "${sample}.chr12.vcf.idx" | |||||
File chr13_gvcf_idx = "${sample}.chr13.vcf.idx" | |||||
File chr14_gvcf_idx = "${sample}.chr14.vcf.idx" | |||||
File chr15_gvcf_idx = "${sample}.chr15.vcf.idx" | |||||
File chr16_gvcf_idx = "${sample}.chr16.vcf.idx" | |||||
File chr17_gvcf_idx = "${sample}.chr17.vcf.idx" | |||||
File chr18_gvcf_idx = "${sample}.chr18.vcf.idx" | |||||
File chr19_gvcf_idx = "${sample}.chr19.vcf.idx" | |||||
File chr20_gvcf_idx = "${sample}.chr20.vcf.idx" | |||||
File chr21_gvcf_idx = "${sample}.chr21.vcf.idx" | |||||
File chr22_gvcf_idx = "${sample}.chr22.vcf.idx" | |||||
File chrX_gvcf_idx = "${sample}.chrX.vcf.idx" | |||||
} | |||||
} | |||||
task mapping { | |||||
File ref_dir | |||||
String fasta | |||||
File fastq_1 | |||||
File fastq_2 | |||||
String SENTIEON_INSTALL_DIR | |||||
String group | |||||
String sample | |||||
String pl | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
export SENTIEON_LICENSE=192.168.0.55:8990 | |||||
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" | |||||
} | |||||
} |
import "./tasks/gVCF_chromo_split.wdl" as gVCF_chromo_split | |||||
import "./tasks/GVCFtyper.wdl" as GVCFtyper | |||||
workflow {{ project_name }} { | |||||
File inputSamplesFile | |||||
Array[Array[File]] inputSamples = read_tsv(inputSamplesFile) | |||||
String SENTIEON_INSTALL_DIR | |||||
String docker | |||||
String project_name | |||||
String fasta | |||||
File ref_dir | |||||
String disk_size | |||||
String cluster_config | |||||
scatter (quartet in inputSamples){ | |||||
call gVCF_chromo_split.gVCF_chromo_split as gVCF_chromo_split { | |||||
input: | |||||
gvcf=quartet[0], | |||||
gvcf_idx=quartet[1], | |||||
sample=quartet[2], | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
docker=docker, | |||||
disk_size=disk_size, | |||||
cluster_config=cluster_config | |||||
} | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chr1 { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chr1_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chr1_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chr2 { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chr2_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chr2_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chr3 { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chr3_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chr3_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chr4 { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chr4_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chr4_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chr5 { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chr5_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chr5_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chr6 { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chr6_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chr6_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chr7 { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chr7_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chr7_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chr8 { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chr8_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chr8_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chr9 { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chr9_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chr9_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chr10 { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chr10_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chr10_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chr11 { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chr11_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chr11_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chr12 { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chr12_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chr12_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chr13 { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chr13_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chr13_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chr14 { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chr14_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chr14_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chr15 { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chr15_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chr15_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chr16 { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chr16_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chr16_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chr17 { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chr17_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chr17_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chr18 { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chr18_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chr18_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chr19 { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chr19_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chr19_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chr20 { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chr20_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chr20_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chr21 { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chr21_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chr21_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chr22 { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chr22_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chr22_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call GVCFtyper.GVCFtyper as GVCFtyper_chrX { | |||||
input: | |||||
ref_dir=ref_dir, | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
vcf=gVCF_chromo_split.chrX_gvcf, | |||||
vcf_idx=gVCF_chromo_split.chrX_gvcf_idx, | |||||
project_name=project_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
} |