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