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.

89 line
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? regions
  17. Int? interval_padding
  18. File? pon_vcf
  19. String docker
  20. String cluster_config
  21. String disk_size
  22. command <<<
  23. set -o pipefail
  24. set -e
  25. export SENTIEON_LICENSE=${SENTIEON_LICENSE}
  26. nt=$(nproc)
  27. if [ ${regions} ]; then
  28. INTERVAL="--interval ${regions} --interval_padding ${interval_padding}"
  29. else
  30. INTERVAL=""
  31. fi
  32. if [ ${pon_vcf} ]; then
  33. PON="--pon ${pon_vcf}"
  34. ${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex ${pon_vcf}
  35. else
  36. PON=""
  37. fi
  38. ${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt \
  39. -r ${ref_dir}/${fasta} $INTERVAL \
  40. -i ${tumor_recaled_bam} -q ${tumor_recal_table} \
  41. -i ${normal_recaled_bam} -q ${normal_recal_table} \
  42. --algo TNhaplotyper2 \
  43. --tumor_sample ${tumor_name} --normal_sample ${normal_name} \
  44. --germline_vcf ${germline_resource} \
  45. $PON \
  46. ${sample}.TNseq.TN.tmp.vcf \
  47. --algo OrientationBias --tumor_sample ${tumor_name} \
  48. ${sample}.orientation \
  49. --algo ContaminationModel \
  50. --tumor_sample ${tumor_name} --normal_sample ${normal_name} \
  51. --vcf ${germline_resource} \
  52. --tumor_segments ${sample}.contamination.segments \
  53. ${sample}.contamination
  54. sentieon driver -r REFERENCE \
  55. --algo TNfilter \
  56. --tumor_sample ${tumor_name} --normal_sample ${normal_name} \
  57. -v ${sample}.TNseq.TN.tmp.vcf \
  58. --contamination ${sample}.contamination \
  59. --tumor_segments ${sample}.contamination.segments \
  60. --orientation_priors ${sample}.orientation \
  61. ${sample}.TNseq.TN.vcf
  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 TNseq_vcf = "${sample}.TNseq.TN.vcf"
  71. File TNseq_vcf_index = "${sample}.TNseq.TN.vcf.idx"
  72. File contamination = "${sample}.contamination"
  73. File contamination_segments = "${sample}.contamination.segments"
  74. File orientation = "${sample}.orientation"
  75. }
  76. }