Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

65 lines
1.8KB

  1. task cnvkit{
  2. String sample
  3. File ref_dir
  4. String fasta
  5. File ref_flat
  6. File tumor_bam
  7. File tumor_bam_index
  8. File? normal_bam
  9. File? normal_bam_index
  10. String docker
  11. String cluster_config
  12. String disk_size
  13. command <<
  14. set -o pipefail
  15. set -e
  16. cnvkit.py batch ${tumor_bam} \
  17. -n ${normal_bam} \
  18. -m wgs \
  19. -f ${ref_dir}/${fasta} \
  20. --annotate ${ref_flat}
  21. cnvkit.py scatter ${sample}.cnr \
  22. -s ${sample}.cns \
  23. -o ${sample}_scatter.pdf
  24. cnvkit.py diagram ${sample}.cnr \
  25. -s ${sample}.call.cns \
  26. -o ${sample}.diagram.pdf
  27. cnvkit.py heatmap ${sample}.cnr ${sample}.call.cns \
  28. -o ${sample}.heatmap.pdf
  29. cnvkit.py genemetrics ${sample}.cnr -t 0.2 -m 3 -o ${sample}.ratio_cnv.txt
  30. cnvkit.py genemetrics ${sample}.cnr -s ${sample}.call.cns -t 0.2 -m 3 -o ${sample}.segment_cnv.txt
  31. cat WGS_IL_T_1.ratio_cnv.txt | tail -n+2 | cut -f1 | sort | uniq > ratio_cnv.txt
  32. cat ${sample}.segment_cnv.txt | tail -n+2 | cut -f1 | sort | uniq > segment_cnv.txt
  33. comm -12 ratio_cnv.txt segment_cnv.txt > ${sample}.trusted_genes.txt
  34. awk 'NR==FNR {a[$1]=$2;next} NR!=FNR {if(FNR == 1 || (FNR != 1 && $1 in a)) print $0}' ${sample}.trusted_genes.txt WGS_IL_T_1.ratio_cnv.txt > ${sample}.ratio_cnv.trusted.txt
  35. cnvkit.py call ${sample}.ratio_cnv.trusted.txt -m threshold -o ${sample}.ratio_cnv.call.txt
  36. awk '{if ($6 != 2) print $0}' ${sample}.ratio_cnv.call.txt > ${sample}.ratio_cnv.call.filter.txt
  37. ls ./
  38. tar cvf ${sample}.tar ./
  39. >>
  40. runtime{
  41. docker:docker
  42. cluster:cluster_config
  43. systemDisk:"cloud_ssd 40"
  44. dataDisk:"cloud_ssd " + disk_size + " /cromwell_root/"
  45. }
  46. output{
  47. File out_file = "${sample}.tar"
  48. }
  49. }