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.

114 satır
3.4KB

  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. source /etc/profile
  22. awk -F'\t' '{if(($1~"^#")||($1!~"^#" && $7=="PASS")){print $0}}' ${vcf} > ${sample_id}.vcf
  23. # Judge the SAMPLE info of vcf file
  24. ncol=`awk -F'\t' '{if($1!~"^#"){print NF}}' ${sample_id}.vcf | uniq`
  25. if [ $ncol -lt 11 ]; then
  26. SAMPLE="--tumor-id ${tumor_id} --normal-id ${normal_id}"
  27. else
  28. SAMPLE="--tumor-id ${sample_id}"
  29. fi
  30. # Set the buffer_size based on the data size
  31. nrow=`awk -F'\t' '{if($1~"^chr"){print $0}}' ${sample_id}.vcf | wc -l`
  32. if [ $nrow -lt 5000 ]; then
  33. buffer_size="--buffer_size 5000"
  34. else
  35. buffer_size="--buffer_size 1000"
  36. fi
  37. # Extract the BND variants from VCF
  38. # awk -F'\t' '{if(($1~"^#")||($8!~".*SVTYPE=BND.*")){print $0}}' ${sample_id}.PASS.vcf > ${sample_id}.PASS.vcf2maf.vcf
  39. # awk -F'\t' '{if(($1~"^#")||($8~".*SVTYPE=BND.*")){print $0}}' ${sample_id}.PASS.vcf > ${sample_id}.INPUT.VEP.vcf
  40. # vcf2maf
  41. # perl ${vcf2maf_path}/vcf2maf.pl \
  42. # --input-vcf ${sample_id}.PASS.vcf2maf.vcf --output-maf ${basename}.maf \
  43. # --tumor-id ${tumor_id} --normal-id ${normal_id} \
  44. # --ref-fasta ${ref_dir}/${fasta} \
  45. # --vep-path ${vep_path} \
  46. # --vep-data ${cache} \
  47. # --ncbi-build ${ncbi_build} \
  48. # --species ${species} \
  49. # --vep-fork $nt
  50. # vep
  51. # perl ${vep_path}/vep \
  52. # --input_file ${sample_id}.vcf --output_file ${basename}.PASS.vep.vcf \
  53. # --fasta ${ref_dir}/${fasta} \
  54. # --dir ${cache} \
  55. # --assembly ${ncbi_build} \
  56. # --species ${species} \
  57. # --fork $nt \
  58. # --format vcf --vcf \
  59. # --no_progress \
  60. # --no_stats \
  61. # $buffer_size \
  62. # --sift b \
  63. # --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
  64. # vcf2vcf: transfer into a standardized format
  65. perl ${vcf2maf_path}/vcf2vcf.pl \
  66. --input-vcf ${sample_id}.vcf --output-vcf ${basename}.norm.vcf \
  67. $SAMPLE \
  68. --ref-fasta ${ref_dir}/${fasta}
  69. # VEP annotation
  70. perl ${vep_path}/vep --format vcf --vcf \
  71. --assembly ${ncbi_build} \
  72. --species ${species} \
  73. --everything --af_exac \
  74. --offline \
  75. --cache --dir_cache ${cache} \
  76. --fasta ${ref_dir}/${fasta} \
  77. $buffer_size \
  78. --input_file ${basename}.norm.vcf --output_file ${basename}.vep.vcf
  79. # vcf2maf
  80. perl ${vcf2maf_path}/vcf2maf.pl \
  81. --inhibit-vep \
  82. --input-vcf ${basename}.vep.vcf --output-maf ${basename}.maf \
  83. $SAMPLE \
  84. --ref-fasta ${ref_dir}/${fasta} \
  85. --ncbi-build ${ncbi_build} \
  86. --species ${species} \
  87. --vep-fork $nt
  88. >>>
  89. runtime {
  90. docker: docker
  91. cluster: cluster_config
  92. systemDisk: "cloud_ssd 40"
  93. dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
  94. }
  95. output {
  96. File vep_vcf = "${basename}.vep.vcf"
  97. File maf = "${basename}.maf"
  98. }
  99. }