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.

67 lines
1.9KB

  1. task spladder_quantification {
  2. String sample_id
  3. File bam
  4. File pickle
  5. File merge_graphs
  6. File count_hdf5
  7. File reference_gtf_file
  8. File samples
  9. String spladder_docker
  10. String spladder_cluster
  11. String disk_size
  12. command <<<
  13. set -o pipefail
  14. set -e
  15. mkdir -p ${sample_id}/spladder_out/spladder
  16. ln -s ${bam}/*.bam ./
  17. cat ${samples} | while read a; do ls ./ | grep bam$ | grep $a; done > alignment.txt
  18. ln -s ${bam}/*.bai ./
  19. cat ${samples} | while read a; do ls ./ | grep bai$ | grep $a; done > alignment_bai.txt
  20. ln -s ${pickle}/*.pickle ${sample_id}/spladder_out/spladder/
  21. cat ${samples} | while read a; do ls ${sample_id}/spladder_out/spladder/| grep pickle$| grep $a; done >> pickle.txt
  22. cp -r ${merge_graphs} ${sample_id}/spladder_out/spladder/
  23. ln -s ${count_hdf5}/*.hdf5 ${sample_id}/spladder_out/spladder/
  24. cat ${samples} | while read a; do ls ${sample_id}/spladder_out/spladder/| grep hdf5$| grep $a; done >> count_hdf5.txt
  25. nt=$(nproc)
  26. spladder build -o ${sample_id}/spladder_out \
  27. --annotation ${reference_gtf_file} \
  28. --bams alignment.txt \
  29. --confidence 2 \
  30. --merge-strat merge_graphs \
  31. --readlen 150 \
  32. --parallel $nt \
  33. --quantify-graph --qmode collect
  34. find . -depth > fileList.txt
  35. >>>
  36. runtime {
  37. docker: spladder_docker
  38. cluster: spladder_cluster
  39. systemDisk: "cloud_ssd 50"
  40. dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
  41. }
  42. output {
  43. File fileList = "fileList.txt"
  44. File alignment = "alignment.txt"
  45. File alignment_bai = "alignment_bai.txt"
  46. File pickle_txt = "pickle.txt"
  47. File count_hdf5_txt = "count_hdf5.txt"
  48. Array[File] spladder = glob("${sample_id}/spladder_out/spladder/*")
  49. }
  50. }