Infer and visualize copy number from high-throughput DNA sequencing data.
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

64 linhas
2.1KB

  1. task batch {
  2. String sample_id
  3. Array[File] tumor_bam
  4. Array[File] normal_bam
  5. Array[File] bam_index
  6. File bed
  7. File faidx
  8. File fasta
  9. File? ref_flat
  10. File access_bed
  11. File? reference
  12. String method
  13. String segment_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 target.bed" else "--access access-mappable.bed"
  20. command <<<
  21. set -o pipefail
  22. set -e
  23. nt=$(nproc)
  24. mkdir -p /cromwell_root/tmp/cnvkit
  25. cp -r ${sep=" " bam_index} /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 ${bed} /cromwell_root/tmp/cnvkit/target.bed
  30. cp ${access_bed} /cromwell_root/tmp/cnvkit/access-mappable.bed
  31. # optional parameters
  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 -p $nt ${sep=' ' tumor_bam} --normal ${sep=' ' normal_bam} \
  37. --method ${method} --segment-method ${segment_method} \
  38. --targets target.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. cp ${sample_id}.reference.cnn ~/${sample_id}.reference.cnn
  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. }