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.

76 lines
1.9KB

  1. task cnvkit{
  2. String sample_id
  3. File ref_dir
  4. String? fasta
  5. File ref_flat
  6. File bed_file
  7. String center_at
  8. File tumor_bam
  9. File tumor_bam_index
  10. File? normal_bam
  11. File? normal_bam_index
  12. String docker
  13. String cluster_config
  14. String disk_size
  15. String sample=basename(tumor_bam,".bam")
  16. command <<<
  17. set -o pipefail
  18. set -e
  19. nt=$(nproc)
  20. echo ${sample}
  21. if [ ${normal_bam} ]; then
  22. /root/miniconda2/bin/cnvkit.py batch ${tumor_bam} \
  23. --normal ${normal_bam} \
  24. --method wgs \
  25. --fasta ${ref_dir} \
  26. --annotate ${ref_flat} -p $nt \
  27. --drop-low-coverage \
  28. --output-dir ${sample}.reference.cnn
  29. else
  30. /root/miniconda2/bin/cnvkit.py batch ${tumor_bam} \
  31. --method wgs \
  32. --fasta ${ref_dir} \
  33. --annotate ${ref_flat} -p $nt \
  34. --drop-low-coverage \
  35. --output-dir ${sample}.reference.cnn
  36. fi
  37. ls ./
  38. /root/miniconda2/bin/cnvkit.py batch ${tumor_bam} \
  39. -r ${sample}.reference.cnn/reference.cnn \
  40. --output-dir ${sample}.cns \
  41. -p $nt
  42. ls ./
  43. /root/miniconda2/bin/cnvkit.py call ${sample}.cns/${sample}.cns --center-at ${center_at} \
  44. -o ${sample}.call.cns
  45. ls ./
  46. tar cvf ${sample}.tar ${sample}*
  47. >>>
  48. runtime{
  49. docker:docker
  50. cluster:cluster_config
  51. systemDisk:"cloud_ssd 40"
  52. dataDisk:"cloud_ssd " + disk_size + " /cromwell_root/"
  53. timeout:259200
  54. }
  55. output{
  56. File out_file = "${sample}.tar"
  57. #File cnv_bed = "${sample}.ratio_cnv.call.filter.bed"
  58. }
  59. }