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.

77 lines
2.3KB

  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 hg
  12. String species
  13. Boolean only_pass
  14. String vcf2maf_path
  15. String docker
  16. String cluster_config
  17. String disk_size
  18. command <<<
  19. set -o pipefail
  20. set -e
  21. nt=$(nproc)
  22. if [ only_pass ]; then
  23. awk -F'\t' '{if(($1~"^#")||($1!~"^#" && $7=="PASS")){print $0}}' ${vcf} > ${sample_id}.INPUT.vcf
  24. else
  25. cp ${vcf} ${sample_id}.INPUT.vcf
  26. fi
  27. # Define ncbi_build
  28. if [ hg == "hg19" ]; then
  29. ncbi_build="GRCh37"
  30. elif [ hg == "hg38" ]; then
  31. ncbi_build="GRCh38"
  32. fi
  33. # Extract the BND variants from VCF
  34. awk -F'\t' '{if(($1~"^#")||($8!~".*SVTYPE=BND.*")){print $0}}' ${sample_id}.INPUT.vcf > ${sample_id}.INPUT.vcf2maf.vcf
  35. awk -F'\t' '{if(($1~"^#")||($8~".*SVTYPE=BND.*")){print $0}}' ${sample_id}.INPUT.vcf > ${sample_id}.INPUT.VEP.vcf
  36. # vcf2maf
  37. perl ${vcf2maf_path}/vcf2maf.pl \
  38. --input-vcf ${sample_id}.INPUT.vcf2maf.vcf --output-maf ${basename}.maf \
  39. --tumor-id ${tumor_id} --normal-id ${normal_id} \
  40. --ref-fasta ${ref_dir}/${fasta} \
  41. --vep-path ${vep_path} \
  42. --vep-data ${cache} \
  43. --ncbi-build $ncbi_build \
  44. --species ${species} \
  45. --vep-fork $nt
  46. # vep: only annotate the BND
  47. perl ${vep_path}/vep \
  48. --input_file ${sample_id}.INPUT.VEP.vcf --output_file ${basename}.BND.VEP.txt \
  49. --fasta ${ref_dir}/${fasta} \
  50. --dir ${cache} \
  51. --assembly $ncbi_build \
  52. --species ${species} \
  53. --fork $nt \
  54. --no_progress --no_stats --buffer_size 5000 --sift b --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 --tab --flag_pick_allele --pick_order canonical,tsl,biotype,rank,ccds,length --format vcf --force_overwrite --offline --pubmed --regulatory
  55. >>>
  56. runtime {
  57. docker: docker
  58. cluster: cluster_config
  59. systemDisk: "cloud_ssd 40"
  60. dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
  61. }
  62. output {
  63. File input_vcf = "${sample_id}.INPUT.vcf"
  64. File maf = "${basename}.${hg}.maf"
  65. File bnd_vep = "${basename}.BND.VEP.txt"
  66. }
  67. }