{ | |||||
"{{ project_name }}.fasta": "GRCh38.d1.vd1.fa", | |||||
"{{ project_name }}.ref_dir": "oss://pgx-reference-data/GRCh38.d1.vd1/", | |||||
"{{ project_name }}.dbsnp": "dbsnp_146.hg38.vcf", | |||||
"{{ project_name }}.SENTIEON_INSTALL_DIR": "/opt/sentieon-genomics", | |||||
"{{ project_name }}.dbmills_dir": "oss://pgx-reference-data/GRCh38.d1.vd1/", | |||||
"{{ project_name }}.db_mills": "Mills_and_1000G_gold_standard.indels.hg38.vcf", | |||||
"{{ project_name }}.cluster_config": "{{ cluster if cluster != '' else 'OnDemand ecs.sn1ne.8xlarge img-ubuntu-vpc' }}", | |||||
"{{ project_name }}.docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/sentieon-genomics:v2018.08.01", | |||||
"{{ project_name }}.dbsnp_dir": "oss://pgx-reference-data/GRCh38.d1.vd1/", | |||||
"{{ project_name }}.sample": "{{ sample_name }}", | |||||
"{{ project_name }}.disk_size": "{{ 200 }}", | |||||
"{{ project_name }}.hardfiltration_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/gatk:v2019.01", | |||||
"{{ project_name }}.annovar_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/annovar:v2018.04", | |||||
"{{ project_name }}.recaled_bam_file": "{{ recaled_bam }}", | |||||
"{{ project_name }}.database": "oss://chinese-quartet/quartet-storage-data/reference_data/annovar_hg38/", | |||||
"{{ project_name }}.recaled_bam_index": "{{ recaled_bam_index }}" | |||||
} |
task Annovar { | |||||
File vcf_file | |||||
File database | |||||
String sample | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
nt=$(nproc) | |||||
/installations/annovar/table_annovar.pl ${vcf_file} ${database} -buildver hg38 -out ${sample} -remove -protocol refGene,ensGene,ljb26_all,dbnsfp35c,intervar_20180118,cosmic70,exac03,gnomad30_genome,1000g2015aug_all,clinvar_20190305,gnomad211_genome -operation g,g,f,f,f,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 = "${sample}.avinput" | |||||
File multianno_txt = "${sample}.hg19_multianno.txt" | |||||
File multianno_vcf = "${sample}.hg19_multianno.vcf" | |||||
} | |||||
} |
task Haplotyper { | |||||
File ref_dir | |||||
File dbsnp_dir | |||||
String SENTIEON_INSTALL_DIR | |||||
String fasta | |||||
File recaled_bam | |||||
File recaled_bam_index | |||||
String dbsnp | |||||
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 -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 Hardfiltration { | |||||
File vcf_file | |||||
File vcf_index | |||||
String sample | |||||
String docker | |||||
String disk_size | |||||
String cluster_config | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
java -Dsamjdk.use_async_io_read_samtools=false -Dsamjdk.use_async_io_write_samtools=true -Dsamjdk.use_async_io_write_tribble=false -Dsamjdk.compression_level=2 -Xmx32G -jar /gatk/gatk-package-4.1.0.0-local.jar VariantFiltration -V ${vcf_file} -O ${sample}_hc_filtered.vcf --filter-expression "QD<2.0" --filter-name "LowQD" --filter-expression "MQ<40.0" --filter-name "LowMQ" --filter-expression "FS>60.0" --filter-name "FisherStrandBias" --filter-expression "HaplotypeScore>13.0" --filter-name "HighHapScore" --filter-expression "MQRankSum<-12.5" --filter-name "LowMQRankSum" --filter-expression "ReadPosRankSum<-8.0" --filter-name "LowReadPosRankSum" --cluster-size 3 --cluster-window-size 100 --filter-expression "MQ0 >= 4 && ((MQ0/(1.0*DP))>0.1)" --filter-name "HARD_TO_VALIDATE" --filter-expression "DP < 5" --filter-name "LowCoverage" --filter-expression "QUAL < 30.0" --filter-name "VeryLowQual" --filter-expression "QUAL > 30.0 && QUAL < 50.0" --filter-name "LowQual" | |||||
cat ${sample}_hc_filtered.vcf |grep "#" > ${sample}_hc_filtered.vcf.header.tmp | |||||
cat ${sample}_hc_filtered.vcf |grep PASS > ${sample}_hc_filtered.vcf.tmp | |||||
cat ${sample}_hc_filtered.vcf.header.tmp ${sample}_hc_filtered.vcf.tmp > ${sample}_hc_PASS.vcf | |||||
>>> | |||||
runtime { | |||||
docker:docker | |||||
cluster:cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File raw_vcf = "${sample}_hc_filtered.vcf" | |||||
File pass_vcf = "${sample}_hc_PASS.vcf" | |||||
} | |||||
} | |||||
import "./tasks/Haplotyper.wdl" as Haplotyper | |||||
import "./tasks/Hardfiltration.wdl" as Hardfiltration | |||||
import "./tasks/Annovar.wdl" as Annovar | |||||
workflow {{ project_name }} { | |||||
String SENTIEON_INSTALL_DIR | |||||
String sample | |||||
String docker | |||||
String fasta | |||||
File ref_dir | |||||
File dbmills_dir | |||||
String db_mills | |||||
File dbsnp_dir | |||||
String dbsnp | |||||
String disk_size | |||||
String cluster_config | |||||
File recaled_bam | |||||
File database | |||||
File recaled_bam_index | |||||
call Haplotyper.Haplotyper as Haplotyper { | |||||
input: | |||||
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, | |||||
fasta=fasta, | |||||
ref_dir=ref_dir, | |||||
recaled_bam=recaled_bam, | |||||
recaled_bam_index=recaled_bam_index, | |||||
dbsnp=dbsnp, | |||||
dbsnp_dir=dbsnp_dir, | |||||
sample=sample, | |||||
docker=docker, | |||||
disk_size=disk_size, | |||||
cluster_config=cluster_config | |||||
} | |||||
call Hardfiltration.Hardfiltration as Hardfiltration { | |||||
input: | |||||
docker=hardfiltration_docker, | |||||
sample=sample, | |||||
vcf_index=Haplotyper.vcf_index, | |||||
disk_size=disk_size, | |||||
vcf_file=Haplotyper.vcf_file, | |||||
cluster_config=cluster_config | |||||
} | |||||
call Annovar.Annovar as Annovar { | |||||
input: | |||||
docker=annovar_docker, | |||||
database=database, | |||||
vcf_file=Hardfiltration.pass_vcf, | |||||
sample=sample, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
} |