{ | { | ||||
"fasta": "GRCh38.d1.vd1.fa", | |||||
"ref_dir": "oss://pgx-reference-data/GRCh38.d1.vd1/", | |||||
"dbsnp": "dbsnp_146.hg38.vcf", | |||||
"dbsnp_dir": "oss://pgx-reference-data/GRCh38.d1.vd1/", | |||||
"SENTIEON_INSTALL_DIR": "/opt/sentieon-genomics", | |||||
"SENTIEON_LICENSE": "192.168.0.55:8990", | |||||
"dbmills_dir": "oss://pgx-reference-data/GRCh38.d1.vd1/", | |||||
"db_mills": "Mills_and_1000G_gold_standard.indels.hg38.vcf", | |||||
"sentieon_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/sentieon-genomics:v2020.10.07", | |||||
"bcftools_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/bcftools:v1.9", | |||||
"annovar_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/annovar:v2018.04", | |||||
"maftools_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/r-base:4.0.2", | |||||
"bcftools_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/bcftools:v1.9", | |||||
"database": "oss://pgx-reference-data/annovar_hg38/", | |||||
"regions": "oss://pgx-reference-data/reference/wes_bedfiles/agilent_v6/SureSelect_Human_All_Exon_V6_r2.bed", | |||||
"set_pon": "true", | |||||
"cosmic_vcf": "CosmicCodingMuts.hg38.v91.vcf", | |||||
"cosmic_dir": "oss://pgx-reference-data/reference/cosmic/", | |||||
"disk_size": "200", | |||||
"cluster_config": "OnDemand bcs.a2.3xlarge img-ubuntu-vpc", | |||||
"set_annovar": "true", | |||||
"set_vcf2maf": "true", | |||||
"germline": "false" | |||||
"fasta": "GRCh38.d1.vd1.fa", | |||||
"ref_dir": "oss://pgx-reference-data/GRCh38.d1.vd1/", | |||||
"dbsnp": "dbsnp_146.hg38.vcf", | |||||
"dbsnp_dir": "oss://pgx-reference-data/GRCh38.d1.vd1/", | |||||
"SENTIEON_INSTALL_DIR": "/opt/sentieon-genomics", | |||||
"SENTIEON_LICENSE": "192.168.0.55:8990", | |||||
"dbmills_dir": "oss://pgx-reference-data/GRCh38.d1.vd1/", | |||||
"db_mills": "Mills_and_1000G_gold_standard.indels.hg38.vcf", | |||||
"sentieon_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/sentieon-genomics:v2020.10.07", | |||||
"bcftools_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/bcftools:v1.9", | |||||
"annovar_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/annovar:v2018.04", | |||||
"maftools_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/r-base:4.0.2", | |||||
"bcftools_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/bcftools:v1.9", | |||||
"database": "oss://pgx-reference-data/annovar_hg38/", | |||||
"regions": "oss://pgx-reference-data/reference/wes_bedfiles/agilent_v6/SureSelect_Human_All_Exon_V6_r2.bed", | |||||
"set_pon": "true", | |||||
"cosmic_vcf": "CosmicCodingMuts.hg38.v91.vcf", | |||||
"cosmic_dir": "oss://pgx-reference-data/reference/cosmic/", | |||||
"disk_size": "200", | |||||
"cluster_config": "OnDemand bcs.a2.3xlarge img-ubuntu-vpc", | |||||
"set_annovar": "true", | |||||
"set_vcf2maf": "true", | |||||
"germline": "false" | |||||
} | } |
task PoN { | task PoN { | ||||
String SENTIEON_INSTALL_DIR | |||||
String SENTIEON_LICENSE | |||||
File ref_dir | |||||
String fasta | |||||
File cosmic_dir | |||||
String cosmic_vcf | |||||
File dbsnp_dir | |||||
String dbsnp | |||||
File regions | |||||
String SENTIEON_INSTALL_DIR | |||||
String SENTIEON_LICENSE | |||||
File ref_dir | |||||
String fasta | |||||
File cosmic_dir | |||||
String cosmic_vcf | |||||
File dbsnp_dir | |||||
String dbsnp | |||||
File regions | |||||
File normal_bam | |||||
File normal_bam_index | |||||
String sample=basename(normal_bam, ".*") | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
export SENTIEON_LICENSE=${SENTIEON_LICENSE} | |||||
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} | |||||
File normal_bam | |||||
File normal_bam_index | |||||
String sample=basename(normal_bam, ".*") | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
export SENTIEON_LICENSE=${SENTIEON_LICENSE} | |||||
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} | |||||
# Generating TNhaplotyper PoN | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt --interval ${regions} -r ${ref_dir}/${fasta} -i ${normal_bam} --algo TNhaplotyper --detect_pon --cosmic /cromwell_root/tmp/cosmic/${cosmic_vcf} --dbsnp ${dbsnp_dir}/${dbsnp} ${sample}_TNhaplotyper_pon.vcf | |||||
# Generating TNhaplotyper PoN | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt --interval ${regions} -r ${ref_dir}/${fasta} -i ${normal_bam} --algo TNhaplotyper --detect_pon --cosmic /cromwell_root/tmp/cosmic/${cosmic_vcf} --dbsnp ${dbsnp_dir}/${dbsnp} ${sample}_TNhaplotyper_pon.vcf | |||||
# Generating TNhaplotyper2 PoN | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt --interval ${regions} -r ${ref_dir}/${fasta} -i ${normal_bam} --algo TNhaplotyper2 --normal_sample ${sample} ${sample}_TNhaplotyper2_pon.vcf | |||||
# Generating TNhaplotyper2 PoN | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt --interval ${regions} -r ${ref_dir}/${fasta} -i ${normal_bam} --algo TNhaplotyper2 --normal_sample ${sample} ${sample}_TNhaplotyper2_pon.vcf | |||||
# Generating TNscope PoN | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt --interval ${regions} -r ${ref_dir}/${fasta} -i ${normal_bam} --algo TNscope --normal_sample ${sample} ${sample}_TNscope_pon.vcf | |||||
>>> | |||||
runtime { | |||||
docker: docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
# Generating TNscope PoN | |||||
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt --interval ${regions} -r ${ref_dir}/${fasta} -i ${normal_bam} --algo TNscope --normal_sample ${sample} ${sample}_TNscope_pon.vcf | |||||
>>> | |||||
runtime { | |||||
docker: docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File TNhaplotyper_pon_vcf = "${sample}_TNhaplotyper_pon.vcf" | |||||
File TNhaplotyper2_pon_vcf = "${sample}_TNhaplotyper2_pon.vcf" | |||||
File TNscope_pon_vcf = "${sample}_TNscope_pon.vcf" | |||||
} | |||||
output { | |||||
File TNhaplotyper_pon_vcf = "${sample}_TNhaplotyper_pon.vcf" | |||||
File TNhaplotyper2_pon_vcf = "${sample}_TNhaplotyper2_pon.vcf" | |||||
File TNscope_pon_vcf = "${sample}_TNscope_pon.vcf" | |||||
} | |||||
} | } |
task mergePoN { | task mergePoN { | ||||
Array[File] pon_vcfs | |||||
String panel_id | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
Array[File] pon_vcfs | |||||
String panel_id | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
mkdir -p /cromwell_root/tmp/bcftools | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
mkdir -p /cromwell_root/tmp/bcftools | |||||
for i in ${sep=" " pon_vcfs} | |||||
do | |||||
bcftools view $i -Oz -o /cromwell_root/tmp/bcftools/$(basename $i.gz) | |||||
bcftools index /cromwell_root/tmp/bcftools/$(basename $i.gz) -f | |||||
done | |||||
for i in ${sep=" " pon_vcfs} | |||||
do | |||||
bcftools view $i -Oz -o /cromwell_root/tmp/bcftools/$(basename $i.gz) | |||||
bcftools index /cromwell_root/tmp/bcftools/$(basename $i.gz) -f | |||||
done | |||||
bcftools merge -m all -f PASS,. --force-samples /cromwell_root/tmp/bcftools/*.vcf.gz | bcftools plugin fill-AN-AC | bcftools filter -i 'SUM(AC)>1' > ${panel_id}_pon.vcf | |||||
>>> | |||||
bcftools merge -m all -f PASS,. --force-samples /cromwell_root/tmp/bcftools/*.vcf.gz | bcftools plugin fill-AN-AC | bcftools filter -i 'SUM(AC)>1' > ${panel_id}_pon.vcf | |||||
>>> | |||||
runtime { | |||||
docker: docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File panel_of_normal_vcf = "${panel_id}_pon.vcf" | |||||
} | |||||
runtime { | |||||
docker: docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File panel_of_normal_vcf = "${panel_id}_pon.vcf" | |||||
} | |||||
} | } |