from fastq to bam files
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.

il y a 3 ans
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 disk_size
  10. String umi_loc
  11. Int trim_front1
  12. Int trim_tail1
  13. Int max_len1
  14. Int trim_front2
  15. Int trim_tail2
  16. Int max_len2
  17. Int disable_adapter_trimming
  18. Int length_required
  19. Int umi_len
  20. Int UMI
  21. Int qualified_quality_phred
  22. Int length_required1
  23. Int disable_quality_filtering
  24. command <<<
  25. mkdir -p /cromwell_root/tmp/fastp/
  26. ##1.Disable_quality_filtering
  27. if [ "${disable_quality_filtering}" == 0 ]
  28. then
  29. cp ${read1} /cromwell_root/tmp/fastp/{sample_id}_R1.fastq.tmp1.gz
  30. cp ${read2} /cromwell_root/tmp/fastp/{sample_id}_R2.fastq.tmp1.gz
  31. else
  32. 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
  33. fi
  34. ##2.UMI
  35. if [ "${UMI}" == 0 ]
  36. then
  37. cp /cromwell_root/tmp/fastp/${sample_id}_R1.fastq.tmp1.gz /cromwell_root/tmp/fastp/${sample_id}_R1.fastq.tmp2.gz
  38. cp /cromwell_root/tmp/fastp/${sample_id}_R2.fastq.tmp1.gz /cromwell_root/tmp/fastp/${sample_id}_R2.fastq.tmp2.gz
  39. else
  40. 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
  41. fi
  42. ##3.Trim
  43. if [ "${disable_adapter_trimming}" == 0 ]
  44. then
  45. 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
  46. else
  47. cp /cromwell_root/tmp/fastp/${sample_id}_R1.fastq.tmp2.gz ${sample_id}_R1.fastq.gz
  48. cp /cromwell_root/tmp/fastp/${sample_id}_R2.fastq.tmp2.gz ${sample_id}_R2.fastq.gz
  49. fi
  50. >>>
  51. runtime {
  52. docker: docker
  53. cluster: cluster
  54. systemDisk: "cloud_ssd 40"
  55. dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
  56. }
  57. output {
  58. File json = "${sample_id}.json"
  59. File report = "${sample_id}.html"
  60. File Trim_R1 = "${sample_id}_R1.fastq.gz"
  61. File Trim_R2 = "${sample_id}_R2.fastq.gz"
  62. }
  63. }