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.

55 lines
1.6KB

  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 ${basename}.PASS.vcf \
  21. ${annovar_database} -buildver ${hg} \
  22. -out ${basename} -remove \
  23. -protocol refGene,ensGene,knownGene,rmsk,cytoBand,genomicSuperDups,esp6500siv2_all,ALL.sites.2015_08,AFR.sites.2015_08,AMR.sites.2015_08,EAS.sites.2015_08,EUR.sites.2015_08,SAS.sites.2015_08,avsnp147,dbnsfp33a,clinvar_20210501,gnomad_genome,dbscsnv11,dbnsfp31a_interpro \
  24. -operation g,g,g,r,r,r,f,f,f,f,f,f,f,f,f,f,f,f,f \
  25. -nastring . -vcfinput -thread $nt
  26. fi
  27. if [ ${hg} == "hg19" ]; then
  28. /installations/annovar/table_annovar.pl ${basename}.PASS.vcf \
  29. ${annovar_database} -buildver ${hg} \
  30. -out ${basename} -remove \
  31. -protocol refGene,cytoBand,genomicSuperDups,ljb26_all,snp138,cosmic78,intervar_20170202,popfreq_all_20150413,clinvar_20190305 \
  32. -operation g,r,r,f,f,f,f,f,f \
  33. -nastring . -vcfinput -thread $nt
  34. fi
  35. >>>
  36. runtime {
  37. docker: docker
  38. cluster: cluster_config
  39. systemDisk: "cloud_ssd 40"
  40. dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
  41. }
  42. output {
  43. File avinput = "${basename}.avinput"
  44. File multianno_txt = "${basename}.${hg}_multianno.txt"
  45. File multianno_vcf = "${basename}.${hg}_multianno.vcf"
  46. }
  47. }