kkonganti@1
|
1 // Help text for fastp within CPIPES.
|
kkonganti@1
|
2
|
kkonganti@1
|
3 def fastpHelp(params) {
|
kkonganti@1
|
4
|
kkonganti@1
|
5 Map tool = [:]
|
kkonganti@1
|
6 Map toolspecs = [:]
|
kkonganti@1
|
7 tool.text = [:]
|
kkonganti@1
|
8 tool.helpparams = [:]
|
kkonganti@1
|
9
|
kkonganti@1
|
10 toolspecs = [
|
kkonganti@1
|
11 'fastp_run': [
|
kkonganti@1
|
12 clihelp: 'Run fastp tool. Default: ' +
|
kkonganti@1
|
13 (params.fastp_run ?: false),
|
kkonganti@1
|
14 cliflag: null,
|
kkonganti@1
|
15 clivalue: null
|
kkonganti@1
|
16 ],
|
kkonganti@1
|
17 'fastp_failed_out': [
|
kkonganti@1
|
18 clihelp: 'Specify whether to store reads that cannot pass the filters. ' +
|
kkonganti@1
|
19 "Default: ${params.fastp_failed_out}",
|
kkonganti@1
|
20 cliflag: null,
|
kkonganti@1
|
21 clivalue: null
|
kkonganti@1
|
22 ],
|
kkonganti@1
|
23 'fastp_merged_out': [
|
kkonganti@1
|
24 clihelp: 'Specify whether to store merged output or not. ' +
|
kkonganti@1
|
25 "Default: ${params.fastp_merged_out}",
|
kkonganti@1
|
26 cliflag: null,
|
kkonganti@1
|
27 clivalue: null
|
kkonganti@1
|
28 ],
|
kkonganti@1
|
29 'fastp_overlapped_out': [
|
kkonganti@1
|
30 clihelp: 'For each read pair, output the overlapped region if it has no mismatched base. ' +
|
kkonganti@1
|
31 "Default: ${params.fastp_overlapped_out}",
|
kkonganti@1
|
32 cliflag: '--overlapped_out',
|
kkonganti@1
|
33 clivalue: (params.fastp_overlapped_out ?: '')
|
kkonganti@1
|
34 ],
|
kkonganti@1
|
35 'fastp_6': [
|
kkonganti@1
|
36 clihelp: "Indicate that the input is using phred64 scoring (it'll be converted to phred33, " +
|
kkonganti@1
|
37 'so the output will still be phred33). ' +
|
kkonganti@1
|
38 "Default: ${params.fastp_6}",
|
kkonganti@1
|
39 cliflag: '-6',
|
kkonganti@1
|
40 clivalue: (params.fastp_6 ? ' ' : '')
|
kkonganti@1
|
41 ],
|
kkonganti@1
|
42 'fastp_reads_to_process': [
|
kkonganti@1
|
43 clihelp: 'Specify how many reads/pairs are to be processed. Default value 0 means ' +
|
kkonganti@1
|
44 'process all reads. ' +
|
kkonganti@1
|
45 "Default: ${params.fastp_reads_to_process}",
|
kkonganti@1
|
46 cliflag: '--reads_to_process',
|
kkonganti@1
|
47 clivalue: (params.fastp_reads_to_process ?: '')
|
kkonganti@1
|
48 ],
|
kkonganti@1
|
49 'fastp_fix_mgi_id': [
|
kkonganti@1
|
50 clihelp: 'The MGI FASTQ ID format is not compatible with many BAM operation tools, ' +
|
kkonganti@1
|
51 'enable this option to fix it. ' +
|
kkonganti@1
|
52 "Default: ${params.fastp_fix_mgi_id}",
|
kkonganti@1
|
53 cliflag: '--fix_mgi_id',
|
kkonganti@1
|
54 clivalue: (params.fastp_fix_mgi_id ? ' ' : '')
|
kkonganti@1
|
55 ],
|
kkonganti@1
|
56 'fastp_A': [
|
kkonganti@1
|
57 clihelp: 'Disable adapter trimming. On by default. ' +
|
kkonganti@1
|
58 "Default: ${params.fastp_A}",
|
kkonganti@1
|
59 cliflag: '-A',
|
kkonganti@1
|
60 clivalue: (params.fastp_A ? ' ' : '')
|
kkonganti@1
|
61 ],
|
kkonganti@1
|
62 'fastp_adapter_fasta': [
|
kkonganti@1
|
63 clihelp: 'Specify a FASTA file to trim both read1 and read2 (if PE) by all the sequences ' +
|
kkonganti@1
|
64 'in this FASTA file. ' +
|
kkonganti@1
|
65 "Default: ${params.fastp_adapter_fasta}",
|
kkonganti@1
|
66 cliflag: '--adapter_fasta',
|
kkonganti@1
|
67 clivalue: (params.fastp_adapter_fasta ?: '')
|
kkonganti@1
|
68 ],
|
kkonganti@1
|
69 'fastp_f': [
|
kkonganti@1
|
70 clihelp: 'Trim how many bases in front of read1. ' +
|
kkonganti@1
|
71 "Default: ${params.fastp_f}",
|
kkonganti@1
|
72 cliflag: '-f',
|
kkonganti@1
|
73 clivalue: (params.fastp_f ?: '')
|
kkonganti@1
|
74 ],
|
kkonganti@1
|
75 'fastp_t': [
|
kkonganti@1
|
76 clihelp: 'Trim how many bases at the end of read1. ' +
|
kkonganti@1
|
77 "Default: ${params.fastp_t}",
|
kkonganti@1
|
78 cliflag: '-t',
|
kkonganti@1
|
79 clivalue: (params.fastp_t ?: '')
|
kkonganti@1
|
80 ],
|
kkonganti@1
|
81 'fastp_b': [
|
kkonganti@1
|
82 clihelp: 'Max length of read1 after trimming. ' +
|
kkonganti@1
|
83 "Default: ${params.fastp_b}",
|
kkonganti@1
|
84 cliflag: '-b',
|
kkonganti@1
|
85 clivalue: (params.fastp_b ?: '')
|
kkonganti@1
|
86 ],
|
kkonganti@1
|
87 'fastp_F': [
|
kkonganti@1
|
88 clihelp: 'Trim how many bases in front of read2. ' +
|
kkonganti@1
|
89 "Default: ${params.fastp_F}",
|
kkonganti@1
|
90 cliflag: '-F',
|
kkonganti@1
|
91 clivalue: (params.fastp_F ?: '')
|
kkonganti@1
|
92 ],
|
kkonganti@1
|
93 'fastp_T': [
|
kkonganti@1
|
94 clihelp: 'Trim how many bases at the end of read2. ' +
|
kkonganti@1
|
95 "Default: ${params.fastp_T}",
|
kkonganti@1
|
96 cliflag: '-T',
|
kkonganti@1
|
97 clivalue: (params.fastp_T ?: '')
|
kkonganti@1
|
98 ],
|
kkonganti@1
|
99 'fastp_B': [
|
kkonganti@1
|
100 clihelp: 'Max length of read2 after trimming. ' +
|
kkonganti@1
|
101 "Default: ${params.fastp_B}",
|
kkonganti@1
|
102 cliflag: '-B',
|
kkonganti@1
|
103 clivalue: (params.fastp_B ?: '')
|
kkonganti@1
|
104 ],
|
kkonganti@1
|
105 'fastp_dedup': [
|
kkonganti@1
|
106 clihelp: 'Enable deduplication to drop the duplicated reads/pairs. ' +
|
kkonganti@1
|
107 "Default: ${params.fastp_dedup}",
|
kkonganti@1
|
108 cliflag: '--dedup',
|
kkonganti@1
|
109 clivalue: (params.fastp_dedup ? ' ' : '')
|
kkonganti@1
|
110 ],
|
kkonganti@1
|
111 'fastp_dup_calc_accuracy': [
|
kkonganti@1
|
112 clihelp: 'Accuracy level to calculate duplication (1~6), higher level uses more memory ' +
|
kkonganti@1
|
113 '(1G, 2G, 4G, 8G, 16G, 24G). Default 1 for no-dedup mode, and 3 for dedup mode. ' +
|
kkonganti@1
|
114 "Default: ${params.fastp_dup_calc_accuracy}",
|
kkonganti@1
|
115 cliflag: '--dup_calc_accuracy',
|
kkonganti@1
|
116 clivalue: (params.fastp_dup_calc_accuracy ?: '')
|
kkonganti@1
|
117 ],
|
kkonganti@1
|
118 'fastp_poly_g_min_len': [
|
kkonganti@1
|
119 clihelp: 'The minimum length to detect polyG in the read tail. ' +
|
kkonganti@1
|
120 "Default: ${params.fastp_poly_g_min_len}",
|
kkonganti@1
|
121 cliflag: '--poly_g_min_len',
|
kkonganti@1
|
122 clivalue: (params.fastp_poly_g_min_len ?: '')
|
kkonganti@1
|
123 ],
|
kkonganti@1
|
124 'fastp_G': [
|
kkonganti@1
|
125 clihelp: 'Disable polyG tail trimming. ' +
|
kkonganti@1
|
126 "Default: ${params.fastp_G}",
|
kkonganti@1
|
127 cliflag: '-G',
|
kkonganti@1
|
128 clivalue: (params.fastp_G ? ' ' : '')
|
kkonganti@1
|
129 ],
|
kkonganti@1
|
130 'fastp_x': [
|
kkonganti@1
|
131 clihelp: "Enable polyX trimming in 3' ends. " +
|
kkonganti@1
|
132 "Default: ${params.fastp_x}",
|
kkonganti@1
|
133 cliflag: 'x=',
|
kkonganti@1
|
134 clivalue: (params.fastp_x ? ' ' : '')
|
kkonganti@1
|
135 ],
|
kkonganti@1
|
136 'fastp_poly_x_min_len': [
|
kkonganti@1
|
137 clihelp: 'The minimum length to detect polyX in the read tail. ' +
|
kkonganti@1
|
138 "Default: ${params.fastp_poly_x_min_len}",
|
kkonganti@1
|
139 cliflag: '--poly_x_min_len',
|
kkonganti@1
|
140 clivalue: (params.fastp_poly_x_min_len ?: '')
|
kkonganti@1
|
141 ],
|
kkonganti@1
|
142 'fastp_cut_front': [
|
kkonganti@1
|
143 clihelp: "Move a sliding window from front (5') to tail, drop the bases in the window " +
|
kkonganti@1
|
144 'if its mean quality < threshold, stop otherwise. ' +
|
kkonganti@1
|
145 "Default: ${params.fastp_cut_front}",
|
kkonganti@1
|
146 cliflag: '--cut_front',
|
kkonganti@1
|
147 clivalue: (params.fastp_cut_front ? ' ' : '')
|
kkonganti@1
|
148 ],
|
kkonganti@1
|
149 'fastp_cut_tail': [
|
kkonganti@1
|
150 clihelp: "Move a sliding window from tail (3') to front, drop the bases in the window " +
|
kkonganti@1
|
151 'if its mean quality < threshold, stop otherwise. ' +
|
kkonganti@1
|
152 "Default: ${params.fastp_cut_tail}",
|
kkonganti@1
|
153 cliflag: '--cut_tail',
|
kkonganti@1
|
154 clivalue: (params.fastp_cut_tail ? ' ' : '')
|
kkonganti@1
|
155 ],
|
kkonganti@1
|
156 'fastp_cut_right': [
|
kkonganti@1
|
157 clihelp: "Move a sliding window from tail, drop the bases in the window and the right part " +
|
kkonganti@1
|
158 'if its mean quality < threshold, and then stop. ' +
|
kkonganti@1
|
159 "Default: ${params.fastp_cut_right}",
|
kkonganti@1
|
160 cliflag: '--cut_right',
|
kkonganti@1
|
161 clivalue: (params.fastp_cut_right ? ' ' : '')
|
kkonganti@1
|
162 ],
|
kkonganti@1
|
163 'fastp_W': [
|
kkonganti@1
|
164 clihelp: "Sliding window size shared by --fastp_cut_front, --fastp_cut_tail and " +
|
kkonganti@1
|
165 '--fastp_cut_right. ' +
|
kkonganti@1
|
166 "Default: ${params.fastp_W}",
|
kkonganti@1
|
167 cliflag: '--cut_window_size',
|
kkonganti@1
|
168 clivalue: (params.fastp_W ?: '')
|
kkonganti@1
|
169 ],
|
kkonganti@1
|
170 'fastp_M': [
|
kkonganti@1
|
171 clihelp: "The mean quality requirement shared by --fastp_cut_front, --fastp_cut_tail and " +
|
kkonganti@1
|
172 '--fastp_cut_right. ' +
|
kkonganti@1
|
173 "Default: ${params.fastp_M}",
|
kkonganti@1
|
174 cliflag: '--cut_mean_quality',
|
kkonganti@1
|
175 clivalue: (params.fastp_M ?: '')
|
kkonganti@1
|
176 ],
|
kkonganti@1
|
177 'fastp_q': [
|
kkonganti@1
|
178 clihelp: 'The quality value below which a base should is not qualified. ' +
|
kkonganti@1
|
179 "Default: ${params.fastp_q}",
|
kkonganti@1
|
180 cliflag: '-q',
|
kkonganti@1
|
181 clivalue: (params.fastp_q ?: '')
|
kkonganti@1
|
182 ],
|
kkonganti@1
|
183 'fastp_u': [
|
kkonganti@1
|
184 clihelp: 'What percent of bases are allowed to be unqualified. ' +
|
kkonganti@1
|
185 "Default: ${params.fastp_u}",
|
kkonganti@1
|
186 cliflag: '-u',
|
kkonganti@1
|
187 clivalue: (params.fastp_u ?: '')
|
kkonganti@1
|
188 ],
|
kkonganti@1
|
189 'fastp_n': [
|
kkonganti@1
|
190 clihelp: "How many N's can a read have. " +
|
kkonganti@1
|
191 "Default: ${params.fastp_n}",
|
kkonganti@1
|
192 cliflag: '-n',
|
kkonganti@1
|
193 clivalue: (params.fastp_n ?: '')
|
kkonganti@1
|
194 ],
|
kkonganti@1
|
195 'fastp_e': [
|
kkonganti@1
|
196 clihelp: "If the full reads' average quality is below this value, then it is discarded. " +
|
kkonganti@1
|
197 "Default: ${params.fastp_e}",
|
kkonganti@1
|
198 cliflag: '-e',
|
kkonganti@1
|
199 clivalue: (params.fastp_e ?: '')
|
kkonganti@1
|
200 ],
|
kkonganti@1
|
201 'fastp_l': [
|
kkonganti@1
|
202 clihelp: 'Reads shorter than this length will be discarded. ' +
|
kkonganti@1
|
203 "Default: ${params.fastp_l}",
|
kkonganti@1
|
204 cliflag: '-l',
|
kkonganti@1
|
205 clivalue: (params.fastp_l ?: '')
|
kkonganti@1
|
206 ],
|
kkonganti@1
|
207 'fastp_max_len': [
|
kkonganti@1
|
208 clihelp: 'Reads longer than this length will be discarded. ' +
|
kkonganti@1
|
209 "Default: ${params.fastp_max_len}",
|
kkonganti@1
|
210 cliflag: '--length_limit',
|
kkonganti@1
|
211 clivalue: (params.fastp_max_len ?: '')
|
kkonganti@1
|
212 ],
|
kkonganti@1
|
213 'fastp_y': [
|
kkonganti@1
|
214 clihelp: 'Enable low complexity filter. The complexity is defined as the percentage ' +
|
kkonganti@1
|
215 'of bases that are different from its next base (base[i] != base[i+1]). ' +
|
kkonganti@1
|
216 "Default: ${params.fastp_y}",
|
kkonganti@1
|
217 cliflag: '-y',
|
kkonganti@1
|
218 clivalue: (params.fastp_y ? ' ' : '')
|
kkonganti@1
|
219 ],
|
kkonganti@1
|
220 'fastp_Y': [
|
kkonganti@1
|
221 clihelp: 'The threshold for low complexity filter (0~100). Ex: A value of 30 means ' +
|
kkonganti@1
|
222 '30% complexity is required. ' +
|
kkonganti@1
|
223 "Default: ${params.fastp_Y}",
|
kkonganti@1
|
224 cliflag: '-Y',
|
kkonganti@1
|
225 clivalue: (params.fastp_Y ?: '')
|
kkonganti@1
|
226 ],
|
kkonganti@1
|
227 'fastp_U': [
|
kkonganti@1
|
228 clihelp: 'Enable Unique Molecular Identifier (UMI) pre-processing. ' +
|
kkonganti@1
|
229 "Default: ${params.fastp_U}",
|
kkonganti@1
|
230 cliflag: '-U',
|
kkonganti@1
|
231 clivalue: (params.fastp_U ? ' ' : '')
|
kkonganti@1
|
232 ],
|
kkonganti@1
|
233 'fastp_umi_loc': [
|
kkonganti@1
|
234 clihelp: 'Specify the location of UMI, can be one of ' +
|
kkonganti@1
|
235 'index1/index2/read1/read2/per_index/per_read. ' +
|
kkonganti@1
|
236 "Default: ${params.fastp_umi_loc}",
|
kkonganti@1
|
237 cliflag: '--umi_loc',
|
kkonganti@1
|
238 clivalue: (params.fastp_umi_loc ?: '')
|
kkonganti@1
|
239 ],
|
kkonganti@1
|
240 'fastp_umi_len': [
|
kkonganti@1
|
241 clihelp: 'If the UMI is in read1 or read2, its length should be provided. ' +
|
kkonganti@1
|
242 "Default: ${params.fastp_umi_len}",
|
kkonganti@1
|
243 cliflag: '--umi_len',
|
kkonganti@1
|
244 clivalue: (params.fastp_umi_len ?: '')
|
kkonganti@1
|
245 ],
|
kkonganti@1
|
246 'fastp_umi_prefix': [
|
kkonganti@1
|
247 clihelp: 'If specified, an underline will be used to connect prefix and UMI ' +
|
kkonganti@1
|
248 '(i.e. prefix=UMI, UMI=AATTCG, final=UMI_AATTCG). ' +
|
kkonganti@1
|
249 "Default: ${params.fastp_umi_prefix}",
|
kkonganti@1
|
250 cliflag: '--umi_prefix',
|
kkonganti@1
|
251 clivalue: (params.fastp_umi_prefix ?: '')
|
kkonganti@1
|
252 ],
|
kkonganti@1
|
253 'fastp_umi_skip': [
|
kkonganti@1
|
254 clihelp: 'If the UMI is in read1 or read2, fastp can skip several bases following the UMI. ' +
|
kkonganti@1
|
255 "Default: ${params.fastp_umi_skip}",
|
kkonganti@1
|
256 cliflag: '--umi_skip',
|
kkonganti@1
|
257 clivalue: (params.fastp_umi_skip ?: '')
|
kkonganti@1
|
258 ],
|
kkonganti@1
|
259 'fastp_p': [
|
kkonganti@1
|
260 clihelp: 'Enable overrepresented sequence analysis. ' +
|
kkonganti@1
|
261 "Default: ${params.fastp_p}",
|
kkonganti@1
|
262 cliflag: '-p',
|
kkonganti@1
|
263 clivalue: (params.fastp_p ? ' ' : '')
|
kkonganti@1
|
264 ],
|
kkonganti@1
|
265 'fastp_P': [
|
kkonganti@1
|
266 clihelp: 'One in this many number of reads will be computed for overrepresentation analysis ' +
|
kkonganti@1
|
267 '(1~10000), smaller is slower. ' +
|
kkonganti@1
|
268 "Default: ${params.fastp_P}",
|
kkonganti@1
|
269 cliflag: '-P',
|
kkonganti@1
|
270 clivalue: (params.fastp_P ?: '')
|
kkonganti@1
|
271 ]
|
kkonganti@1
|
272 ]
|
kkonganti@1
|
273
|
kkonganti@1
|
274 toolspecs.each {
|
kkonganti@1
|
275 k, v -> tool.text['--' + k] = "${v.clihelp}"
|
kkonganti@1
|
276 tool.helpparams[k] = [ cliflag: "${v.cliflag}", clivalue: v.clivalue ]
|
kkonganti@1
|
277 }
|
kkonganti@1
|
278
|
kkonganti@1
|
279 return tool
|
kkonganti@1
|
280 } |