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.

62 lines
1.8KB

  1. task TNscope {
  2. File ref_dir
  3. File dbsnp_dir
  4. String sample
  5. String SENTIEON_INSTALL_DIR
  6. String SENTIEON_LICENSE
  7. String tumor_name
  8. String normal_name
  9. String docker
  10. String cluster_config
  11. String fasta
  12. File? corealigner_bam
  13. File? corealigner_bam_index
  14. File tumor_recaled_bam
  15. File tumor_recaled_bam_index
  16. String dbsnp
  17. String disk_size
  18. Boolean set_pon
  19. String? cosmic_vcf
  20. File? cosmic_dir
  21. File? pon_vcf
  22. String pon_command = if set_pon then "--pon /cromwell_root/tmp/PON/$(basename ${pon_vcf}) --cosmic /cromwell_root/tmp/PON/${cosmic_vcf}" else ""
  23. Boolean TN = if defined(corealigner_bam) then true else false
  24. command <<<
  25. set -o pipefail
  26. set -e
  27. export SENTIEON_LICENSE=${SENTIEON_LICENSE}
  28. nt=$(nproc)
  29. mkdir -p /cromwell_root/tmp/PON/
  30. cp ${cosmic_dir}/${cosmic_vcf} /cromwell_root/tmp/PON/
  31. cp ${pon_vcf} /cromwell_root/tmp/PON/
  32. ${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex /cromwell_root/tmp/PON/${cosmic_vcf}
  33. ${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex /cromwell_root/tmp/PON/$(basename ${pon_vcf})
  34. if ${TN}; then
  35. ${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt -r ${ref_dir}/${fasta} -i ${corealigner_bam} --algo TNscope --tumor_sample ${tumor_name} --normal_sample ${normal_name} --dbsnp ${dbsnp_dir}/${dbsnp} ${pon_command} ${sample}.TNscope.TN.vcf
  36. else
  37. ${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt -r ${ref_dir}/${fasta} -i ${tumor_recaled_bam} --algo TNscope --tumor_sample ${tumor_name} --dbsnp ${dbsnp_dir}/${dbsnp} ${pon_command} ${sample}.TNscope.TN.vcf
  38. fi
  39. >>>
  40. runtime {
  41. docker: docker
  42. cluster: cluster_config
  43. systemDisk: "cloud_ssd 40"
  44. dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
  45. }
  46. output {
  47. File TNscope_vcf= "${sample}.TNscope.TN.vcf"
  48. File TNscope_vcf_index = "${sample}.TNscope.TN.vcf.idx"
  49. }
  50. }