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

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