-
Notifications
You must be signed in to change notification settings - Fork 17
/
02-trim-pe.cwl
137 lines (137 loc) · 3.92 KB
/
02-trim-pe.cwl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#!/usr/bin/env cwl-runner
class: Workflow
cwlVersion: v1.0
doc: 'STARR-seq 02 trimming - reads: PE'
requirements:
- class: ScatterFeatureRequirement
- class: StepInputExpressionRequirement
- class: InlineJavascriptRequirement
inputs:
input_fastq_read1_files:
doc: Input read 1 fastq files
type: File[]
input_read1_adapters_files:
doc: Input read 1 adapters files
type: File[]
input_fastq_read2_files:
doc: Input read 2 fastq files
type: File[]
input_read2_adapters_files:
doc: Input read 2 adapters files
type: File[]
nthreads:
default: 1
doc: Number of threads
type: int
trimmomatic_java_opts:
doc: JVM arguments should be a quoted, space separated list
type: string?
quality_score:
default: -phred33
type: string
trimmomatic_jar_path:
default: /usr/share/java/trimmomatic.jar
doc: Trimmomatic Java jar file
type: string
outputs:
output_data_fastq_read1_trimmed_files:
doc: Trimmed fastq files for paired read 1
type: File[]
outputSource: trimmomatic/output_read1_trimmed_file
output_trimmed_read1_fastq_read_count:
doc: Trimmed read counts of paired read 1 fastq files
type: File[]
outputSource: count_fastq_reads_read1/output_read_count
output_data_fastq_read2_trimmed_files:
doc: Trimmed fastq files for paired read 2
type: File[]
outputSource: trimmomatic/output_read2_trimmed_paired_file
output_trimmed_read2_fastq_read_count:
doc: Trimmed read counts of paired read 2 fastq files
type: File[]
outputSource: count_fastq_reads_read2/output_read_count
steps:
concat_adapters:
run: ../utils/concat-files.cwl
scatterMethod: dotproduct
scatter:
- input_file1
- input_file2
in:
input_file1: input_read1_adapters_files
input_file2: input_read2_adapters_files
out:
- output_file
trimmomatic:
run: ../trimmomatic/trimmomatic.cwl
scatterMethod: dotproduct
scatter:
- input_read1_fastq_file
- input_read2_fastq_file
- input_adapters_file
in:
input_read1_fastq_file: input_fastq_read1_files
input_read2_fastq_file: input_fastq_read2_files
input_adapters_file: concat_adapters/output_file
phred:
valueFrom: '33'
nthreads: nthreads
minlen:
valueFrom: ${return 15}
leading:
valueFrom: ${return 30}
trailing:
valueFrom: ${return 30}
slidingwindow:
valueFrom: 4:20
illuminaclip:
valueFrom: 2:15:10:1:TRUE
end_mode:
valueFrom: PE
java_opts: trimmomatic_java_opts
trimmomatic_jar_path: trimmomatic_jar_path
out:
- output_read1_trimmed_file
- output_read2_trimmed_paired_file
extract_basename_read1:
run: ../utils/basename.cwl
scatter: file_path
in:
file_path:
source: trimmomatic/output_read1_trimmed_file
valueFrom: $(self.basename)
sep:
valueFrom: '(\.fastq.gz|\.fastq)'
do_not_escape_sep:
valueFrom: ${return true}
out:
- basename
count_fastq_reads_read1:
run: ../utils/count-fastq-reads.cwl
scatterMethod: dotproduct
scatter:
- input_fastq_file
- input_basename
in:
input_basename: extract_basename_read1/basename
input_fastq_file: trimmomatic/output_read1_trimmed_file
out:
- output_read_count
extract_basename_read2:
run: ../utils/extract-basename.cwl
scatter: input_file
in:
input_file: trimmomatic/output_read2_trimmed_paired_file
out:
- output_basename
count_fastq_reads_read2:
run: ../utils/count-fastq-reads.cwl
scatterMethod: dotproduct
scatter:
- input_fastq_file
- input_basename
in:
input_basename: extract_basename_read2/output_basename
input_fastq_file: trimmomatic/output_read2_trimmed_paired_file
out:
- output_read_count