Germline & Somatic short variant discovery (SNVs + Indels) for WGS & WES.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 line
1.4KB

  1. task ANNOVAR {
  2. File vcf
  3. String basename = basename(vcf,".vcf")
  4. String hg
  5. File annovar_database
  6. Boolean only_pass
  7. String docker
  8. String cluster_config
  9. String disk_size
  10. command <<<
  11. set -o pipefail
  12. set -e
  13. nt=$(nproc)
  14. if [ only_pass ]; then
  15. awk -F'\t' '{if(($1~"^#")||($1!~"^#" && $7=="PASS")){print $0}}' ${vcf} > INPUT.vcf
  16. else
  17. cp ${vcf} INPUT.vcf
  18. fi
  19. if [ ${hg} == "hg38" ]; then
  20. /installations/annovar/table_annovar.pl INPUT.vcf ${annovar_database} -buildver ${hg} -out ${basename} -remove -protocol refGene,cytoBand,genomicSuperDups,ljb26_all,dbnsfp35c,intervar_20180118,cosmic70,exac03,gnomad211_exome,clinvar_20200316 -operation g,r,r,f,f,f,f,f,f,f -nastring . -vcfinput -thread $nt
  21. fi
  22. if [ ${hg} == "hg19" ]; then
  23. /installations/annovar/table_annovar.pl INPUT.vcf ${annovar_database} -buildver ${hg} -out ${basename} -remove -protocol refGene,cytoBand,genomicSuperDups,ljb26_all,snp138,cosmic78,intervar_20170202,popfreq_all_20150413,clinvar_20190305 -operation g,r,r,f,f,f,f,f,f -nastring . -vcfinput -thread $nt
  24. fi
  25. >>>
  26. runtime {
  27. docker: docker
  28. cluster: cluster_config
  29. systemDisk: "cloud_ssd 40"
  30. dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
  31. }
  32. output {
  33. File avinput = "${basename}.avinput"
  34. File multianno_txt = "${basename}.${hg}_multianno.txt"
  35. File multianno_vcf = "${basename}.${hg}_multianno.vcf"
  36. }
  37. }