You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
2.0KB

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