No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

63 líneas
2.2KB

  1. task fastp {
  2. File read
  3. String sample_id=sub(basename(read), "\\.(fastq|fq)\\.gz$", "")
  4. String adapter_sequence
  5. String adapter_sequence_r2
  6. String docker
  7. String cluster
  8. String disk_size
  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 ${read} /cromwell_root/tmp/fastp/{sample_id}.fastq.tmp1.gz
  29. else
  30. 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
  31. fi
  32. ##2.UMI
  33. if [ "${UMI}" == 0 ]
  34. then
  35. cp /cromwell_root/tmp/fastp/${sample_id}.fastq.tmp1.gz /cromwell_root/tmp/fastp/${sample_id}.fastq.tmp2.gz
  36. else
  37. 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
  38. fi
  39. ##3.Trim
  40. if [ "${disable_adapter_trimming}" == 0 ]
  41. then
  42. fastp --thread 4 -l ${length_required} -q ${qualified_quality_phred} -u ${length_required1} --adapter_sequence ${adapter_sequence} --trim_front1 ${trim_front1} --trim_tail1 ${trim_tail1} --max_len1 ${max_len1} -i /cromwell_root/tmp/fastp/${sample_id}.fastq.tmp2.gz -o ${sample_id}.fastq.gz -j ${sample_id}.json -h ${sample_id}.html
  43. else
  44. cp /cromwell_root/tmp/fastp/${sample_id}.fastq.tmp2.gz ${sample_id}.fastq.gz
  45. fi
  46. >>>
  47. runtime {
  48. docker: docker
  49. cluster: cluster
  50. systemDisk: "cloud_ssd 40"
  51. dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
  52. }
  53. output {
  54. File json = "${sample_id}.json"
  55. File report = "${sample_id}.html"
  56. File Trim = "${sample_id}.fastq.gz"
  57. }
  58. }