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.

81 line
2.0KB

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