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.

84 linhas
2.4KB

  1. task cnvkit_multi{
  2. String sample_id
  3. File ref_dir
  4. String? fasta
  5. File ref_flat
  6. File? bed_file
  7. String? Ploidy
  8. File tumor_bam
  9. File tumor_bam_index
  10. Array[File]? normal_bams
  11. Array[File]? normal_bam_indexs
  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. echo ${sep=" " normal_bams}
  22. echo ${Ploidy}
  23. center=`awk -v vv=${Ploidy} 'BEGIN {print log(2/vv)/log(2)}'`
  24. echo $center
  25. /usr/local/bin/cnvkit.py target ${bed_file} --annotate ${ref_flat} --split --short-names -o my_baits.bed
  26. /usr/local/bin/cnvkit.py batch ${tumor_bam} \
  27. --normal ${sep=" " normal_bams} \
  28. --targets my_baits.bed \
  29. --fasta ${ref_dir} \
  30. --annotate ${ref_flat} -p $nt \
  31. --drop-low-coverage \
  32. --output-dir ${sample}.reference.cnn
  33. ls ./
  34. /usr/local/bin/cnvkit.py batch ${tumor_bam} \
  35. -r ${sample}.reference.cnn/reference.cnn \
  36. --output-dir ${sample}.cns \
  37. -p $nt
  38. ls ./
  39. /usr/local/bin/cnvkit.py call ${sample}.cns/${sample}.cns --center-at $center \
  40. -o ${sample}.call.cns
  41. # Plot the results
  42. /usr/local/bin/cnvkit.py scatter ${sample}.cns/${sample}.cnr -s ${sample}.call.cns -o ${sample}.scatter.pdf
  43. /usr/local/bin/cnvkit.py diagram ${sample}.cns/${sample}.cnr -s ${sample}.call.cns -o ${sample}.diagram.pdf
  44. /usr/local/bin/cnvkit.py heatmap ${sample}.cns/${sample}.cnr ${sample}.call.cns -o ${sample}.heatmap.pdf
  45. #gain and loss
  46. /usr/local/bin/cnvkit.py export vcf ${sample}.call.cns -y -i "${sample}" -o ${sample}.call.cns.vcf
  47. tar cvf ${sample}.tar ${sample}*
  48. >>>
  49. runtime{
  50. docker:docker
  51. cluster:cluster_config
  52. systemDisk:"cloud_ssd 40"
  53. dataDisk:"cloud_ssd " + disk_size + " /cromwell_root/"
  54. timeout:259200
  55. }
  56. output{
  57. File out_file = "${sample}.tar"
  58. File cnv_bed = "${sample}.call.cns.vcf"
  59. }
  60. }