From fastq to lncRNA profile.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

67 lignes
3.1KB

  1. task fastp {
  2. String sample_id
  3. File read1
  4. File read2
  5. String adapter_sequence
  6. String adapter_sequence_r2
  7. String docker
  8. String cluster
  9. String umi_loc
  10. Int trim_front1
  11. Int trim_tail1
  12. Int max_len1
  13. Int trim_front2
  14. Int trim_tail2
  15. Int max_len2
  16. Int disable_adapter_trimming
  17. Int length_required
  18. Int umi_len
  19. Int UMI
  20. Int qualified_quality_phred
  21. Int length_required1
  22. Int disable_quality_filtering
  23. command <<<
  24. mkdir -p /cromwell_root/tmp/fastp/
  25. ##1.Disable_quality_filtering
  26. if [ "${disable_quality_filtering}" == 0 ]
  27. then
  28. cp ${read1} /cromwell_root/tmp/fastp/{sample_id}_R1.fastq.tmp1.gz
  29. cp ${read2} /cromwell_root/tmp/fastp/{sample_id}_R2.fastq.tmp1.gz
  30. else
  31. fastp --thread 4 --trim_front1 ${trim_front1} --trim_tail1 ${trim_tail1} --max_len1 ${max_len1} --trim_front2 ${trim_front2} --trim_tail2 ${trim_tail2} --max_len2 ${max_len2} -i ${read1} -I ${read2} -o /cromwell_root/tmp/fastp/${sample_id}_R1.fastq.tmp1.gz -O /cromwell_root/tmp/fastp/${sample_id}_R2.fastq.tmp1.gz -j ${sample_id}.json -h ${sample_id}.html
  32. fi
  33. ##2.UMI
  34. if [ "${UMI}" == 0 ]
  35. then
  36. cp /cromwell_root/tmp/fastp/${sample_id}_R1.fastq.tmp1.gz /cromwell_root/tmp/fastp/${sample_id}_R1.fastq.tmp2.gz
  37. cp /cromwell_root/tmp/fastp/${sample_id}_R2.fastq.tmp1.gz /cromwell_root/tmp/fastp/${sample_id}_R2.fastq.tmp2.gz
  38. else
  39. fastp --thread 4 -U --umi_loc=${umi_loc} --umi_len=${umi_len} --trim_front1 ${trim_front1} --trim_tail1 ${trim_tail1} --max_len1 ${max_len1} --trim_front2 ${trim_front2} --trim_tail2 ${trim_tail2} --max_len2 ${max_len2} -i /cromwell_root/tmp/fastp/${sample_id}_R1.fastq.tmp1.gz -I /cromwell_root/tmp/fastp/${sample_id}_R2.fastq.tmp1.gz -o /cromwell_root/tmp/fastp/${sample_id}_R1.fastq.tmp2.gz -O /cromwell_root/tmp/fastp/${sample_id}_R2.fastq.tmp2.gz -j ${sample_id}.json -h ${sample_id}.html
  40. fi
  41. ##3.Trim
  42. if [ "${disable_adapter_trimming}" == 0 ]
  43. then
  44. fastp --thread 4 -l ${length_required} -q ${qualified_quality_phred} -u ${length_required1} --adapter_sequence ${adapter_sequence} --adapter_sequence_r2 ${adapter_sequence_r2} --detect_adapter_for_pe --trim_front1 ${trim_front1} --trim_tail1 ${trim_tail1} --max_len1 ${max_len1} --trim_front2 ${trim_front2} --trim_tail2 ${trim_tail2} --max_len2 ${max_len2} -i /cromwell_root/tmp/fastp/${sample_id}_R1.fastq.tmp2.gz -I /cromwell_root/tmp/fastp/${sample_id}_R2.fastq.tmp2.gz -o ${sample_id}_R1.fastq.gz -O ${sample_id}_R2.fastq.gz -j ${sample_id}.json -h ${sample_id}.html
  45. else
  46. cp /cromwell_root/tmp/fastp/${sample_id}_R1.fastq.tmp2.gz ${sample_id}_R1.fastq.gz
  47. cp /cromwell_root/tmp/fastp/${sample_id}_R2.fastq.tmp2.gz ${sample_id}_R2.fastq.gz
  48. fi
  49. >>>
  50. runtime {
  51. docker: docker
  52. cluster: cluster
  53. systemDisk: "cloud_ssd 40"
  54. dataDisk: "cloud_ssd 200 /cromwell_root/"
  55. }
  56. output {
  57. File json = "${sample_id}.json"
  58. File report = "${sample_id}.html"
  59. File Trim_R1 = "${sample_id}_R1.fastq.gz"
  60. File Trim_R2 = "${sample_id}_R2.fastq.gz"
  61. }
  62. }