Infer and visualize copy number from high-throughput DNA sequencing data.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

60 lines
2.1KB

  1. task batch {
  2. String sample_id
  3. Array[File] tumor_bam
  4. Array[File] tumor_bai
  5. Array[File] normal_bam
  6. Array[File] normal_bai
  7. File bed
  8. File faidx
  9. File fasta
  10. File? ref_flat
  11. File access_bed
  12. File? reference
  13. String method
  14. String segment_method
  15. String docker
  16. String cluster_config
  17. String disk_size
  18. String annotate_opt = if (ref_flat != "") then "--annotate ref_flat.txt" else ""
  19. String reference_opt = if (reference != "") then "--reference my_reference.cnn" else ""
  20. String access_opt = if (method == "amplicon") then "--access amplicon.bed" else "--access access-mappable.bed"
  21. command <<<
  22. set -o pipefail
  23. set -e
  24. mkdir -p /cromwell_root/tmp/cnvkit
  25. cp ${sep=' ' normal_bai} /cromwell_root/tmp/cnvkit
  26. cp ${sep=' ' tumor_bai} /cromwell_root/tmp/cnvkit
  27. # must exist parameters
  28. cp ${fasta} /cromwell_root/tmp/cnvkit/hg38.fa
  29. cp ${faidx} /cromwell_root/tmp/cnvkit/hg38.fai
  30. cp ${access_bed} /cromwell_root/tmp/cnvkit/access-mappable.bed
  31. # optional parameters
  32. if [ ${method} == "amplicon" ]; then cp ${bed} /cromwell_root/tmp/cnvkit/amplicon.bed; fi
  33. if [ ${ref_flat} != "" ]; then cp ${ref_flat} /cromwell_root/tmp/cnvkit/ref_flat.txt; fi
  34. if [ ${reference} != "" ]; then cp ${reference} /cromwell_root/tmp/cnvkit/my_reference.cnn; fi
  35. cd /cromwell_root/tmp/cnvkit
  36. mkdir results
  37. cnvkit.py batch ${sep=' ' tumor_bam} --normal ${sep=' ' normal_bam} \
  38. --method ${method} --segment-method ${segment_method} \
  39. --targets ${bed} ${access_opt} ${annotate_opt} \
  40. --fasta hg38.fa ${reference_opt} \
  41. --output-reference ${sample_id}.reference.cnn \
  42. --output-dir ./results/ \
  43. --drop-low-coverage --diagram --scatter
  44. >>>
  45. runtime {
  46. docker: docker
  47. cluster: cluster_config
  48. systemDisk: "cloud_ssd 40"
  49. dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
  50. }
  51. output {
  52. File reference_cnn = "${sample_id}.reference.cnn"
  53. Array[File] results = glob("/cromwell_root/tmp/cnvkit/results/*")
  54. }
  55. }