@@ -0,0 +1,10 @@ | |||
{ | |||
"{{ project_name }}.sample": "{{ sample }}", | |||
"{{ project_name }}.disk_size": "{{ disk_size }}", | |||
"{{ project_name }}.cluster_config": "OnDemand bcs.b2.3xlarge img-ubuntu-vpc", | |||
"{{ project_name }}.annovar_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/annovar:v2018.04", | |||
"{{ project_name }}.database": "oss://chinese-quartet/quartet-storage-data/reference_data/annovar_hg38/", | |||
"{{ project_name }}.hardfiltration_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/gatk:v2019.01", | |||
"{{ project_name }}.vcf_file": "{{ vcf }}", | |||
"{{ project_name }}.vcf_index": "{{ vcf_index }}" | |||
} |
@@ -0,0 +1,28 @@ | |||
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}.hg38_multianno.txt" | |||
File multianno_vcf = "${sample}.hg38_multianno.vcf" | |||
} | |||
} |
@@ -0,0 +1,36 @@ | |||
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" | |||
} | |||
} | |||
@@ -0,0 +1,34 @@ | |||
import "./tasks/Hardfiltration.wdl" as Hardfiltration | |||
import "./tasks/Annovar.wdl" as Annovar | |||
workflow {{ project_name }} { | |||
File vcf_file | |||
File database | |||
File vcf_index | |||
String sample | |||
String annovar_docker | |||
String hardfiltration_docker | |||
String cluster_config | |||
String disk_size | |||
call Hardfiltration.Hardfiltration as Hardfiltration { | |||
input: | |||
docker=hardfiltration_docker, | |||
sample=sample, | |||
vcf_index=vcf_index, | |||
disk_size=disk_size, | |||
vcf_file=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 | |||
} | |||
} |