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.

87 lines
2.3KB

  1. task TNseq {
  2. String sample
  3. String SENTIEON_INSTALL_DIR
  4. String SENTIEON_LICENSE
  5. File tumor_recaled_bam
  6. File tumor_recaled_bam_index
  7. File tumor_recal_table
  8. File normal_recaled_bam
  9. File normal_recaled_bam_index
  10. File normal_recal_table
  11. String tumor_name
  12. String normal_name
  13. File ref_dir
  14. String fasta
  15. File germline_resource
  16. File germline_resource_tbi
  17. File? regions
  18. Int? interval_padding
  19. File? pon_vcf
  20. String docker
  21. String cluster_config
  22. String disk_size
  23. command <<<
  24. set -o pipefail
  25. set -e
  26. export SENTIEON_LICENSE=${SENTIEON_LICENSE}
  27. nt=$(nproc)
  28. if [ ${regions} ]; then
  29. INTERVAL="--interval ${regions} --interval_padding ${interval_padding}"
  30. else
  31. INTERVAL=""
  32. fi
  33. if [ ${pon_vcf} ]; then
  34. PON="--pon ${pon_vcf}"
  35. ${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${pon_vcf}
  36. else
  37. PON=""
  38. fi
  39. ${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt \
  40. -r ${ref_dir}/${fasta} $INTERVAL \
  41. -i ${tumor_recaled_bam} -q ${tumor_recal_table} \
  42. -i ${normal_recaled_bam} -q ${normal_recal_table} \
  43. --algo TNhaplotyper2 \
  44. --tumor_sample ${tumor_name} --normal_sample ${normal_name} \
  45. --germline_vcf ${germline_resource} \
  46. $PON \
  47. ${sample}.TNseq.TN.tmp.vcf \
  48. --algo OrientationBias --tumor_sample ${tumor_name} \
  49. ${sample}.orientation \
  50. --algo ContaminationModel \
  51. --tumor_sample ${tumor_name} --normal_sample ${normal_name} \
  52. --vcf ${germline_resource} \
  53. --tumor_segments ${sample}.contamination.segments \
  54. ${sample}.contamination
  55. sentieon driver -r REFERENCE \
  56. --algo TNfilter \
  57. --tumor_sample ${tumor_name} --normal_sample ${normal_name} \
  58. -v ${sample}.TNseq.TN.tmp.vcf \
  59. --contamination ${sample}.contamination \
  60. --tumor_segments ${sample}.contamination.segments \
  61. --orientation_priors ${sample}.orientation \
  62. ${sample}.TNseq.TN.vcf
  63. >>>
  64. runtime {
  65. docker: docker
  66. cluster: cluster_config
  67. systemDisk: "cloud_ssd 40"
  68. dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
  69. }
  70. output {
  71. File TNseq_vcf = "${sample}.TNseq.TN.vcf"
  72. File TNseq_vcf_index = "${sample}.TNseq.TN.vcf.idx"
  73. File contamination = "${sample}.contamination"
  74. File contamination_segments = "${sample}.contamination.segments"
  75. File orientation = "${sample}.orientation"
  76. }
  77. }