comparison cutadapt.xml @ 35:9845c649f41b draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/cutadapt commit c37e2aeba811fd041c08f0e119a3cbe90bfa7418
author iuc
date Sun, 17 Dec 2023 18:52:25 +0000
parents 135b80fb1ac2
children 64172f1c1202
comparison
equal deleted inserted replaced
34:8c0175e03cee 35:9845c649f41b
37 #else 37 #else
38 #set input_1 = $library.input_1 38 #set input_1 = $library.input_1
39 #set read1 = re.sub('[^\w\-\s]', '_', str($library.input_1.element_identifier)) 39 #set read1 = re.sub('[^\w\-\s]', '_', str($library.input_1.element_identifier))
40 #end if 40 #end if
41 41
42 #if $input_1.is_of_type("fastq.gz", "fastqsanger.gz"): 42 #if $input_1.is_of_type("fastq"):
43 #set ext = ".fq.gz" 43 #set ext = ".fq"
44 #else if $input_1.is_of_type("fastq.bz2", "fastqsanger.bz2"): 44 #else
45 #set ext = ".fq.bz2"
46 #else if $input_1.is_of_type('fasta'):
47 #set ext = ".fa" 45 #set ext = ".fa"
48 #else: 46 #end if
49 #set ext = ".fq" 47 #if $input_1.ext.endswith(".gz"):
50 #end if 48 #set ext=ext+".gz"
49 #elif $input_1.ext.endswith(".bz2")
50 #set ext=ext+".bz2"
51 #end if
52
53
51 #set read1 = $read1 + $ext 54 #set read1 = $read1 + $ext
52 #set out1 = "out1" + $ext 55 #set out1 = "out1" + $ext
53 #set rest_output = "rest_output" + $ext 56 #set rest_output = "rest_output" + $ext
54 #set wild_output = "wild_output" + $ext 57 #set wild_output = "wild_output" + $ext
55 #set too_short_output = "too_short_output" + $ext 58 #set too_short_output = "too_short_output" + $ext
84 cutadapt 87 cutadapt
85 88
86 -j=\${GALAXY_SLOTS:-4} 89 -j=\${GALAXY_SLOTS:-4}
87 90
88 #if 'json_stats' in $output_selector: 91 #if 'json_stats' in $output_selector:
89 --json stats.json 92 --json stats.json
90 #end if 93 #end if
91 94
92 #if str( $library.type ) == "single": 95 #if str( $library.type ) == "single":
93 @read1_options@ 96 @read1_options@
94 #if 'multiple_output' in $output_selector: 97 #if 'multiple_output' in $output_selector:
106 --error-rate=$adapter_options.error_rate 109 --error-rate=$adapter_options.error_rate
107 --times=$adapter_options.times 110 --times=$adapter_options.times
108 --overlap=$adapter_options.overlap 111 --overlap=$adapter_options.overlap
109 $adapter_options.no_indels 112 $adapter_options.no_indels
110 $adapter_options.match_read_wildcards 113 $adapter_options.match_read_wildcards
114 $adapter_options.no_match_adapter_wildcards
111 --action=$adapter_options.action 115 --action=$adapter_options.action
112 $adapter_options.revcomp 116 $adapter_options.revcomp
113 117
114 $filter_options.discard_trimmed 118 $filter_options.discard_trimmed
115 $filter_options.discard_untrimmed 119 $filter_options.discard_untrimmed
116 120
117 #if str($filter_options.minimum_length) and str($filter_options.length_R2_options.length_R2_status) == 'True': 121 #if str($filter_options.minimum_length) and str($library.type) != "single" and str($library.minimum_length2) != '':
118 --minimum-length=$filter_options.minimum_length:$filter_options.length_R2_options.R2_minimum 122 --minimum-length=$filter_options.minimum_length:$library.minimum_length2
119 #else if str($filter_options.minimum_length): 123 #else if str($filter_options.minimum_length):
120 --minimum-length=$filter_options.minimum_length 124 --minimum-length=$filter_options.minimum_length
121 #end if 125 #end if
122 #if str($filter_options.maximum_length) and str($filter_options.length_R2_options.length_R2_status) == 'True': 126 #if str($filter_options.maximum_length) and str($library.type) != "single" and str($library.maximum_length2) != '':
123 --maximum-length=$filter_options.maximum_length:$filter_options.length_R2_options.R2_maximum 127 --maximum-length=$filter_options.maximum_length:$library.maximum_length2
124 #else if str($filter_options.maximum_length): 128 #else if str($filter_options.maximum_length):
125 --maximum-length=$filter_options.maximum_length 129 --maximum-length=$filter_options.maximum_length
126 #end if 130 #end if
127 #if str($filter_options.max_n): 131 #if str($filter_options.max_n):
128 --max-n=$filter_options.max_n 132 --max-n=$filter_options.max_n
135 #if str($filter_options.max_expected_errors): 139 #if str($filter_options.max_expected_errors):
136 --max-expected-errors=$filter_options.max_expected_errors 140 --max-expected-errors=$filter_options.max_expected_errors
137 #end if 141 #end if
138 $filter_options.discard_cassava 142 $filter_options.discard_cassava
139 143
144 #if $input_1.ext.startswith("fastqillumina") or $input_1.ext.startswith("fastqsolexa")
145 --quality-base=64
146 #end if
147
140 #if str($read_mod_options.quality_cutoff) != '0': 148 #if str($read_mod_options.quality_cutoff) != '0':
141 --quality-cutoff=$read_mod_options.quality_cutoff 149 --quality-cutoff=$read_mod_options.quality_cutoff
142 #end if 150 #end if
143 #if str($read_mod_options.nextseq_trim) != '0': 151 #if str($read_mod_options.nextseq_trim) != '0':
144 --nextseq-trim=$read_mod_options.nextseq_trim 152 --nextseq-trim=$read_mod_options.nextseq_trim
145 #end if 153 #end if
146 $read_mod_options.trim_n 154 $read_mod_options.trim_n
155 $read_mod_options.poly_a
147 #if $read_mod_options.strip_suffix != '' 156 #if $read_mod_options.strip_suffix != ''
148 --strip-suffix $read_mod_options.strip_suffix 157 --strip-suffix $read_mod_options.strip_suffix
149 #end if 158 #end if
150 #if str($read_mod_options.shorten_options.shorten_values) == 'True': 159 #if str($read_mod_options.shorten_options.shorten_values) == 'True':
151 #if str($read_mod_options.shorten_options.shorten_end) == '3prime' 160 #if str($read_mod_options.shorten_options.shorten_end) == '3prime'
204 </conditional> 213 </conditional>
205 214
206 <!-- Adapter Options --> 215 <!-- Adapter Options -->
207 <section name="adapter_options" title="Adapter Options"> 216 <section name="adapter_options" title="Adapter Options">
208 <param name="action" type="select" label="What to do if a match is found"> 217 <param name="action" type="select" label="What to do if a match is found">
209 <option value="trim" selected="True">Trim: trim adapter and upstream or downstream sequence</option> 218 <option value="trim" selected="true">Trim: trim adapter and upstream or downstream sequence</option>
210 <option value="retain">Retain: the read is trimmed, but the adapter sequence is not removed</option> 219 <option value="retain">Retain: the read is trimmed, but the adapter sequence is not removed</option>
211 <option value="mask">Mask: mask adapters with 'N' characters instead of trimming them</option> 220 <option value="mask">Mask: mask adapters with 'N' characters instead of trimming them</option>
212 <option value="lowercase">Lowercase: convert to lowercase</option> 221 <option value="lowercase">Lowercase: convert to lowercase</option>
213 <option value="none">None: leave unchanged</option> 222 <option value="none">None: leave unchanged</option>
214 </param> 223 </param>
215 <param name="internal" type="select" label="Disallow internal adaptor ocurrences" help="The non-internal 5’ and 3’ adapter types disallow internal occurrences of the adapter sequence. The adapter must always be at one of the ends of the read, but partial occurrences are also ok.">
216 <option value="X">Enabled</option>
217 <option value="" selected="True">Disabled</option>
218 </param>
219 <param argument="--error-rate" type="float" min="0" max="1" value="0.1" label="Maximum error rate" help="Maximum allowed error rate (no. of errors divided by the length of the matching region)." /> 224 <param argument="--error-rate" type="float" min="0" max="1" value="0.1" label="Maximum error rate" help="Maximum allowed error rate (no. of errors divided by the length of the matching region)." />
220 <param argument="--no-indels" type="boolean" value="False" truevalue="--no-indels" falsevalue="" label="Do not allow indels (Use ONLY with anchored 5' (front) adapters)." help="Do not allow indels in the alignments. That is, allow only mismatches. This option is currently only supported for anchored 5' adapters ('^ADAPTER') (default: both mismatches and indels are allowed)." /> 225 <param argument="--no-indels" type="boolean" checked="false" truevalue="--no-indels" falsevalue="" label="Do not allow indels (Use ONLY with anchored 5' (front) adapters)." help="Do not allow indels in the alignments. That is, allow only mismatches. This option is currently only supported for anchored 5' adapters ('^ADAPTER') (default: both mismatches and indels are allowed)." />
221 <param argument="--times" type="integer" min="1" value="1" label="Match times" help="Try to remove adapters at most COUNT times. Useful when an adapter gets appended multiple times." /> 226 <param argument="--times" type="integer" min="1" value="1" label="Match times" help="Try to remove adapters at most COUNT times. Useful when an adapter gets appended multiple times." />
222 <param argument="--overlap" type="integer" min="1" value="3" label="Minimum overlap length" help="Minimum overlap length. If the overlap between the adapter and the sequence is shorter than LENGTH, the read is not modified. This reduces the number of bases trimmed purely due to short random adapter matches." /> 227 <param argument="--overlap" type="integer" min="1" value="3" label="Minimum overlap length" help="Minimum overlap length. If the overlap between the adapter and the sequence is shorter than LENGTH, the read is not modified. This reduces the number of bases trimmed purely due to short random adapter matches." />
223 <param name="match_read_wildcards" type="select" label="Match wildcards" help="Allow 'N's as matches. Default: in the adapters but not in the reads"> 228 <param argument="--match-read-wildcards" type="boolean" checked="false" truevalue="--match-read-wildcards" falsevalue="" label="Match wilcards in reads" help="Interpret IUPAC wildcards in reads"/>
224 <option value=" " selected="True">In the adapters but not in the reads</option> 229 <param argument="--no-match-adapter-wildcards" type="boolean" checked="true" truevalue="" falsevalue="--no-match-adapter-wildcards" label="Match wilcards in adapters" help="Interpret IUPAC wildcards in adapters."/>
225 <option value="--match-read-wildcards">In the adapters and in the reads</option> 230 <param argument="--revcomp" type="boolean" checked="false" truevalue="--revcomp" falsevalue="" label="Look for adapters in the reverse complement" help="Check both the read and its reverse complement for adapter matches. If match is on reverse-complemented version, output that one. Default: check only read." />
226 <option value="--no-match-adapter-wildcards">Nowhere</option>
227 </param>
228 <param argument="--revcomp" type="boolean" value="False" truevalue="--revcomp" falsevalue="" label="Look for adapters in the reverse complement" help="Check both the read and its reverse complement for adapter matches. If match is on reverse-complemented version, output that one. Default: check only read." />
229 </section> 231 </section>
230 232
231 <!-- Filter Options --> 233 <!-- Filter Options -->
232 <section name="filter_options" title="Filter Options"> 234 <section name="filter_options" title="Filter Options">
233 <param argument="--discard-trimmed" type="boolean" value="False" truevalue="--discard-trimmed" falsevalue="" label="Discard Trimmed Reads" help="Discard reads that contain the adapter instead of trimming them. Use the 'Minimum overlap length' option in order to avoid throwing away too many randomly matching reads!" /> 235 <param argument="--discard-trimmed" type="boolean" checked="false" truevalue="--discard-trimmed" falsevalue="" label="Discard Trimmed Reads" help="Discard reads that contain the adapter instead of trimming them. Use the 'Minimum overlap length' option in order to avoid throwing away too many randomly matching reads!" />
234 <param argument="--discard_untrimmed" type="boolean" value="False" truevalue="--discard-untrimmed" falsevalue="" label="Discard Untrimmed Reads" help="Discard reads that do not contain the adapter." /> 236 <param argument="--discard_untrimmed" type="boolean" checked="false" truevalue="--discard-untrimmed" falsevalue="" label="Discard Untrimmed Reads" help="Discard reads that do not contain the adapter." />
235 <param argument="--minimum-length" type="integer" min="0" optional="True" value="" label="Minimum length (R1)" help="Discard trimmed reads that are shorter than LENGTH. Reads that are too short even before adapter removal are also discarded." /> 237 <param argument="--minimum-length" type="integer" min="0" optional="true" value="" label="Minimum length (R1)" help="Discard trimmed reads that are shorter than LENGTH. Reads that are too short even before adapter removal are also discarded." />
236 <param argument="--maximum-length" type="integer" min="0" optional="True" value="" label="Maximum length (R1)" help="Discard trimmed reads that are longer than LENGTH. Reads that are too long even before adapter removal are also discarded." /> 238 <param argument="--maximum-length" type="integer" min="0" optional="true" value="" label="Maximum length (R1)" help="Discard trimmed reads that are longer than LENGTH. Reads that are too long even before adapter removal are also discarded." />
237 <conditional name="length_R2_options"> 239 <param argument="--max-n" type="float" min="0" optional="true" label="Max N" help="Discard reads with more than this number of 'N' bases. A number between 0 and 1 is interpreted as a fraction of the read length." />
238 <param name="length_R2_status" type="select" label="Specify a minimum/maximum length for reverse reads (R2)" help="When trimming paired-end reads, the minimum/maximum lengths for R1 and R2 can be specified separately. If not provided, the same minimum length applies to both reads."> 240 <param argument="--pair-filter" type="select" optional="true" label="Pair filter" help="Which of the reads in a paired-end read have to match the filtering criterion in order for the pair to be filtered. Default: any">
239 <option value="True">Enabled</option> 241 <option value="any" selected="true">Any: a read pair is discarded (or redirected) if one of the reads (R1 or R2) fulfills the filtering criterion. </option>
240 <option value="False" selected="True">Disabled</option>
241 </param>
242 <when value="True">
243 <param name="R2_minimum" type="integer" min="0" value="" optional="True" label="Minimum length (R2)" />
244 <param name="R2_maximum" type="integer" min="0" value="" optional="True" label="Maximum length (R2)" />
245 </when>
246 <when value="False">
247 </when>
248 </conditional>
249 <param argument="--max-n" type="float" min="0" optional="True" label="Max N" help="Discard reads with more than this number of 'N' bases. A number between 0 and 1 is interpreted as a fraction of the read length." />
250 <param argument="--pair-filter" type="select" optional="True" label="Pair filter" help="Which of the reads in a paired-end read have to match the filtering criterion in order for the pair to be filtered. Default: any">
251 <option value="any" selected="True">Any: a read pair is discarded (or redirected) if one of the reads (R1 or R2) fulfills the filtering criterion. </option>
252 <option value="both">Both: filtering criteria must apply to both reads in order for a read pair to be discarded. </option> 242 <option value="both">Both: filtering criteria must apply to both reads in order for a read pair to be discarded. </option>
253 <option value="first">First: will make a decision about the read pair by inspecting whether the filtering criterion applies to the first read, ignoring the second read.</option> 243 <option value="first">First: will make a decision about the read pair by inspecting whether the filtering criterion applies to the first read, ignoring the second read.</option>
254 244
255 </param> 245 </param>
256 <param argument="--max-expected-errors" type="integer" min="0" optional="True" value="" label="Max expected errors" help="Discard reads whose expected number of errors (computed from quality values) exceeds this value." /> 246 <param argument="--max-expected-errors" type="float" min="0" optional="true" value="" label="Max expected errors" help="Discard reads whose expected number of errors (computed from quality values) exceeds this value." />
257 <param argument="--discard-cassava" type="boolean" truevalue="--discard-cassava" falsevalue="" checked="False" label="Discard CASAVA filtering" help="Discard reads that did not pass CASAVA filtering (header has :Y:)." /> 247 <param argument="--max-average-error-rate" type="float" min="0" max="1" optional="true" value="" label="Max average expected errors" help="As --max-expected-errors (see above), but divided by length to account for reads of varying length" />
248 <param argument="--discard-cassava" type="boolean" truevalue="--discard-cassava" falsevalue="" checked="false" label="Discard CASAVA filtering" help="Discard reads that did not pass CASAVA filtering (header has :Y:)." />
258 </section> 249 </section>
259 250
260 <!-- Read Modification Options --> 251 <!-- Read Modification Options -->
261 <section name="read_mod_options" title="Read Modification Options"> 252 <section name="read_mod_options" title="Read Modification Options">
253 <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." />
262 <param argument="--quality-cutoff" type="text" value="0" label="Quality cutoff" help=" Trim low-quality bases from 5' and/or 3' ends of each read before adapter removal. Applied to both reads for paired-end data, unless a separate value for the second read is specified. 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."> 254 <param argument="--quality-cutoff" type="text" value="0" label="Quality cutoff" help=" Trim low-quality bases from 5' and/or 3' ends of each read before adapter removal. Applied to both reads for paired-end data, unless a separate value for the second read is specified. 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.">
263 <sanitizer> 255 <sanitizer>
264 <valid initial="string.digits"><add value="," /></valid> 256 <valid initial="string.digits"><add value="," /></valid>
265 </sanitizer> 257 </sanitizer>
266 <validator type="regex">[0-9,]+</validator> 258 <validator type="regex">[0-9]+(,[0-9])?</validator>
267 </param> 259 </param>
268 <param argument="--nextseq-trim" type="integer" value="0" label="NextSeq trimming" help="Experimental option for quality trimming of NextSeq data. This is necessary because that machine cannot distinguish between G and reaching the end of the fragment (it encodes G as ‘black’). This option works like regular quality trimming (where one would use -q 20 instead), except that the qualities of G bases are ignored." /> 260 <param argument="--nextseq-trim" type="integer" value="0" label="NextSeq trimming" help="Experimental option for quality trimming of NextSeq data. This is necessary because that machine cannot distinguish between G and reaching the end of the fragment (it encodes G as ‘black’). This option works like regular quality trimming (where one would use -q 20 instead), except that the qualities of G bases are ignored." />
269 <param argument="--trim-n" type="boolean" truevalue="--trim-n" falsevalue="" checked="False" label="Trim Ns" help="Trim N's on ends of reads." /> 261 <param argument="--trim-n" type="boolean" truevalue="--trim-n" falsevalue="" checked="false" label="Trim Ns" help="Trim N's on ends of reads." />
262 <param argument="--poly-a" type="boolean" truevalue="--poly-a" falsevalue="" checked="false" label="Trim poly-A tails" help="Note, this trim poly-T 'heads' on R2"/>
270 <param argument="--strip-suffix" label="Strip suffix" type="text" help="Remove this suffix from read names if present." /> 263 <param argument="--strip-suffix" label="Strip suffix" type="text" help="Remove this suffix from read names if present." />
271 <conditional name="shorten_options"> 264 <conditional name="shorten_options">
272 <param name="shorten_values" type="select" label="Shortening reads to a fixed length" help="If you want to remove a fixed number of bases from each read, use the –cut option instead."> 265 <param name="shorten_values" type="select" label="Shortening reads to a fixed length" help="If you want to remove a fixed number of bases from each read, use the –cut option instead.">
273 <option value="True">Enabled</option> 266 <option value="True">Enabled</option>
274 <option value="False" selected="True">Disabled</option> 267 <option value="False" selected="true">Disabled</option>
275 </param> 268 </param>
276 <when value="True"> 269 <when value="True">
277 <param argument="--length" type="integer" value="0" label="Length" help="Shorten reads to this length. This modification is applied after adapter trimming." /> 270 <param argument="--length" type="integer" value="0" label="Length" help="Shorten reads to this length. This modification is applied after adapter trimming." />
278 <param name="shorten_end" type="select" label="End at which to apply the slice"> 271 <param name="shorten_end" type="select" label="End at which to apply the slice">
279 <option value="3prime">3' ends</option> 272 <option value="3prime">3' ends</option>
281 </param> 274 </param>
282 </when> 275 </when>
283 <when value="False"> 276 <when value="False">
284 </when> 277 </when>
285 </conditional> 278 </conditional>
286 <param argument="--length-tag" label="Length tag" type="text" optional="True" help="Search for TAG followed by a decimal number in the name of the read (description/comment field of the FASTA or FASTQ file). Replace the decimal number with the correct length of the trimmed read. For example, use --length-tag 'length=' to search for fields like 'length=123'." > 279 <param argument="--length-tag" label="Length tag" type="text" optional="true" help="Search for TAG followed by a decimal number in the name of the read (description/comment field of the FASTA or FASTQ file). Replace the decimal number with the correct length of the trimmed read. For example, use --length-tag 'length=' to search for fields like 'length=123'." >
287 <sanitizer invalid_char=""> 280 <sanitizer invalid_char="">
288 <valid initial="string.letters,string.digits"> 281 <valid initial="string.letters,string.digits">
289 <add value="/" /> 282 <add value="/" />
290 <add value="+" /> 283 <add value="+" />
291 <add value="-" /> 284 <add value="-" />
294 <add value="_" /> 287 <add value="_" />
295 </valid> 288 </valid>
296 </sanitizer> 289 </sanitizer>
297 <validator type="regex">[A-Za-z0-9 =-_/+]+</validator> 290 <validator type="regex">[A-Za-z0-9 =-_/+]+</validator>
298 </param> 291 </param>
299 <param argument="--rename" label="Rename reads" type="text" optional="True" help="This option can be used to rename both single-end and paired-end reads. "> 292 <param argument="--rename" label="Rename reads" type="text" optional="true" help="This option can be used to rename both single-end and paired-end reads. ">
300 <sanitizer invalid_char=""> 293 <sanitizer invalid_char="">
301 <valid initial="string.letters,string.digits"> 294 <valid initial="string.letters,string.digits">
302 <add value="{" /> 295 <add value="{" />
303 <add value="}" /> 296 <add value="}" />
304 <add value="_" /> 297 <add value="_" />
306 <add value=" " /> 299 <add value=" " />
307 </valid> 300 </valid>
308 </sanitizer> 301 </sanitizer>
309 <validator type="regex">[A-Za-z0-9 {}=_]+</validator> 302 <validator type="regex">[A-Za-z0-9 {}=_]+</validator>
310 </param> 303 </param>
311 <param argument="--zero-cap" type="boolean" truevalue="--zero-cap" falsevalue="" checked="False" label="Change negative quality values to zero" /> 304 <param argument="--zero-cap" type="boolean" truevalue="--zero-cap" falsevalue="" checked="false" label="Change negative quality values to zero" />
312 </section> 305 </section>
313 306
314 <!-- Output Options --> 307 <!-- Output Options -->
315 <param name="output_selector" type="select" multiple="True" display="checkboxes" label="Outputs selector"> 308 <param name="output_selector" type="select" multiple="true" display="checkboxes" label="Outputs selector">
316 <option value="report">Report: Cutadapt's per-adapter statistics. You can use this file with MultiQC.</option> 309 <option value="report">Report: Cutadapt's per-adapter statistics. You can use this file with MultiQC.</option>
317 <option value="info_file">Info file: write information about each read and its adapter matches.</option> 310 <option value="info_file">Info file: write information about each read and its adapter matches.</option>
318 <option value="rest_file">Rest of read: when the adapter matches in the middle of a read, write the rest (after the adapter).</option> 311 <option value="rest_file">Rest of read: when the adapter matches in the middle of a read, write the rest (after the adapter).</option>
319 <option value="wildcard_file">Wildcard file: when the adapter has wildcard bases (Ns) write adapter bases matching wildcard positions.</option> 312 <option value="wildcard_file">Wildcard file: when the adapter has wildcard bases (Ns) write adapter bases matching wildcard positions.</option>
320 <option value="too_short_file">Too short reads: write reads that are too short according to minimum length specified (default: discard reads).</option> 313 <option value="too_short_file">Too short reads: write reads that are too short according to minimum length specified (default: discard reads).</option>
324 <option value="json_stats">Statistics in JSON format</option> 317 <option value="json_stats">Statistics in JSON format</option>
325 </param> 318 </param>
326 </inputs> 319 </inputs>
327 320
328 <outputs> 321 <outputs>
329 <data name="out1" format="fastqsanger" metadata_source="input_1" from_work_dir="out1*" label="${tool.name} on ${on_string}: Read 1 Output"> 322 <data name="out1" format="fastqsanger" metadata_source="input_1" from_work_dir="out1.*" label="${tool.name} on ${on_string}: Read 1 Output">
330 <filter>library['type'] != 'paired_collection' and 'multiple_output' not in output_selector</filter> 323 <filter>library['type'] != 'paired_collection' and 'multiple_output' not in output_selector</filter>
331 <expand macro="inherit_format_1" /> 324 <expand macro="inherit_format_1" />
332 </data> 325 </data>
333 326
334 <data name="out2" format="fastqsanger" metadata_source="input_2" from_work_dir="out2*" label="${tool.name} on ${on_string}: Read 2 Output" > 327 <data name="out2" format="fastqsanger" metadata_source="input_2" from_work_dir="out2.*" label="${tool.name} on ${on_string}: Read 2 Output" >
335 <filter>library['type'] == 'paired' and 'multiple_output' not in output_selector</filter> 328 <filter>library['type'] == 'paired' and 'multiple_output' not in output_selector</filter>
336 <expand macro="inherit_format_2" /> 329 <expand macro="inherit_format_2" />
337 </data> 330 </data>
338 331
339 <collection name="out_pairs" type="paired" format_source="input_1" label="${tool.name} on ${on_string}: Reads"> 332 <collection name="out_pairs" type="paired" format_source="input_1" label="${tool.name} on ${on_string}: Reads">
340 <filter>library['type'] == 'paired_collection' and 'multiple_output' not in output_selector</filter> 333 <filter>library['type'] == 'paired_collection' and 'multiple_output' not in output_selector</filter>
341 <data name="forward" from_work_dir="out1.fq*" /> 334 <data name="forward" from_work_dir="out1.*" />
342 <data name="reverse" from_work_dir="out2.fq*" /> 335 <data name="reverse" from_work_dir="out2.*" />
343 </collection> 336 </collection>
344 337
345 <data name="report" format="txt" from_work_dir="report.txt" label="${tool.name} on ${on_string}: Report"> 338 <data name="report" format="txt" from_work_dir="report.txt" label="${tool.name} on ${on_string}: Report">
346 <filter>output_selector and 'report' in output_selector</filter> 339 <filter>output_selector and 'report' in output_selector</filter>
347 </data> 340 </data>
420 <param name="adapter_source_list" value="user"/> 413 <param name="adapter_source_list" value="user"/>
421 <param name="adapter" value="AGATCGGAAGAGC"/> 414 <param name="adapter" value="AGATCGGAAGAGC"/>
422 </conditional> 415 </conditional>
423 </repeat> 416 </repeat>
424 </section> 417 </section>
425 <output name="out1" decompress="True" file="cutadapt_out1.fq.gz" ftype="fastq.gz"/> 418 <output name="out1" decompress="true" file="cutadapt_out1.fq.gz" ftype="fastq.gz"/>
426 </test> 419 </test>
427 <!-- Ensure paired end fastq.gz works --> 420 <!-- Ensure paired end fastq.gz works -->
428 <test expect_num_outputs="2"> 421 <test expect_num_outputs="2">
429 <param name="type" value="paired" /> 422 <param name="type" value="paired" />
430 <param name="input_1" ftype="fastq.gz" value="bwa-mem-fastq1.fq.gz" /> 423 <param name="input_1" ftype="fastq.gz" value="bwa-mem-fastq1.fq.gz" />
437 </conditional> 430 </conditional>
438 </repeat> 431 </repeat>
439 </section> 432 </section>
440 <section name="r2"> 433 <section name="r2">
441 <repeat name="adapters2"> 434 <repeat name="adapters2">
442 <conditional name="adapter_source2"> 435 <conditional name="adapter_source">
443 <param name="adapter_source_list2" value="user"/> 436 <param name="adapter_source_list" value="user"/>
444 <param name="adapter2" value="AGATCGGAAGAGC"/> 437 <param name="adapter" value="AGATCGGAAGAGC"/>
445 </conditional> 438 </conditional>
446 </repeat> 439 </repeat>
447 </section> 440 </section>
448 <output name="out1" decompress="True" file="cutadapt_out1.fq.gz" ftype="fastq.gz"/> 441 <output name="out1" decompress="true" file="cutadapt_out1.fq.gz" ftype="fastq.gz"/>
449 <output name="out2" decompress="True" file="cutadapt_out2.fq.gz" ftype="fastq.gz"/> 442 <output name="out2" decompress="true" file="cutadapt_out2.fq.gz" ftype="fastq.gz"/>
450 <assert_command> 443 <assert_command>
451 <not_has_text text="--discard-trimmed"/> 444 <not_has_text text="--discard-trimmed"/>
452 <not_has_text text="--discard-untrimmed"/> 445 <not_has_text text="--discard-untrimmed"/>
453 <not_has_text text="--minimum-length"/> 446 <not_has_text text="--minimum-length"/>
454 <not_has_text text="--maximum-length"/> 447 <not_has_text text="--maximum-length"/>
473 </conditional> 466 </conditional>
474 </repeat> 467 </repeat>
475 </section> 468 </section>
476 <section name="r2"> 469 <section name="r2">
477 <repeat name="adapters2"> 470 <repeat name="adapters2">
478 <conditional name="adapter_source2"> 471 <conditional name="adapter_source">
479 <param name="adapter_source_list2" value="user"/> 472 <param name="adapter_source_list" value="user"/>
480 <param name="adapter2" value="AGATCGGAAGAGC"/> 473 <param name="adapter" value="AGATCGGAAGAGC"/>
481 </conditional> 474 </conditional>
482 </repeat> 475 </repeat>
483 </section> 476 </section>
484 <output_collection name="out_pairs" type="paired" count="2"> 477 <output_collection name="out_pairs" type="paired" count="2">
485 <element name="forward" decompress="true" file="cutadapt_out1.fq.gz" ftype="fastq.gz"> 478 <element name="forward" decompress="true" file="cutadapt_out1.fq.gz" ftype="fastq.gz"/>
486 <assert_contents> 479 <element name="reverse" decompress="true" file="cutadapt_out2.fq.gz" ftype="fastq.gz"/>
487 <has_size value="12000" delta="2000" />
488 </assert_contents>
489 </element>
490 <element name="reverse" decompress="true" file="cutadapt_out2.fq.gz" ftype="fastq.gz">
491 <assert_contents>
492 <has_size value="12000" delta="2000" />
493 </assert_contents>
494 </element>
495 </output_collection> 480 </output_collection>
496 </test> 481 </test>
497 <!-- Ensure built-in adapters work --> 482 <!-- Ensure built-in adapters work -->
498 <test expect_num_outputs="1"> 483 <test expect_num_outputs="1">
499 <param name="type" value="single" /> 484 <param name="type" value="single" />
518 <param name="adapter" value="TTAGACATATCTCCGTCG"/> 503 <param name="adapter" value="TTAGACATATCTCCGTCG"/>
519 </conditional> 504 </conditional>
520 </repeat> 505 </repeat>
521 </section> 506 </section>
522 <section name="filter_options"> 507 <section name="filter_options">
523 <param name="discard_trimmed" value="True"/> 508 <param name="discard_trimmed" value="true"/>
524 </section> 509 </section>
525 <output name="out1" file="cutadapt_discard.out" ftype="fastq"/> 510 <output name="out1" file="cutadapt_discard.out" ftype="fastq"/>
526 <assert_command> 511 <assert_command>
527 <has_text text="--discard-trimmed"/> 512 <has_text text="--discard-trimmed"/>
528 </assert_command> 513 </assert_command>
538 </conditional> 523 </conditional>
539 </repeat> 524 </repeat>
540 </section> 525 </section>
541 <param name="output_selector" value="rest_file,json_stats"/> 526 <param name="output_selector" value="rest_file,json_stats"/>
542 <output name="out1" file="cutadapt_rest.out" ftype="fasta"/> 527 <output name="out1" file="cutadapt_rest.out" ftype="fasta"/>
543 <!--allow for differing cutadapt and python version as well as two lines containing the number of cores --> 528 <!--allow for differing schema, cutadapt and python version as well as two lines containing the number of cores -->
544 <output name="json_stats" file="cutadapt_rest.json" ftype="json" lines_diff="8"/> 529 <output name="json_stats" file="cutadapt_rest.json" ftype="json" lines_diff="10"/>
545 <output name="rest_output" file="cutadapt_rest2.out" ftype="fasta"/> 530 <output name="rest_output" file="cutadapt_rest2.out" ftype="fasta"/>
546 </test> 531 </test>
547 <!-- Ensure nextseq-trim option works --> 532 <!-- Ensure nextseq-trim option works -->
548 <test expect_num_outputs="1"> 533 <test expect_num_outputs="1">
549 <param name="type" value="single" /> 534 <param name="type" value="single" />
555 <param name="adapter" value="AGATCGGAAGAGC"/> 540 <param name="adapter" value="AGATCGGAAGAGC"/>
556 </conditional> 541 </conditional>
557 </repeat> 542 </repeat>
558 </section> 543 </section>
559 <param name="nextseq_trim" value="20" /> 544 <param name="nextseq_trim" value="20" />
560 <output name="out1" decompress="True" file="cutadapt_nextseq_out.fq.gz" ftype="fastq.gz"/> 545 <output name="out1" decompress="true" file="cutadapt_nextseq_out.fq.gz" ftype="fastq.gz"/>
561 </test> 546 </test>
562 <!-- Ensure Report and Info file output work --> 547 <!-- Ensure Report and Info file output work -->
563 <test expect_num_outputs="3"> 548 <test expect_num_outputs="3">
564 <param name="type" value="single" /> 549 <param name="type" value="single" />
565 <param name="input_1" ftype="fastq" value="cutadapt_small.fastq" /> 550 <param name="input_1" ftype="fastq" value="cutadapt_small.fastq" />
586 <conditional name="library"> 571 <conditional name="library">
587 <param name="type" value="single" /> 572 <param name="type" value="single" />
588 <param name="input_1" ftype="fastq" value="cutadapt_in_split.fastq" /> 573 <param name="input_1" ftype="fastq" value="cutadapt_in_split.fastq" />
589 <section name="r1" > 574 <section name="r1" >
590 <repeat name="front_adapters"> 575 <repeat name="front_adapters">
591 <conditional name="front_adapter_source"> 576 <conditional name="adapter_source">
592 <param name="front_adapter_source_list" value="user"/> 577 <param name="adapter_source_list" value="user"/>
593 <param name="front_adapter_name" value="A1" /> 578 <param name="adapter_name" value="A1" />
594 <param name="front_adapter" value="^GTCGGTAA" /> 579 <param name="adapter" value="^GTCGGTAA" />
595 </conditional> 580 </conditional>
596 </repeat> 581 </repeat>
597 <repeat name="front_adapters"> 582 <repeat name="front_adapters">
598 <conditional name="front_adapter_source"> 583 <conditional name="adapter_source">
599 <param name="front_adapter_source_list" value="user"/> 584 <param name="adapter_source_list" value="user"/>
600 <param name="front_adapter_name" value="A2" /> 585 <param name="adapter_name" value="A2" />
601 <param name="front_adapter" value="^AGGTCACT" /> 586 <param name="adapter" value="^AGGTCACT" />
602 </conditional> 587 </conditional>
603 </repeat> 588 </repeat>
604 </section> 589 </section>
605 </conditional> 590 </conditional>
606 <param name="output_selector" value="multiple_output" /> 591 <param name="output_selector" value="multiple_output" />
618 <conditional name="library"> 603 <conditional name="library">
619 <param name="type" value="single" /> 604 <param name="type" value="single" />
620 <param name="input_1" ftype="fastq.gz" value="cutadapt_in_split.fastq.gz" /> 605 <param name="input_1" ftype="fastq.gz" value="cutadapt_in_split.fastq.gz" />
621 <section name="r1" > 606 <section name="r1" >
622 <repeat name="front_adapters"> 607 <repeat name="front_adapters">
623 <conditional name="front_adapter_source"> 608 <conditional name="adapter_source">
624 <param name="front_adapter_source_list" value="file"/> 609 <param name="adapter_source_list" value="file"/>
625 <param name="front_adapter_file" ftype="fasta" value="barcodes.fasta" /> 610 <param name="adapter_file" ftype="fasta" value="barcodes.fasta" />
626 </conditional> 611 </conditional>
627 </repeat> 612 </repeat>
628 </section> 613 </section>
629 </conditional> 614 </conditional>
630 <param name="output_selector" value="multiple_output" /> 615 <param name="output_selector" value="multiple_output" />
631 <output_collection name="split_output" type="list" count="3"> 616 <output_collection name="split_output" type="list" count="3">
632 <element name="A1" decompress="True" file="A1.fastq.gz" ftype="fastq.gz"> 617 <element name="A1" decompress="true" file="A1.fastq.gz" ftype="fastq.gz"/>
633 </element> 618 <element name="A2" decompress="true" file="A2.fastq.gz" ftype="fastq.gz"/>
634 <element name="A2" decompress="True" file="A2.fastq.gz" ftype="fastq.gz"> 619 <element name="unknown" decompress="true" file="unknown.fastq.gz" ftype="fastq.gz"/>
635 </element>
636 <element name="unknown" decompress="True" file="unknown.fastq.gz" ftype="fastq.gz">
637 </element>
638 </output_collection> 620 </output_collection>
639 </test> 621 </test>
640 622
641 <!-- Ensure untrimmed file output works --> 623 <!-- Ensure untrimmed file output works -->
642 <test expect_num_outputs="2"> 624 <test expect_num_outputs="2">
665 <param name="adapter" value="AGATCGGAAGAGC"/> 647 <param name="adapter" value="AGATCGGAAGAGC"/>
666 </conditional> 648 </conditional>
667 </repeat> 649 </repeat>
668 </section> 650 </section>
669 <param name="output_selector" value="untrimmed_file" /> 651 <param name="output_selector" value="untrimmed_file" />
670 <output name="out1" decompress="True" file="cutadapt_trimmed.out.gz" ftype="fastq.gz"/> 652 <output name="out1" decompress="true" file="cutadapt_trimmed.out.gz" ftype="fastq.gz"/>
671 <!-- 653 <!--
672 Do not use the decompress option for this assertion, since it does NOT test that the file is compressed 654 Do not use the decompress option for this assertion, since it does NOT test that the file is compressed
673 See discussion at https://github.com/galaxyproject/galaxy/issues/7671 655 See discussion at https://github.com/galaxyproject/galaxy/issues/7671
674 `delta="4000" is more than the difference between gzip level 1 and gzip level 9, but much less than the 656 `delta="4000" is more than the difference between gzip level 1 and gzip level 9, but much less than the
675 difference between level 1 compression and no compression 657 difference between level 1 compression and no compression
690 </repeat> 672 </repeat>
691 </section> 673 </section>
692 <section name="r2"> 674 <section name="r2">
693 <repeat name="adapters"> 675 <repeat name="adapters">
694 <conditional name="adapter_source"> 676 <conditional name="adapter_source">
695 <param name="adapter_source_list2" value="user"/> 677 <param name="adapter_source_list" value="user"/>
696 <param name="adapter2" value="AGATCGGAAGAGC"/> 678 <param name="adapter" value="AGATCGGAAGAGC"/>
697 </conditional> 679 </conditional>
698 </repeat> 680 </repeat>
699 </section> 681 </section>
700 <section name="filter_options"> 682 <section name="filter_options">
701 <param name="discard_untrimmed" value="true"/> 683 <param name="discard_untrimmed" value="true"/>
720 <conditional name="adapter_source"> 702 <conditional name="adapter_source">
721 <param name="adapter_source_list" value="user"/> 703 <param name="adapter_source_list" value="user"/>
722 <param name="adapter" value="AGATCGGAAGAGC"/> 704 <param name="adapter" value="AGATCGGAAGAGC"/>
723 </conditional> 705 </conditional>
724 </repeat> 706 </repeat>
725 <param name="cut" value="5"/> 707 </section>
726 </section> 708 <param name="cut" value="5"/>
727 <output name="out1" file="cutadapt_small_cut.out" ftype="fastq"/> 709 <output name="out1" file="cutadapt_small_cut.out" ftype="fastq"/>
728 </test> 710 </test>
729 <!-- Test rename options --> 711 <!-- Test rename options -->
730 <test expect_num_outputs="1"> 712 <test expect_num_outputs="1">
731 <param name="type" value="single" /> 713 <param name="type" value="single" />
735 <conditional name="adapter_source"> 717 <conditional name="adapter_source">
736 <param name="adapter_source_list" value="user"/> 718 <param name="adapter_source_list" value="user"/>
737 <param name="adapter" value="AGATCGGAAGAGC"/> 719 <param name="adapter" value="AGATCGGAAGAGC"/>
738 </conditional> 720 </conditional>
739 </repeat> 721 </repeat>
740 <param name="cut" value="5"/> 722 </section>
741 </section> 723 <param name="cut" value="5"/>
742 <section name="read_mod_options"> 724 <section name="read_mod_options">
743 <param name="rename" value="{id} barcode={cut_prefix}"/> 725 <param name="rename" value="{id} barcode={cut_prefix}"/>
744 </section> 726 </section>
745 <output name="out1" file="cutadapt_small_rename.out" ftype="fastq"> 727 <output name="out1" file="cutadapt_small_rename.out" ftype="fastq">
746 <assert_contents> 728 <assert_contents>
843 </conditional> 825 </conditional>
844 </repeat> 826 </repeat>
845 </section> 827 </section>
846 <section name="r2"> 828 <section name="r2">
847 <repeat name="adapters2"> 829 <repeat name="adapters2">
848 <conditional name="adapter_source2"> 830 <conditional name="adapter_source">
849 <param name="adapter_source_list2" value="user"/> 831 <param name="adapter_source_list" value="user"/>
850 <param name="adapter2" value="CTACAAG"/> 832 <param name="adapter" value="CTACAAG"/>
851 </conditional> 833 </conditional>
852 </repeat> 834 </repeat>
835 <param name="minimum_length2" value="10"/>
853 </section> 836 </section>
854 <section name="filter_options"> 837 <section name="filter_options">
855 <param name="minimum_length" value="30"/> 838 <param name="minimum_length" value="30"/>
856 <param name="pair_filter" value="both"/> 839 <param name="pair_filter" value="both"/>
857 <conditional name="length_R2_options"> 840 </section>
858 <param name="length_R2_status" value="True"/> 841 <output name="out1" decompress="true" file="cutadapt_out1_min_length.fq.gz" ftype="fastq.gz"/>
859 <param name="R2_minimum" value="10"/> 842 <output name="out2" decompress="true" file="cutadapt_out2_min_length.fq.gz" ftype="fastq.gz"/>
860 </conditional>
861 </section>
862 <output name="out1" decompress="True" file="cutadapt_out1_min_length.fq.gz" ftype="fastq.gz"/>
863 <output name="out2" decompress="True" file="cutadapt_out2_min_length.fq.gz" ftype="fastq.gz"/>
864 <assert_command> 843 <assert_command>
865 <has_text text="--minimum-length=30:10"/> 844 <has_text text="--minimum-length=30:10"/>
866 <has_text text="--pair-filter=both"/> 845 <has_text text="--pair-filter=both"/>
867 </assert_command> 846 </assert_command>
868 </test> 847 </test>
879 </conditional> 858 </conditional>
880 </repeat> 859 </repeat>
881 </section> 860 </section>
882 <section name="r2"> 861 <section name="r2">
883 <repeat name="adapters2"> 862 <repeat name="adapters2">
884 <conditional name="adapter_source2"> 863 <conditional name="adapter_source">
885 <param name="adapter_source_list2" value="user"/> 864 <param name="adapter_source_list" value="user"/>
886 <param name="adapter2" value="AGATCGGAAGAGC"/> 865 <param name="adapter" value="AGATCGGAAGAGC"/>
887 </conditional> 866 </conditional>
888 </repeat> 867 </repeat>
868 <param name="maximum_length2" value="30"/>
889 </section> 869 </section>
890 <section name="filter_options"> 870 <section name="filter_options">
891 <param name="pair_filter" value="both"/> 871 <param name="pair_filter" value="both"/>
892 <param name="maximum_length" value="50"/> 872 <param name="maximum_length" value="50"/>
893 <conditional name="length_R2_options"> 873 </section>
894 <param name="length_R2_status" value="True"/> 874 <output name="out1" decompress="true" file="cutadapt_out1_max_length.fq.gz" ftype="fastq.gz"/>
895 <param name="R2_maximum" value="30"/> 875 <output name="out2" decompress="true" file="cutadapt_out2_max_length.fq.gz" ftype="fastq.gz"/>
896 </conditional>
897 </section>
898 <output name="out1" decompress="True" file="cutadapt_out1_max_length.fq.gz" ftype="fastq.gz"/>
899 <output name="out2" decompress="True" file="cutadapt_out2_max_length.fq.gz" ftype="fastq.gz"/>
900 <assert_command> 876 <assert_command>
901 <has_text text="--maximum-length=50:30"/> 877 <has_text text="--maximum-length=50:30"/>
902 <has_text text="--pair-filter=both"/> 878 <has_text text="--pair-filter=both"/>
903 </assert_command> 879 </assert_command>
904 </test> 880 </test>
920 <conditional name="adapter_source2"> 896 <conditional name="adapter_source2">
921 <param name="adapter_source_list2" value="user"/> 897 <param name="adapter_source_list2" value="user"/>
922 <param name="adapter2" value="AGATCGGAAGAGC"/> 898 <param name="adapter2" value="AGATCGGAAGAGC"/>
923 </conditional> 899 </conditional>
924 </repeat> 900 </repeat>
901 <param name="maximum_length2" value="30"/>
925 </section> 902 </section>
926 <section name="filter_options"> 903 <section name="filter_options">
927 <param name="pair_filter" value="both"/> 904 <param name="pair_filter" value="both"/>
928 <param name="minimum_length" value="10"/> 905 <param name="minimum_length" value="10"/>
929 <param name="maximum_length" value="50"/> 906 <param name="maximum_length" value="50"/>
930 <conditional name="length_R2_options"> 907 </section>
931 <param name="length_R2_status" value="True"/> 908 <output name="out1" decompress="true" file="cutadapt_out1_max_min_01.fq.gz" ftype="fastq.gz"/>
932 <param name="R2_maximum" value="30"/> 909 <output name="out2" decompress="true" file="cutadapt_out2_max_min_01.fq.gz" ftype="fastq.gz"/>
933 </conditional> 910 <assert_command>
934 </section> 911 <has_text text="--minimum-length=10"/>
935 <output name="out1" decompress="True" file="cutadapt_out1_max_min_01.fq.gz" ftype="fastq.gz"/>
936 <output name="out2" decompress="True" file="cutadapt_out2_max_min_01.fq.gz" ftype="fastq.gz"/>
937 <assert_command>
938 <has_text text="--minimum-length=10:"/>
939 <has_text text="--maximum-length=50:30"/> 912 <has_text text="--maximum-length=50:30"/>
940 <has_text text="--pair-filter=both"/> 913 <has_text text="--pair-filter=both"/>
941 </assert_command> 914 </assert_command>
942 </test> 915 </test>
943 <test expect_num_outputs="2"> 916 <test expect_num_outputs="2">
957 <conditional name="adapter_source2"> 930 <conditional name="adapter_source2">
958 <param name="adapter_source_list2" value="user"/> 931 <param name="adapter_source_list2" value="user"/>
959 <param name="adapter2" value="AGATCGGAAGAGC"/> 932 <param name="adapter2" value="AGATCGGAAGAGC"/>
960 </conditional> 933 </conditional>
961 </repeat> 934 </repeat>
935 <param name="minimum_length2" value="10"/>
962 </section> 936 </section>
963 <section name="filter_options"> 937 <section name="filter_options">
964 <param name="pair_filter" value="both"/> 938 <param name="pair_filter" value="both"/>
965 <param name="minimum_length" value="10"/> 939 <param name="minimum_length" value="10"/>
966 <param name="maximum_length" value="50"/> 940 <param name="maximum_length" value="50"/>
967 <conditional name="length_R2_options"> 941 </section>
968 <param name="length_R2_status" value="True"/> 942 <output name="out1" decompress="true" file="cutadapt_out1_max_min_02.fq.gz" ftype="fastq.gz"/>
969 <param name="R2_minimum" value="10"/> 943 <output name="out2" decompress="true" file="cutadapt_out2_max_min_02.fq.gz" ftype="fastq.gz"/>
970 </conditional>
971 </section>
972 <output name="out1" decompress="True" file="cutadapt_out1_max_min_02.fq.gz" ftype="fastq.gz"/>
973 <output name="out2" decompress="True" file="cutadapt_out2_max_min_02.fq.gz" ftype="fastq.gz"/>
974 <assert_command> 944 <assert_command>
975 <has_text text="--minimum-length=10:10"/> 945 <has_text text="--minimum-length=10:10"/>
976 <has_text text="--maximum-length=50:"/> 946 <has_text text="--maximum-length=50"/>
977 <has_text text="--pair-filter=both"/> 947 <has_text text="--pair-filter=both"/>
978 </assert_command> 948 </assert_command>
979 </test> 949 </test>
980 <!-- Test length options --> 950 <!-- Test length options -->
981 <test expect_num_outputs="1"> 951 <test expect_num_outputs="1">
1033 <section name="filter_options"> 1003 <section name="filter_options">
1034 <param name="max_expected_errors" value="10"/> 1004 <param name="max_expected_errors" value="10"/>
1035 </section> 1005 </section>
1036 <output name="out1" file="cutadapt_shorten_expected_errors.out" ftype="fastq"/> 1006 <output name="out1" file="cutadapt_shorten_expected_errors.out" ftype="fastq"/>
1037 </test> 1007 </test>
1008
1038 <!-- Test disallow internal adaptors option --> 1009 <!-- Test disallow internal adaptors option -->
1039 <test expect_num_outputs="1"> 1010 <test expect_num_outputs="1">
1040 <param name="type" value="single" /> 1011 <param name="type" value="single" />
1041 <param name="input_1" ftype="fastq" value="cutadapt_small.fastq" /> 1012 <param name="input_1" ftype="fastq" value="cutadapt_small.fastq" />
1042 <section name="r1"> 1013 <section name="r1">
1043 <repeat name="adapters"> 1014 <repeat name="adapters">
1044 <conditional name="adapter_source"> 1015 <conditional name="adapter_source">
1045 <param name="adapter_source_list" value="user"/> 1016 <param name="adapter_source_list" value="user"/>
1046 <param name="adapter" value="GAANTAGCTACCAC"/> 1017 <param name="adapter" value="GAANTAGCTACCACX"/>
1047 </conditional> 1018 </conditional>
1048 </repeat> 1019 </repeat>
1049 </section>
1050 <section name="adapter_options">
1051 <param name="internal" value="X"/>
1052 </section> 1020 </section>
1053 <output name="out1" file="cutadapt_shorten_internal_adapters.out" ftype="fastq"/> 1021 <output name="out1" file="cutadapt_shorten_internal_adapters.out" ftype="fastq"/>
1054 <assert_command> 1022 <assert_command>
1055 <has_text text="GAANTAGCTACCACX"/> 1023 <has_text text="GAANTAGCTACCACX"/>
1056 </assert_command> 1024 </assert_command>
1061 <param name="input_2" ftype="fastq.gz" value="bwa-mem-fastq2_assimetric.fq.gz" /> 1029 <param name="input_2" ftype="fastq.gz" value="bwa-mem-fastq2_assimetric.fq.gz" />
1062 <section name="r1"> 1030 <section name="r1">
1063 <repeat name="adapters"> 1031 <repeat name="adapters">
1064 <conditional name="adapter_source"> 1032 <conditional name="adapter_source">
1065 <param name="adapter_source_list" value="user"/> 1033 <param name="adapter_source_list" value="user"/>
1066 <param name="adapter" value="AGATCGGAAGAGC"/> 1034 <param name="adapter" value="AGATCGGAAGAGCX"/>
1067 </conditional> 1035 </conditional>
1068 </repeat> 1036 </repeat>
1069 </section> 1037 </section>
1070 <section name="r2"> 1038 <section name="r2">
1071 <repeat name="adapters2"> 1039 <repeat name="adapters2">
1072 <conditional name="adapter_source2"> 1040 <conditional name="adapter_source">
1073 <param name="adapter_source_list2" value="user"/> 1041 <param name="adapter_source_list" value="user"/>
1074 <param name="adapter2" value="AGATCGGAAGAGC"/> 1042 <param name="adapter" value="AGATCGGAAGAGCX"/>
1075 </conditional> 1043 </conditional>
1076 </repeat> 1044 </repeat>
1077 </section> 1045 </section>
1078 <section name="adapter_options"> 1046 <output name="out1" decompress="true" file="cutadapt_out1_internal_adapter.fq.gz" ftype="fastq.gz"/>
1079 <param name="internal" value="X"/> 1047 <output name="out2" decompress="true" file="cutadapt_out2_internal_adapter.fq.gz" ftype="fastq.gz"/>
1080 </section> 1048 <assert_command>
1081 <output name="out1" decompress="True" file="cutadapt_out1_internal_adapter.fq.gz" ftype="fastq.gz"/> 1049 <has_text text="'AGATCGGAAGAGCX'" n="2"/>
1082 <output name="out2" decompress="True" file="cutadapt_out2_internal_adapter.fq.gz" ftype="fastq.gz"/>
1083 <assert_command>
1084 <has_text text="AGATCGGAAGAGCX"/>
1085 </assert_command> 1050 </assert_command>
1086 </test> 1051 </test>
1087 <test expect_num_outputs="1"> 1052 <test expect_num_outputs="1">
1088 <param name="type" value="single" /> 1053 <param name="type" value="single" />
1089 <param name="input_1" ftype="fastq" value="cutadapt_small.fastq" /> 1054 <param name="input_1" ftype="fastq" value="cutadapt_small.fastq" />
1093 <param name="adapter_source_list" value="builtin"/> 1058 <param name="adapter_source_list" value="builtin"/>
1094 <param name="adapter" value="TGTAGGCC"/> 1059 <param name="adapter" value="TGTAGGCC"/>
1095 </conditional> 1060 </conditional>
1096 </repeat> 1061 </repeat>
1097 </section> 1062 </section>
1098 <section name="adapter_options">
1099 <param name="internal" value="X"/>
1100 </section>
1101 <output name="out1" file="cutadapt_builtin_internal_adapter.out" ftype="fastq"/> 1063 <output name="out1" file="cutadapt_builtin_internal_adapter.out" ftype="fastq"/>
1102 <assert_command> 1064 <assert_command>
1103 <has_text text="TGTAGGCCX"/> 1065 <has_text text="'TGTAGGCC'"/>
1104 </assert_command> 1066 </assert_command>
1105 </test> 1067 </test>
1106 <!-- Ensure individual per adapter noindels parameter works --> 1068 <!-- Ensure individual per adapter noindels parameter works -->
1107 <test expect_num_outputs="3"> 1069 <test expect_num_outputs="3">
1108 <param name="type" value="paired_collection" /> 1070 <param name="type" value="paired_collection" />
1121 <param name="single_noindels" value=";noindels" /> 1083 <param name="single_noindels" value=";noindels" />
1122 </repeat> 1084 </repeat>
1123 </section> 1085 </section>
1124 <section name="r2"> 1086 <section name="r2">
1125 <repeat name="adapters2"> 1087 <repeat name="adapters2">
1126 <conditional name="adapter_source2"> 1088 <conditional name="adapter_source">
1127 <param name="adapter_source_list2" value="user"/> 1089 <param name="adapter_source_list" value="user"/>
1128 <param name="adapter2" value="AGATCGGAAGAGC"/> 1090 <param name="adapter" value="AGATCGGAAGAGC"/>
1129 </conditional> 1091 </conditional>
1130 <param name="single_noindels" value=";noindels" /> 1092 <param name="single_noindels" value=";noindels" />
1131 </repeat> 1093 </repeat>
1132 </section> 1094 </section>
1133 <output_collection name="out_pairs" type="paired"> 1095 <output_collection name="out_pairs" type="paired">
1134 <element name="forward" decompress="True" file="cutadapt_out1.fq.gz" ftype="fastq.gz" /> 1096 <element name="forward" decompress="true" file="cutadapt_out1.fq.gz" ftype="fastq.gz" />
1135 <element name="reverse" decompress="True" file="cutadapt_out2.fq.gz" ftype="fastq.gz" /> 1097 <element name="reverse" decompress="true" file="cutadapt_out2.fq.gz" ftype="fastq.gz" />
1136 </output_collection> 1098 </output_collection>
1137 </test> 1099 </test>
1138 <!-- Ensure specifying quality cutoff (for both reads) works --> 1100 <!-- Ensure specifying quality cutoff (for both reads) works -->
1139 <test expect_num_outputs="3"> 1101 <test expect_num_outputs="3">
1140 <param name="type" value="paired_collection" /> 1102 <param name="type" value="paired_collection" />
1153 </conditional> 1115 </conditional>
1154 </repeat> 1116 </repeat>
1155 </section> 1117 </section>
1156 <section name="r2"> 1118 <section name="r2">
1157 <repeat name="adapters2"> 1119 <repeat name="adapters2">
1158 <conditional name="adapter_source2"> 1120 <conditional name="adapter_source">
1159 <param name="adapter_source_list2" value="user"/> 1121 <param name="adapter_source_list" value="user"/>
1160 <param name="adapter2" value="AGATCGGAAGAGC"/> 1122 <param name="adapter" value="AGATCGGAAGAGC"/>
1161 </conditional> 1123 </conditional>
1162 </repeat> 1124 </repeat>
1163 <param name="quality_cutoff2" value="15,20"/> 1125 <param name="quality_cutoff2" value="15,20"/>
1164 </section> 1126 </section>
1165 <output_collection name="out_pairs" type="paired"> 1127 <output_collection name="out_pairs" type="paired">
1166 <element name="forward" decompress="True" file="cutadapt_out1.fq.gz" ftype="fastq.gz" /> 1128 <element name="forward" decompress="true" file="cutadapt_out1.fq.gz" ftype="fastq.gz" />
1167 <element name="reverse" decompress="True" file="cutadapt_out2_cutoff.fq.gz" ftype="fastq.gz" /> 1129 <element name="reverse" decompress="true" file="cutadapt_out2_cutoff.fq.gz" ftype="fastq.gz" />
1168 </output_collection> 1130 </output_collection>
1131 <assert_command>
1132 <has_text text="--quality-cutoff=5"/>
1133 <has_text text="-Q=15,20"/>
1134 </assert_command>
1135 </test>
1136
1137 <!-- ployA trimmining https://github.com/marcelm/cutadapt/blob/e04cc32e392e1cbe0c518b4e0637cdf03533d440/tests/test_paired.py#L768 -->
1138 <test expect_num_outputs="3">
1139 <param name="type" value="paired_collection" />
1140 <param name="input_1">
1141 <collection type="paired">
1142 <element name="forward" ftype="fasta" value="cutadapt/data/polya.1.fasta" />
1143 <element name="reverse" ftype="fasta" value="cutadapt/data/polya.2.fasta" />
1144 </collection>
1145 </param>
1146 <param name="poly_a" value="true"/>
1147 <output_collection name="out_pairs" type="paired">
1148 <element name="forward" file="cutadapt/cut/polya.1.fasta" ftype="fasta" />
1149 <element name="reverse" file="cutadapt/cut/polya.2.fasta" ftype="fasta" />
1150 </output_collection>
1151 <assert_command>
1152 <has_text text="--poly-a"/>
1153 </assert_command>
1154 </test>
1155
1156 <!-- polyA legacy https://github.com/marcelm/cutadapt/blob/e04cc32e392e1cbe0c518b4e0637cdf03533d440/tests/test_commandline.py#L267 -->
1157 <test expect_num_outputs="1">
1158 <param name="type" value="single" />
1159 <param name="input_1" ftype="fasta" value="cutadapt/data/polya.1.fasta" />
1160 <section name="r1">
1161 <repeat name="adapters">
1162 <conditional name="adapter_source">
1163 <param name="adapter_source_list" value="user"/>
1164 <param name="adapter" value="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"/>
1165 </conditional>
1166 </repeat>
1167 </section>
1168 <param name="overlap" value="10"/>
1169 <output name="out1" file="cutadapt/cut/polya.legacy.1.fasta" ftype="fasta"/>
1170 <assert_command>
1171 <has_text text="-a 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'"/>
1172 <has_text text="--overlap=10"/>
1173 </assert_command>
1174 </test>
1175
1176 <!-- polyA legacy brace notation https://github.com/marcelm/cutadapt/blob/e04cc32e392e1cbe0c518b4e0637cdf03533d440/tests/test_commandline.py#L276 -->
1177 <test expect_num_outputs="1">
1178 <param name="type" value="single" />
1179 <param name="input_1" ftype="fasta" value="cutadapt/data/polya.1.fasta" />
1180 <section name="r1">
1181 <repeat name="adapters">
1182 <conditional name="adapter_source">
1183 <param name="adapter_source_list" value="user"/>
1184 <param name="adapter" value="A{35}"/>
1185 </conditional>
1186 </repeat>
1187 </section>
1188 <param name="overlap" value="10"/>
1189 <output name="out1" file="cutadapt/cut/polya.legacy.1.fasta" ftype="fasta"/>
1190 <assert_command>
1191 <has_text text="-a 'A{35}'"/>
1192 <has_text text="--overlap=10"/>
1193 </assert_command>
1194 </test>
1195
1196 <!-- polyA https://github.com/marcelm/cutadapt/blob/e04cc32e392e1cbe0c518b4e0637cdf03533d440/tests/test_commandline.py#L281 -->
1197 <test expect_num_outputs="1">
1198 <param name="type" value="single" />
1199 <param name="input_1" ftype="fasta" value="cutadapt/data/polya.1.fasta" />
1200 <param name="poly_a" value="true"/>
1201 <output name="out1" file="cutadapt/cut/polya.1.fasta" ftype="fasta"/>
1202 <assert_command>
1203 <has_text text="--poly-a"/>
1204 </assert_command>
1205 </test>
1206
1207 <!-- fasta.gz input https://github.com/marcelm/cutadapt/blob/e04cc32e392e1cbe0c518b4e0637cdf03533d440/tests/test_commandline.py#L78
1208 in contrast to the original test the tool automatically compresses the output -->
1209 <test expect_num_outputs="1">
1210 <param name="type" value="single" />
1211 <param name="input_1" ftype="fasta.gz" value="cutadapt/data/simple.fasta.gz" />
1212 <output name="out1" decompress="true" file="cutadapt/cut/simple.fasta.gz" ftype="fasta.gz"/>
1213 </test>
1214
1215 <!-- fatstqillumina input https://github.com/marcelm/cutadapt/blob/e04cc32e392e1cbe0c518b4e0637cdf03533d440/tests/test_commandline.py#L252 -->
1216 <test expect_num_outputs="1">
1217 <param name="type" value="single" />
1218 <param name="input_1" ftype="fastqillumina" value="cutadapt/data/illumina64.fastq" />
1219 <section name="r1">
1220 <repeat name="adapters">
1221 <conditional name="adapter_source">
1222 <param name="adapter_source_list" value="user"/>
1223 <param name="adapter" value="XXXXXX"/>
1224 </conditional>
1225 </repeat>
1226 </section>
1227 <param name="quality_cutoff" value="10"/>
1228 <output name="out1" file="cutadapt/cut/illumina64.fastq" ftype="fastqillumina"/>
1229 <assert_command>
1230 <has_text text="-a 'XXXXXX'"/>
1231 <has_text text="--quality-cutoff=10"/>
1232 <has_text text="--quality-base=64"/>
1233 </assert_command>
1234 </test>
1235 <!-- fatstqillumina input https://github.com/marcelm/cutadapt/blob/e04cc32e392e1cbe0c518b4e0637cdf03533d440/tests/test_commandline.py#L257 -->
1236 <test expect_num_outputs="1">
1237 <param name="type" value="single" />
1238 <param name="input_1" ftype="fastqillumina" value="cutadapt/data/illumina64.fastq" />
1239 <param name="quality_cutoff" value="10"/>
1240 <output name="out1" file="cutadapt/cut/illumina64.fastq" ftype="fastqillumina"/>
1241 <assert_command>
1242 <has_text text="--quality-cutoff=10"/>
1243 <has_text text="--quality-base=64"/>
1244 </assert_command>
1245 </test>
1246
1247 <!-- https://github.com/marcelm/cutadapt/blame/3407ac0004d04b11ae7157934a6665ecaf82c328/tests/test_commandline.py#L1028 -->
1248 <test expect_num_outputs="3">
1249 <param name="type" value="single" />
1250 <param name="input_1" ftype="fastqillumina" value="cutadapt/data/maxee.fastq" />
1251 <param name="max_expected_errors" value="0.9"/>
1252 <param name="output_selector" value="report,info_file"/>
1253 <output name="out1" file="cutadapt/cut/maxee.fastq" ftype="fastqillumina"/>
1254 <output name="report">
1255 <assert_contents>
1256 <has_text text="Reads with too many exp. errors: 2"/>
1257 </assert_contents>
1258 </output>
1259 <output name="info_file">
1260 <assert_contents>
1261 <has_n_lines n="4"/>
1262 <has_text text="ee_0.8&#09;-1&#09;ACGTTGCA&#09;++++++++"/>
1263 </assert_contents>
1264 </output>
1265 <assert_command>
1266 <has_text text="--max-expected-errors=0.9"/>
1267 </assert_command>
1268 </test>
1269
1270 <!-- https://github.com/marcelm/cutadapt/blob/3407ac0004d04b11ae7157934a6665ecaf82c328/tests/test_commandline.py#L335 -->
1271 <test expect_num_outputs="1">
1272 <param name="type" value="single" />
1273 <param name="input_1" ftype="fasta" value="cutadapt/data/wildcard.fa" />
1274 <section name="r1">
1275 <repeat name="anywhere_adapters">
1276 <conditional name="adapter_source">
1277 <param name="adapter_source_list" value="user"/>
1278 <param name="adapter" value="ACGTACGT"/>
1279 </conditional>
1280 </repeat>
1281 </section>
1282 <section name="adapter_options">
1283 <param name="match_read_wildcards" value="true"/>
1284 </section>
1285 <output name="out1" file="cutadapt/cut/wildcard.fa" ftype="fasta" sort="true"/>
1286 <assert_command>
1287 <has_text text="--match-read-wildcards"/>
1288 <has_text text="-b 'ACGTACGT'"/>
1289 </assert_command>
1290 </test>
1291
1292 <!-- https://github.com/marcelm/cutadapt/blob/3407ac0004d04b11ae7157934a6665ecaf82c328/tests/test_commandline.py#L368 -->
1293 <test expect_num_outputs="1">
1294 <param name="type" value="single" />
1295 <param name="input_1" ftype="fasta" value="cutadapt/data/wildcardN.fa" />
1296 <section name="r1">
1297 <repeat name="adapters">
1298 <conditional name="adapter_source">
1299 <param name="adapter_source_list" value="user"/>
1300 <param name="adapter" value="GGGGGGG"/>
1301 </conditional>
1302 </repeat>
1303 </section>
1304 <section name="adapter_options">
1305 <param name="match_read_wildcards" value="true"/>
1306 <param name="error_rate" value="0"/>
1307 </section>
1308 <output name="out1" file="cutadapt/cut/wildcardN.fa" ftype="fasta" sort="true"/>
1309 <assert_command>
1310 <has_text text="--match-read-wildcards"/>
1311 <has_text text="--error-rate=0.0"/>
1312 <has_text text="-a 'GGGGGGG'"/>
1313 </assert_command>
1169 </test> 1314 </test>
1170 </tests> 1315 </tests>
1171 1316
1172 <help><![CDATA[ 1317 <help><![CDATA[
1173 1318