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

62 lines
2.0KB

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