用于miRNA-seq二代测序数据分析
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.

ReadStats.wdl 1.9KB

6 anos atrás
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. task ReadStats {
  2. String sample_ID
  3. File in_log_trimAdatper
  4. File in_log_readFilter
  5. File in_log_align_mature
  6. String cluster_config
  7. String disk_size
  8. command <<<
  9. set -o pipefail
  10. set -e
  11. Total_input=$(cat ${in_log_trimAdatper} | grep 'total reads' | head -n 1 | cut -d ':' -f 2 | sed 's/ //g')
  12. Pass_trimAdatper=$(cat ${in_log_trimAdatper} | grep 'reads passed filter' | tail -n 1 | cut -d ':' -f 2 | sed 's/ //g')
  13. Adapter_dimer=$(bc<<<$Total_input-$Pass_trimAdatper)
  14. Too_short=$(cat ${in_log_readFilter} | grep 'too short' | tail -n 1 | cut -d ':' -f 2 | sed 's/ //g')
  15. Low_quality_singleBase=$(cat ${in_log_readFilter} | grep 'low quality' | head -n 1 | cut -d ':' -f 2 | sed 's/ //g')
  16. Low_quality_tooManyN=$(cat ${in_log_readFilter} | grep 'too many N' | head -n 1 | cut -d ':' -f 2 | sed 's/ //g')
  17. Low_quality=$(bc<<<$Low_quality_singleBase+$Low_quality_tooManyN)
  18. ForAlign=$(cat ${in_log_readFilter} | grep 'reads passed filter' | head -n 1 | cut -d ':' -f 2 | sed 's/ //g')
  19. Align_miRNA_mature=$(cat ${in_log_align_mature} | grep 'at least one reported alignment' | head -n 1 | cut -d ':' -f 2 | cut -d '(' -f 1 | sed 's/ //g')
  20. echo -e "Stage\tReadCount" > ${sample_ID}.readStats
  21. echo -e "Total Input\t$Total_input" >> ${sample_ID}.readStats
  22. echo -e "Adapter Dimer\t$Adapter_dimer" >> ${sample_ID}.readStats
  23. echo -e "Too Short\t$Too_short" >> ${sample_ID}.readStats
  24. echo -e "Low Quality\t$Low_quality" >> ${sample_ID}.readStats
  25. echo -e "For Align\t$ForAlign" >> ${sample_ID}.readStats
  26. echo -e "Mature miRNA\t$Align_miRNA_mature" >> ${sample_ID}.readStats
  27. >>>
  28. runtime {
  29. cluster: cluster_config
  30. systemDisk: "cloud_ssd 40"
  31. dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
  32. }
  33. output {
  34. File out="${sample_ID}.readStats"
  35. }
  36. }