使用fastp对fastq文件进行质控, 使用fastqscreen对污染源进行检测
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

96 行
2.2KB

  1. version 1.0
  2. workflow fastp {
  3. input{
  4. Array[String] samples
  5. File fastq_dir
  6. }
  7. scatter (sample_id in samples){
  8. call pair_end{
  9. input:
  10. in1 = fastq_dir+'/'+sample_id+'_1.fastq',
  11. in2 = fastq_dir+'/'+sample_id+'_2.fastq',
  12. sample_id = sample_id
  13. }
  14. }
  15. # output {
  16. # File clean_out1 = pair_end.out1
  17. # File clean_out2 = pair_end.out2
  18. # File html_report = pair_end.html_report
  19. # File json_report = pair_end.json_report
  20. # }
  21. }
  22. task pair_end {
  23. input {
  24. # I/O options
  25. File in1
  26. File in2
  27. String sample_id
  28. Boolean? phred64 = false
  29. Boolean? fix_mgi_id = false
  30. String? adapter_sequence
  31. String? adapter_sequence_r2
  32. Int? reads_to_process # specify how many reads/pairs to be processed. Default 0 means process all reads.
  33. # reporting options
  34. String json = sample_id+"fastp.json"
  35. String html = sample_id+"fastp.html"
  36. String report_title = "\'fastp report\'"
  37. # excute env
  38. Int cpu = 2
  39. String memory = "4G"
  40. String disks = "local-disk 50 cloud_ssd"
  41. }
  42. String out1_name = sample_id+'clean_1.fastq'
  43. String out2_name = sample_id+'clean_2.fastq'
  44. command <<<
  45. # basic command
  46. /opt/conda/bin/fastp \
  47. --in1 ~{in1} \
  48. --in2 ~{in2} \
  49. --out1 ~{out1_name} \
  50. --out2 ~{out2_name} \
  51. --json ~{json} \
  52. --html ~{html} \
  53. --report_title ~{report_title} \
  54. # options
  55. ~{ true="--phred64 " false="" phred64 } \
  56. ~{ "--reads_to_process " + reads_to_process } \
  57. ~{ true="--fix_mgi_id " false="" fix_mgi_id } \
  58. ~{ "--adapter_sequence " + adapter_sequence } \
  59. ~{ "--adapter_sequence_r2 " + adapter_sequence_r2 }
  60. >>>
  61. runtime {
  62. cpu: cpu
  63. memory: memory
  64. disks: disks
  65. docker: "registry-vpc.cn-shanghai.aliyuncs.com/easygene/fastp:v0.20.1_cv1"
  66. }
  67. output {
  68. File out1 = out1_name
  69. File out2 = out2_name
  70. File json_report = json
  71. File html_report = html
  72. }
  73. }