comparison cutadapt/macros.xml @ 1:b4479aea41df draft

Uploaded
author jackcurragh
date Wed, 13 Apr 2022 09:38:42 +0000
parents
children
comparison
equal deleted inserted replaced
0:60b449221e6a 1:b4479aea41df
1 <macros>
2 <token name="@TOOL_VERSION@">3.7</token>
3 <token name="@VERSION_SUFFIX@">0</token>
4 <token name="@FASTQ_TYPES@">fastq.gz,fastq,fasta</token>
5 <xml name="edam_ontology">
6 <edam_topics>
7 <edam_topic>topic_0632</edam_topic>
8 </edam_topics>
9 <edam_operations>
10 <edam_operation>operation_0231</edam_operation>
11 </edam_operations>
12 </xml>
13 <xml name="requirements">
14 <requirements>
15 <requirement type="package" version="@TOOL_VERSION@">cutadapt</requirement>
16 </requirements>
17 </xml>
18 <xml name="citations">
19 <citations>
20 <citation type="doi">10.14806/ej.17.1.200</citation>
21 </citations>
22 </xml>
23 <xml name="xrefs">
24 <xrefs>
25 <xref type='bio.tools'>cutadapt</xref>
26 </xrefs>
27 </xml>
28 <token name="@read1_options@"><![CDATA[
29
30 ## Read1 trimming
31
32 #for $a in $library.r1.adapters
33 #if $a.adapter_source.adapter_source_list == 'builtin':
34 -a '${a.adapter_source.adapter.fields.name}'='${a.adapter_source.adapter}${adapter_options.internal}${a.single_noindels}'
35 #else if $a.adapter_source.adapter_source_list == 'file':
36 -a file:'${a.adapter_source.adapter_file}${adapter_options.internal}${a.single_noindels}'
37 #else if str($a.adapter_source.adapter_name) != "":
38 -a '${a.adapter_source.adapter_name}'='${a.adapter_source.adapter}${adapter_options.internal}${a.single_noindels}'
39 #else
40 -a '${a.adapter_source.adapter}${adapter_options.internal}${a.single_noindels}'
41 #end if
42 #end for
43 #for $aa in $library.r1.anywhere_adapters
44 #if $aa.anywhere_adapter_source.anywhere_adapter_source_list == 'builtin':
45 -b '${aa.anywhere_adapter_source.anywhere_adapter.fields.name}'='${aa.anywhere_adapter_source.anywhere_adapter}${aa.single_noindels}'
46 #else if $aa.anywhere_adapter_source.anywhere_adapter_source_list == 'file':
47 -b file:'${aa.anywhere_adapter_source.anywhere_adapter_file}${aa.single_noindels}'
48 #else if str($aa.anywhere_adapter_source.anywhere_adapter_name) != "":
49 -b '${aa.anywhere_adapter_source.anywhere_adapter_name}'='${aa.anywhere_adapter_source.anywhere_adapter}${aa.single_noindels}'
50 #else
51 -b '${aa.anywhere_adapter_source.anywhere_adapter}${aa.single_noindels}'
52 #end if
53 #end for
54 #for $fa in $library.r1.front_adapters
55 #if $fa.front_adapter_source.front_adapter_source_list == 'builtin':
56 -g '${fa.front_adapter_source.front_adapter.fields.name}'='${adapter_options.internal}${fa.front_adapter_source.front_adapter}${fa.single_noindels}'
57 #else if $fa.front_adapter_source.front_adapter_source_list == 'file':
58 -g file:'${adapter_options.internal}${fa.front_adapter_source.front_adapter_file}${fa.single_noindels}'
59 #else if str($fa.front_adapter_source.front_adapter_name) != "":
60 -g '${fa.front_adapter_source.front_adapter_name}'='${adapter_options.internal}${fa.front_adapter_source.front_adapter}${fa.single_noindels}'
61 #else
62 -g '${adapter_options.internal}${fa.front_adapter_source.front_adapter}${fa.single_noindels}'
63 #end if
64 #end for
65
66 #if str($library.r1.cut) != '0':
67 -u $library.r1.cut
68 #end if
69
70 ## Additional Outputs
71
72 #if 'info_file' in $output_selector:
73 --info-file=$info_file
74 #end if
75 #if 'rest_file' in $output_selector:
76 --rest-file='${rest_output}'
77 #end if
78 #if 'wildcard_file' in $output_selector:
79 --wildcard-file='${wild_output}'
80 #end if
81 #if 'too_short_file' in $output_selector:
82 --too-short-output='${too_short_output}'
83 #end if
84 #if 'too_long_file' in $output_selector:
85 --too-long-output='${too_long_output}'
86 #end if
87 #if 'untrimmed_file' in $output_selector:
88 --untrimmed-output='${untrimmed_output}'
89 #end if
90
91 ]]></token>
92
93 <token name="@read2_options@"><![CDATA[
94
95 ## Read2 trimming
96
97 #for $a in $library.r2.adapters2
98 #if $a.adapter_source2.adapter_source_list2 == 'builtin':
99 -A '${a.adapter_source2.adapter2.fields.name}'='${a.adapter_source2.adapter2}${adapter_options.internal}${a.single_noindels}'
100 #else if $a.adapter_source2.adapter_source_list2 == 'file':
101 -A file:'${a.adapter_source2.adapter_file2}${adapter_options.internal}${a.single_noindels}'
102 #else if str($a.adapter_source2.adapter_name2) != "":
103 -A '${a.adapter_source2.adapter_name2}'='${a.adapter_source2.adapter2}${adapter_options.internal}${a.single_noindels}'
104 #else
105 -A '${a.adapter_source2.adapter2}${adapter_options.internal}${a.single_noindels}'
106 #end if
107 #end for
108 #for $aa in $library.r2.anywhere_adapters2
109 #if $aa.anywhere_adapter_source2.anywhere_adapter_source_list2 == 'builtin':
110 -B '${aa.anywhere_adapter_source2.anywhere_adapter2.fields.name}'='${aa.anywhere_adapter_source2.anywhere_adapter2}${aa.single_noindels}'
111 #else if $aa.anywhere_adapter_source2.anywhere_adapter_source_list2 == 'file':
112 -B file:'${aa.anywhere_adapter_source2.anywhere_adapter_file2}${aa.single_noindels}'
113 #else if str($aa.anywhere_adapter_source2.anywhere_adapter_name2) != "":
114 -B '${aa.anywhere_adapter_source2.anywhere_adapter_name2}'='${aa.anywhere_adapter_source2.anywhere_adapter2}${aa.single_noindels}'
115 #else
116 -B '${aa.anywhere_adapter_source2.anywhere_adapter2}'
117 #end if
118 #end for
119 #for $fa in $library.r2.front_adapters2
120 #if $fa.front_adapter_source2.front_adapter_source_list2 == 'builtin':
121 -G '${fa.front_adapter_source2.front_adapter2.fields.name}'='${adapter_options.internal}${fa.front_adapter_source2.front_adapter2}${fa.single_noindels}'
122 #else if $fa.front_adapter_source2.front_adapter_source_list2 == 'file':
123 -G file:'${adapter_options.internal}${fa.front_adapter_source2.front_adapter_file2}${fa.single_noindels}'
124 #else if str($fa.front_adapter_source2.front_adapter_name2) != "":
125 -G '${fa.front_adapter_source2.front_adapter_name2}'='${adapter_options.internal}${fa.front_adapter_source2.front_adapter2}${fa.single_noindels}'
126 #else
127 -G '${adapter_options.internal}${fa.front_adapter_source2.front_adapter2}${fa.single_noindels}'
128 #end if
129 #end for
130
131 #if str($library.r2.cut2) != '0':
132 -U $library.r2.cut2
133 #end if
134
135 ## Additional Outputs - Read 2
136
137 #if 'too_short_file' in $output_selector:
138 --too-short-paired-output='${too_short_paired_output}'
139 #end if
140 #if 'too_long_file' in $output_selector:
141 --too-long-paired-output='${too_long_paired_output}'
142 #end if
143 #if 'untrimmed_file' in $output_selector:
144 --untrimmed-paired-output='${untrimmed_paired_output}'
145 #end if
146
147 ]]></token>
148
149 <xml name="adapter_sanitizer">
150 <sanitizer>
151 <valid initial="string.digits">
152 <add value="A"/><!--standard nucleotides-->
153 <add value="T"/>
154 <add value="C"/>
155 <add value="G"/>
156
157 <add value="U"/><!--ambiguous nucleotides-->
158 <add value="R"/>
159 <add value="Y"/>
160 <add value="S"/>
161 <add value="W"/>
162 <add value="K"/>
163 <add value="M"/>
164 <add value="B"/>
165 <add value="D"/>
166 <add value="H"/>
167 <add value="V"/>
168 <add value="N"/>
169
170 <add value="X"/><!-- don't match any nucleotide-->
171
172 <add value="{"/><!--specify repeats .. needs digits which are added as default-->
173 <add value="}"/>
174
175 <add value="^"/><!--anchoring-->
176 <add value="$"/>
177 <add value="."/>
178 <add value="("/><!--specify what to keep-->
179 <add value=")"/>
180
181 </valid>
182 </sanitizer>
183 </xml>
184
185 <xml name="adapter" token_name="" token_argument="" token_value="" token_label="">
186 <param name="@NAME@" argument="@ARGUMENT@" type="text" value="@VALUE@" label="@LABEL@">
187 <expand macro="adapter_sanitizer"/>
188 </param>
189 </xml>
190
191 <xml name="adapter_select" token_name="" token_argument="" token_label="">
192 <param name="@NAME@" argument="@ARGUMENT@" type="select" label="@LABEL@">
193 <options from_data_table="adapters">
194 <filter type="sort_by" column="1" />
195 </options>
196 <expand macro="adapter_sanitizer"/>
197 </param>
198 </xml>
199
200 <xml name="single_end_options" >
201
202 <section name="r1" title="Read 1 Options" expanded="True">
203
204 <repeat name="adapters" title="3' (End) Adapters" help="Sequence of an adapter ligated to the 3' end (paired data: of the first read). The adapter and subsequent bases are trimmed. If a '$' character is appended ('anchoring'), the adapter is only found if it is a suffix of the read. To search for a linked adapter, separate the 2 sequences with 3 dots (ADAPTER1...ADAPTER2), see Help below.">
205 <conditional name="adapter_source">
206 <param name="adapter_source_list" type="select" label="Source" >
207 <option value="builtin" selected="True">Standard (select from the list below)</option>
208 <option value="user">Enter custom sequence</option>
209 <option value="file">File from history</option>
210 </param>
211
212 <when value="user">
213 <param name="adapter_name" type="text" value="" optional="True" label="Enter custom 3' adapter name (Optional if Multiple output is 'No')" />
214 <expand macro="adapter" name="adapter" argument="-a" type="text" value="AATTGGCC" label="Enter custom 3' adapter sequence" />
215 </when>
216
217 <when value="builtin">
218 <expand macro="adapter_select" name="adapter" argument="-a" label="Choose 3' adapter"/>
219 </when>
220
221 <when value="file">
222 <param name="adapter_file" argument="-a" format="fasta" type="data" help="Should be of datatype FASTA" label="Choose file containing 3' adapters" />
223 </when>
224 </conditional>
225 <param name="single_noindels" type="boolean" truevalue=";noindels" falsevalue="" checked="false" label="Disallow indels for this adapter"/>
226 </repeat>
227
228 <repeat name="front_adapters" title="5' (Front) Adapters" help="Sequence of an adapter ligated to the 5' end (paired data: of the first read). The adapter and any preceding bases are trimmed. Partial matches at the 5' end are allowed. If a '^' character is prepended ('anchoring'), the adapter is only found if it is a prefix of the read. To search for a linked adapter, separate the 2 sequences with 3 dots (ADAPTER1...ADAPTER2), see Help below.">
229 <conditional name="front_adapter_source">
230 <param name="front_adapter_source_list" type="select" label="Source">
231 <option value="builtin" selected="True">Standard (select from the list below)</option>
232 <option value="user">Enter custom sequence</option>
233 <option value="file">File from history</option>
234 </param>
235
236 <when value="user">
237 <param name="front_adapter_name" type="text" value="" optional="True" label="Enter custom 5' adapter name (Optional if Multiple output is 'No')" />
238 <expand macro="adapter" name="front_adapter" argument="-g" value="AATTGGCC" label="Enter custom 5' adapter sequence" />
239 </when>
240 <when value="builtin">
241 <expand macro="adapter_select" name="front_adapter" argument="-g" label="Choose 5' adapter"/>
242 </when>
243 <when value="file">
244 <param name="front_adapter_file" argument="-g" format="fasta" type="data" help="Should be of datatype &quot;FASTA&quot;" label="Choose file containing 5' adapters" />
245 </when>
246 </conditional>
247 <param name="single_noindels" type="boolean" truevalue=";noindels" falsevalue="" checked="false" label="Disallow indels for this adapter"/>
248 </repeat>
249
250 <repeat name="anywhere_adapters" title="5' or 3' (Anywhere) Adapters" help="Sequence of an adapter that may be ligated to the 5' or 3' end (paired data: of the first read). Both types of matches as described under 3' und 5' Adapters are allowed. If the first base of the read is part of the match, the behavior is as with 5' Adapters, otherwise as with 3' Adapters. This option is mostly for rescuing failed library preparations - do not use if you know which end your adapter was ligated to!">
251 <conditional name="anywhere_adapter_source">
252 <param name="anywhere_adapter_source_list" type="select" label="Source">
253 <option value="builtin" selected="True">Standard (select from the list below)</option>
254 <option value="user">Enter custom sequence</option>
255 <option value="file">File from history</option>
256 </param>
257
258 <when value="user">
259 <param name="anywhere_adapter_name" type="text" value="" optional="True" label="Enter custom 5' or 3' adapter name (Optional if Multiple output is 'No')" />
260 <expand macro="adapter" name="anywhere_adapter" argument="-b" value="AATTGGCC" label="Enter custom 5' or 3' adapter sequence" />
261 </when>
262 <when value="builtin">
263 <expand macro="adapter_select" name="anywhere_adapter" argument="-b" label="Choose 5' or 3' adapter"/>
264 </when>
265 <when value="file">
266 <param name="anywhere_adapter_file" argument="-b" format="fasta" type="data" help="Should be of datatype &quot;FASTA&quot;" label="Choose file containing 3' or 5' adapters" />
267 </when>
268 </conditional>
269 <param name="single_noindels" type="boolean" truevalue=";noindels" falsevalue="" checked="false" label="Disallow indels for this adapter"/>
270 </repeat>
271
272 <param argument="--cut" type="integer" value="0" optional="True" label="Cut bases from reads before adapter trimming" help="Remove bases from each read (first read only if paired). If positive, remove bases from the beginning. If negative, remove bases from the end. This is applied *before* adapter trimming." />
273
274 </section>
275
276 </xml>
277
278 <xml name="paired_end_options" >
279
280 <!-- Read 1 Options -->
281 <expand macro="single_end_options" />
282
283 <!-- Read 2 Options -->
284 <section name="r2" title="Read 2 Options" expanded="True">
285
286 <repeat name="adapters2" title="3' (End) Adapters" help="Sequence of an adapter ligated to the 3' end of the second read in each pair. The adapter and subsequent bases are trimmed. If a '$' character is appended ('anchoring'), the adapter is only found if it is a suffix of the read. To search for a linked adapter, separate the 2 sequences with 3 dots (ADAPTER1...ADAPTER2), see Help below.">
287 <conditional name="adapter_source2">
288 <param name="adapter_source_list2" type="select" label="Source" >
289 <option value="builtin" selected="True">Standard (select from the list below)</option>
290 <option value="user">Enter custom sequence</option>
291 <option value="file">File from history</option>
292 </param>
293
294 <when value="user">
295 <param name="adapter_name2" type="text" value="" optional="True" label="Enter custom 3' adapter name (Optional)" />
296 <expand macro="adapter" name="adapter2" argument="-A" label="Enter custom 3' adapter sequence" value="AATTGGCC" />
297 </when>
298
299 <when value="builtin">
300 <expand macro="adapter_select" name="adapter2" argument="-A" label="Choose 3' adapter"/>
301 </when>
302 <when value="file">
303 <param name="adapter_file2" argument="-a" format="fasta" type="data" help="Should be of datatype &quot;FASTA&quot;" label="Choose file containing 3' adapters" />
304 </when>
305 </conditional>
306 <param name="single_noindels" type="boolean" truevalue=";noindels" falsevalue="" checked="false" label="Disallow indels for this adapter"/>
307 </repeat>
308
309 <repeat name="front_adapters2" title="5' (Front) Adapters" help="Sequence of an adapter ligated to the 5' end of the second read in each pair. The adapter and any preceding bases are trimmed. Partial matches at the 5' end are allowed. If a '^' character is prepended ('anchoring'), the adapter is only found if it is a prefix of the read. To search for a linked adapter, separate the 2 sequences with 3 dots (ADAPTER1...ADAPTER2), see Help below.">
310 <conditional name="front_adapter_source2">
311 <param name="front_adapter_source_list2" type="select" label="Source">
312 <option value="builtin" selected="True">Standard (select from the list below)</option>
313 <option value="user">Enter custom sequence</option>
314 <option value="file">File from history</option>
315 </param>
316
317 <when value="user">
318 <param name="front_adapter_name2" type="text" value="" label="Enter custom 5' adapter name (Optional)" />
319 <expand macro="adapter" name="front_adapter2" argument="-G" value="AATTGGCC" label="Enter custom 5' adapter sequence" />
320 </when>
321 <when value="builtin">
322 <expand macro="adapter_select" name="front_adapter2" argument="-G" label="Choose 5' adapter"/>
323 </when>
324 <when value="file">
325 <param name="front_adapter_file2" argument="-g" format="fasta" type="data" help="Should be of datatype &quot;FASTA&quot;" label="Choose file containing 5' adapters" />
326 </when>
327 </conditional>
328 <param name="single_noindels" type="boolean" truevalue=";noindels" falsevalue="" checked="false" label="Disallow indels for this adapter"/>
329 </repeat>
330
331 <repeat name="anywhere_adapters2" title="5' or 3' (Anywhere) Adapters" help="Sequence of an adapter that may be ligated to the 5' or 3' end of the second read in each pair. Both types of matches as described under under 3' und 5' Adapters are allowed. If the first base of the read is part of the match, the behavior is as with 5' Adapters, otherwise as with 3' Adapters. This option is mostly for rescuing failed library preparations - do not use if you know which end your adapter was ligated to!">
332 <conditional name="anywhere_adapter_source2">
333 <param name="anywhere_adapter_source_list2" type="select" label="Source">
334 <option value="builtin" selected="True">Standard (select from the list below)</option>
335 <option value="user">Enter custom sequence</option>
336 <option value="file">File from history</option>
337 </param>
338
339 <when value="user">
340 <param name="anywhere_adapter_name2" type="text" value="" optional="True" label="Enter custom 5' or 3' adapter name (Optional)" />
341 <expand macro="adapter" name="anywhere_adapter2" argument="-B" label="Enter custom 5' or 3' adapter sequence" value="AATTGGCC" />
342 </when>
343 <when value="builtin">
344 <expand macro="adapter_select" name="anywhere_adapter2" argument="-B" type="select" label="Choose 5' or 3' adapter"/>
345 </when>
346 <when value="file">
347 <param name="anywhere_adapter_file2" argument="-b" format="fasta" type="data" help="Should be of datatype &quot;FASTA&quot;" label="Choose file containing 3' or 5' adapters" />
348 </when>
349 </conditional>
350 <param name="single_noindels" type="boolean" truevalue=";noindels" falsevalue="" checked="false" label="Disallow indels for this adapter"/>
351 </repeat>
352
353 <param name="cut2" argument="-U" type="integer" value="0" optional="True" label="Cut bases from the second read in each pair." help="Remove bases from the beginning or end of each read before trimming adapters. If positive, the bases are removed from the beginning of each read. If negative, the bases are removed from the end of each read." />
354 <param name="quality_cutoff2" type="text" optional="true" label="Optional separate quality cutoff for Read 2" help="Trim low-quality bases from 5' and/or 3' ends of each read before adapter removal. If one value is given, only the 3' end is trimmed. If two comma-separated cutoffs are given, the 5' end is trimmed with the first cutoff, the 3' end with the second. Leave blank to use the same value as for Read 1">
355 <sanitizer>
356 <valid initial="string.digits"><add value="," /></valid>
357 </sanitizer>
358 <validator type="regex">[0-9,]+</validator>
359 </param>
360 </section>
361
362 </xml>
363
364 <xml name="inherit_format_1">
365 <actions>
366 <conditional name="library.type">
367 <when value="single">
368 <action type="format">
369 <option type="from_param" name="library.input_1" param_attribute="ext" />
370 </action>
371 </when>
372 <when value="paired">
373 <action type="format">
374 <option type="from_param" name="library.input_1" param_attribute="ext" />
375 </action>
376 </when>
377 </conditional>
378 </actions>
379 </xml>
380
381 <xml name="inherit_format_2">
382 <actions>
383 <conditional name="library.type">
384 <when value="paired">
385 <action type="format">
386 <option type="from_param" name="library.input_2" param_attribute="ext" />
387 </action>
388 </when>
389 </conditional>
390 </actions>
391 </xml>
392
393 </macros>