Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

85 lines
2.5KB

  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. center=`awk -v vv=${center_at} 'BEGIN {print log(2/vv)/log(2)}'`
  22. echo $center
  23. if [ ${normal_bam} ]; then
  24. /root/miniconda2/bin/cnvkit.py batch ${tumor_bam} \
  25. --normal ${normal_bam} \
  26. --method wgs \
  27. --fasta ${ref_dir} \
  28. --annotate ${ref_flat} -p $nt \
  29. --drop-low-coverage \
  30. --output-dir ${sample}.reference.cnn
  31. else
  32. /root/miniconda2/bin/cnvkit.py access ${ref_dir} -o access.bed
  33. # Prepare the target bed
  34. #/root/miniconda2/bin/cnvkit.py --annotate ${ref_flat} --split --short-names -o my_baits.bed
  35. /root/miniconda2/bin/cnvkit.py autobin ${tumor_bam} --method wgs -g access.bed
  36. /root/miniconda2/bin/cnvkit.py coverage ${tumor_bam} ${sample}.target.bed -o ${sample}.T.targetcoverage.cnn
  37. /root/miniconda2/bin/cnvkit.py coverage ${tumor_bam} ${sample}.antitarget.bed -o ${sample}.T.antitargetcoverage.cnn
  38. /root/miniconda2/bin/cnvkit.py reference -o ${sample}.reference.cnn/reference.cnn -f ${ref_dir} -t ${sample}.target.bed -a ${sample}.antitarget.bed
  39. fi
  40. ls ./
  41. /root/miniconda2/bin/cnvkit.py batch ${tumor_bam} \
  42. -r ${sample}.reference.cnn/reference.cnn \
  43. --output-dir ${sample}.cns \
  44. -p $nt
  45. ls ./
  46. /root/miniconda2/bin/cnvkit.py call ${sample}.cns/${sample}.cns --center-at $center \
  47. -o ${sample}.call.cns
  48. ls ./
  49. tar cvf ${sample}.tar ${sample}*
  50. >>>
  51. runtime{
  52. docker:docker
  53. cluster:cluster_config
  54. systemDisk:"cloud_ssd 40"
  55. dataDisk:"cloud_ssd " + disk_size + " /cromwell_root/"
  56. timeout:259200
  57. }
  58. output{
  59. File out_file = "${sample}.tar"
  60. #File cnv_bed = "${sample}.ratio_cnv.call.filter.bed"
  61. }
  62. }