VEP (Variant Effect Predictor) predicts the functional effects of genomic variants. The annotated VCF will be converted into MAF based on vcf2maf.
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

VEP.wdl 2.2KB

3年前
3年前
3年前
3年前
3年前
3年前
3年前
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. task VEP {
  2. File vcf
  3. String sample_id
  4. String basename = basename(vcf,".vcf")
  5. File ref_dir
  6. String fasta
  7. String vep_path
  8. File cache
  9. String ncbi_build
  10. String species
  11. String vcf2maf_path
  12. String docker
  13. String cluster_config
  14. String disk_size
  15. command <<<
  16. set -o pipefail
  17. set -e
  18. nt=$(nproc)
  19. source /etc/profile
  20. awk -F'\t' '{if(($1~"^#")||($1!~"^#" && $7=="PASS")){print $0}}' ${vcf} > ${sample_id}.vcf
  21. # Judge the SAMPLE info of vcf file
  22. tumor_id=`awk -F'\t' '{if($1~"^#CHROM"){print $10}}' ${vcf}`
  23. normal_id=`awk -F'\t' '{if($1~"^#CHROM"){print $11}}' ${vcf}`
  24. if [ $normal_id ]; then
  25. SAMPLE_vcf2maf="--tumor-id $tumor_id --normal-id $normal_id"
  26. SAMPLE_vcf2vcf="--vcf-tumor-id $tumor_id --vcf-normal-id $normal_id"
  27. else
  28. SAMPLE_vcf2maf="--tumor-id $tumor_id"
  29. SAMPLE_vcf2vcf="--vcf-tumor-id $tumor_id"
  30. fi
  31. # Set the buffer_size based on the data size
  32. nrow=`awk -F'\t' '{if($1~"^chr"){print $0}}' ${sample_id}.vcf | wc -l`
  33. if [ $nrow -lt 5000 ]; then
  34. buffer_size="--buffer_size 5000"
  35. else
  36. buffer_size="--buffer_size 1000"
  37. fi
  38. # vcf2vcf: transfer into a standardized format
  39. perl ${vcf2maf_path}/vcf2vcf.pl \
  40. --input-vcf ${sample_id}.vcf --output-vcf ${basename}.norm.vcf \
  41. $SAMPLE_vcf2vcf \
  42. --ref-fasta ${ref_dir}/${fasta}
  43. # VEP annotation
  44. perl ${vep_path}/vep --format vcf --vcf \
  45. --assembly ${ncbi_build} \
  46. --species ${species} \
  47. --everything --af_exac \
  48. --offline \
  49. --cache --dir_cache ${cache} \
  50. --fasta ${ref_dir}/${fasta} \
  51. $buffer_size \
  52. --input_file ${basename}.norm.vcf --output_file ${basename}.vep.vcf
  53. # vcf2maf
  54. perl ${vcf2maf_path}/vcf2maf.pl \
  55. --inhibit-vep \
  56. --input-vcf ${basename}.vep.vcf --output-maf ${basename}.maf \
  57. $SAMPLE_vcf2maf \
  58. --ref-fasta ${ref_dir}/${fasta} \
  59. --ncbi-build ${ncbi_build} \
  60. --species ${species} \
  61. --vep-fork $nt
  62. >>>
  63. runtime {
  64. docker: docker
  65. cluster: cluster_config
  66. systemDisk: "cloud_ssd 40"
  67. dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
  68. }
  69. output {
  70. File norm_vcf = "${basename}.norm.vcf"
  71. File vep_vcf = "${basename}.vep.vcf"
  72. File maf = "${basename}.maf"
  73. }
  74. }