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.

32 line
730B

  1. task samtools {
  2. File sam
  3. String base = basename(sam, ".sam")
  4. String bam = base + ".bam"
  5. String sorted_bam = base + ".sorted.bam"
  6. String sorted_bam_index = base + ".sorted.bam.bai"
  7. String docker
  8. String cluster
  9. command <<<
  10. set -o pipefail
  11. set -e
  12. /opt/conda/bin/samtools view -bS ${sam} > ${bam}
  13. /opt/conda/bin/samtools sort -m 1000000000 ${bam} -o ${sorted_bam}
  14. /opt/conda/bin/samtools index ${sorted_bam}
  15. >>>
  16. runtime {
  17. docker: docker
  18. cluster: cluster
  19. systemDisk: "cloud_ssd 40"
  20. dataDisk: "cloud_ssd 200 /cromwell_root/"
  21. }
  22. output {
  23. File out_bam = sorted_bam
  24. File out_bam_index = sorted_bam_index
  25. }
  26. }