VEP (Variant Effect Predictor) predicts the functional effects of genomic variants. The annotated VCF will be converted into MAF based on vcf2maf.
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.

92 lines
2.7KB

  1. task VEP {
  2. File vcf
  3. String sample_id
  4. String basename = basename(vcf,".vcf")
  5. String tumor_id
  6. String normal_id
  7. File ref_dir
  8. String fasta
  9. String vep_path
  10. File cache
  11. String ncbi_build
  12. String species
  13. String vcf2maf_path
  14. String docker
  15. String cluster_config
  16. String disk_size
  17. command <<<
  18. set -o pipefail
  19. set -e
  20. nt=$(nproc)
  21. awk -F'\t' '{if(($1~"^#")||($1!~"^#" && $7=="PASS")){print $0}}' ${vcf} > ${basename}.PASS.vcf
  22. ncol=`awk -F'\t' '{if($1!~"^#"){print NF}}' ${basename}.PASS.vcf | uniq`
  23. if [ $ncol -lt 11 ]; then
  24. vcf2maf_ID="--tumor-id ${tumor_id} --normal-id ${normal_id}"
  25. else
  26. vcf2maf_ID="--tumor-id ${tumor_id}"
  27. fi
  28. nrow=`awk -F'\t' '{if($1~"^chr"){print $0}}' ${basename}.PASS.vcf | wc -l`
  29. if [ $nrow -lt 5000 ]; then
  30. buffer_size="--buffer_size 5000"
  31. else
  32. buffer_size="--buffer_size 500"
  33. fi
  34. # Extract the BND variants from VCF
  35. # awk -F'\t' '{if(($1~"^#")||($8!~".*SVTYPE=BND.*")){print $0}}' ${sample_id}.PASS.vcf > ${sample_id}.PASS.vcf2maf.vcf
  36. # awk -F'\t' '{if(($1~"^#")||($8~".*SVTYPE=BND.*")){print $0}}' ${sample_id}.PASS.vcf > ${sample_id}.INPUT.VEP.vcf
  37. # vcf2maf
  38. # perl ${vcf2maf_path}/vcf2maf.pl \
  39. # --input-vcf ${sample_id}.PASS.vcf2maf.vcf --output-maf ${basename}.maf \
  40. # --tumor-id ${tumor_id} --normal-id ${normal_id} \
  41. # --ref-fasta ${ref_dir}/${fasta} \
  42. # --vep-path ${vep_path} \
  43. # --vep-data ${cache} \
  44. # --ncbi-build ${ncbi_build} \
  45. # --species ${species} \
  46. # --vep-fork $nt
  47. # vep
  48. perl ${vep_path}/vep \
  49. --input_file ${basename}.PASS.vcf --output_file ${basename}.PASS.vep.vcf \
  50. --fasta ${ref_dir}/${fasta} \
  51. --dir ${cache} \
  52. --assembly ${ncbi_build} \
  53. --species ${species} \
  54. --fork $nt \
  55. --format vcf --vcf \
  56. --no_progress \
  57. --no_stats \
  58. $buffer_size \
  59. --sift b \
  60. --ccds --uniprot --hgvs --symbol --numbers --domains --gene_phenotype --canonical --protein --biotype --uniprot --tsl --variant_class --shift_hgvs 1 --check_existing --total_length --allele_number --no_escape --xref_refseq --failed 1 --flag_pick_allele --pick_order canonical,tsl,biotype,rank,ccds,length --force_overwrite --offline --pubmed --regulatory
  61. # vcf2maf
  62. perl ${vcf2maf_path}/vcf2maf.pl \
  63. --inhibit-vep \
  64. --input-vcf ${basename}.PASS.vep.vcf --output-maf ${basename}.PASS.maf \
  65. $vcf2maf_ID \
  66. --ref-fasta ${ref_dir}/${fasta} \
  67. --vep-fork $nt
  68. >>>
  69. runtime {
  70. docker: docker
  71. cluster: cluster_config
  72. systemDisk: "cloud_ssd 40"
  73. dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
  74. }
  75. output {
  76. File input_vcf = "${basename}.PASS.vcf"
  77. File vep_vcf = "${basename}.PASS.vep.vcf"
  78. File maf = "${basename}.PASS.maf"
  79. }
  80. }