comparison cutadapt.xml @ 16:8f1df515eb87 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/cutadapt commit 034c93600ce3279644d05f3675b4820ef7180851
author iuc
date Thu, 01 Nov 2018 19:19:11 -0400
parents 660cffd8d92a
children 52ef1be47553
comparison
equal deleted inserted replaced
15:660cffd8d92a 16:8f1df515eb87
1 <tool id="cutadapt" name="Cutadapt" version="1.16.3" profile="17.09"> 1 <tool id="cutadapt" name="Cutadapt" version="1.16.4" profile="17.09">
2 <description>Remove adapter sequences from Fastq/Fasta</description> 2 <description>Remove adapter sequences from Fastq/Fasta</description>
3 <macros> 3 <macros>
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 </macros> 5 </macros>
6 <requirements> 6 <requirements>
66 ln -f -s '${input_2}' '$read2' && 66 ln -f -s '${input_2}' '$read2' &&
67 #end if 67 #end if
68 68
69 ## Run Cutadapt 69 ## Run Cutadapt
70 70
71 #if $output_options.multiple_output:
72 mkdir split &&
73 #end if
74
71 cutadapt 75 cutadapt
72 76
73 ## cutadapt (up to version 1.16) can't be run in multicore mode with these options 77 ## cutadapt (up to version 1.16) can't be run in multicore mode with these options
74 #if not any(($output_options.info_file, $output_options.rest_file, $output_options.wildcard_file, $output_options.too_short_file, $output_options.too_long_file, $output_options.untrimmed_file)) 78 #if not any(($output_options.info_file, $output_options.rest_file, $output_options.wildcard_file, $output_options.too_short_file, $output_options.too_long_file, $output_options.untrimmed_file))
75 -j \${GALAXY_SLOTS:-1} 79 -j \${GALAXY_SLOTS:-1}
76 #end if 80 #end if
77 81
78 #if str( $library.type ) == "single": 82 #if str( $library.type ) == "single":
79 @read1_options@ 83 @read1_options@
80 --output='$out1' 84 #if $output_options.multiple_output:
85 --output='split/{name}.fastq'
86 #else:
87 --output='$out1'
88 #end if
81 #else: 89 #else:
82 @read1_options@ 90 @read1_options@
83 @read2_options@ 91 @read2_options@
84 --output='$out1' 92 --output='$out1'
85 --paired-output='$out2' 93 --paired-output='$out2'
88 --error-rate=$adapter_options.error_rate 96 --error-rate=$adapter_options.error_rate
89 --times=$adapter_options.count 97 --times=$adapter_options.count
90 --overlap=$adapter_options.overlap 98 --overlap=$adapter_options.overlap
91 $adapter_options.no_indels 99 $adapter_options.no_indels
92 $adapter_options.match_read_wildcards 100 $adapter_options.match_read_wildcards
93 101 $adapter_options.no_trim
102 $adapter_options.mask_adapter
94 103
95 $filter_options.discard 104 $filter_options.discard
96 $filter_options.discard_untrimmed 105 $filter_options.discard_untrimmed
97 $filter_options.no_trim
98 $filter_options.mask_adapter
99 #if str($filter_options.min) != '0': 106 #if str($filter_options.min) != '0':
100 --minimum-length=$filter_options.min 107 --minimum-length=$filter_options.min
101 #end if 108 #end if
102 #if str($filter_options.max) != '0': 109 #if str($filter_options.max) != '0':
103 --maximum-length=$filter_options.max 110 --maximum-length=$filter_options.max
173 <section name="adapter_options" title="Adapter Options"> 180 <section name="adapter_options" title="Adapter Options">
174 <param name="error_rate" 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)." /> 181 <param name="error_rate" 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)." />
175 <param name="no_indels" 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)." /> 182 <param name="no_indels" 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)." />
176 <param name="count" 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." /> 183 <param name="count" 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." />
177 <param name="overlap" 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." /> 184 <param name="overlap" 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." />
178 <param name="match_read_wildcards" argument="--match-read-wildcards" type="boolean" value="False" truevalue="--match-read-wildcards" falsevalue="" label="Match Read Wildcards" help="Allow 'N's in the read as matches to the adapter." /> 185 <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">
186 <option value=" " selected="True">In the adapters but not in the reads</option>
187 <option value="--match-read-wildcards">In the adapters and in the reads</option>
188 <option value="--no-match-adapter-wildcards">Nowhere</option>
189 </param>
190 <param name="no_trim" argument="--no-trim" type="boolean" value="False" truevalue="--no-trim" falsevalue="" label="Do not trim adapters" help="Match and redirect reads to output/untrimmed-output as usual, but don't remove the adapters (default: trim the adapters)." />
191 <param name="mask_adapter" argument="--mask-adapter" type="boolean" value="False" truevalue="--mask-adapter" falsevalue="" label="Mask Adapters" help="Mask adapter bases with 'N' instead of trimming them (default: trim adapters)." />
179 </section> 192 </section>
180 193
181 <!-- Filter Options --> 194 <!-- Filter Options -->
182 <section name="filter_options" title="Filter Options"> 195 <section name="filter_options" title="Filter Options">
183 <param name="discard" argument="--discard-trimmed" type="boolean" value="False" truevalue="--discard" 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!" /> 196 <param name="discard" argument="--discard-trimmed" type="boolean" value="False" truevalue="--discard" 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!" />
184 <param name="discard_untrimmed" argument="--discard_untrimmed" type="boolean" value="False" truevalue="--discard-untrimmed" falsevalue="" label="Discard Untrimmed Reads" help="Discard reads that do not contain the adapter." /> 197 <param name="discard_untrimmed" argument="--discard_untrimmed" type="boolean" value="False" truevalue="--discard-untrimmed" falsevalue="" label="Discard Untrimmed Reads" help="Discard reads that do not contain the adapter." />
185 <param name="min" argument="--minimum-length" type="integer" min="0" optional="True" value="0" label="Minimum length" help="Discard trimmed reads that are shorter than LENGTH. Reads that are too short even before adapter removal are also discarded. In colorspace, an initial primer is not counted. Value of 0 means no minimum length." /> 198 <param name="min" argument="--minimum-length" type="integer" min="0" optional="True" value="0" label="Minimum length" help="Discard trimmed reads that are shorter than LENGTH. Reads that are too short even before adapter removal are also discarded. In colorspace, an initial primer is not counted. Value of 0 means no minimum length." />
186 <param name="max" argument="--maximum-length" type="integer" min="0" optional="True" value="0" label="Maximum length" help="Discard trimmed reads that are longer than LENGTH. Reads that are too long even before adapter removal are also discarded. In colorspace, an initial primer is not counted. Value of 0 means no maximum length." /> 199 <param name="max" argument="--maximum-length" type="integer" min="0" optional="True" value="0" label="Maximum length" help="Discard trimmed reads that are longer than LENGTH. Reads that are too long even before adapter removal are also discarded. In colorspace, an initial primer is not counted. Value of 0 means no maximum length." />
187 <param name="no_trim" argument="--no-trim" type="boolean" value="False" truevalue="--no-trim" falsevalue="" label="Do not trim adapters" help="Match and redirect reads to output/untrimmed-output as usual, but don't remove the adapters (default: trim the adapters)." />
188 <param name="mask_adapter" argument="--mask-adapter" type="boolean" value="False" truevalue="--mask-adapter" falsevalue="" label="Mask Adapters" help="Mask adapter bases with 'N' instead of trimming them (default: trim adapters)." />
189 <param name="max_n" 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." /> 200 <param name="max_n" 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." />
190 <param name="pair_filter" 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"> 201 <param name="pair_filter" 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">
191 <option value="any" selected="True">any</option> 202 <option value="any" selected="True">any</option>
192 <option value="both">both</option> 203 <option value="both">both</option>
193 </param> 204 </param>
216 <param name="rest_file" argument="--rest-file" type="boolean" value="False" label="Rest of Read" help="When the adapter matches in the middle of a read, write the rest (after the adapter) into a file."/> 227 <param name="rest_file" argument="--rest-file" type="boolean" value="False" label="Rest of Read" help="When the adapter matches in the middle of a read, write the rest (after the adapter) into a file."/>
217 <param name="wildcard_file" argument="--wildcard-file" type="boolean" value="False" label="Wildcard File" help="When the adapter has wildcard bases ('N's) write adapter bases matching wildcard positions to file."/> 228 <param name="wildcard_file" argument="--wildcard-file" type="boolean" value="False" label="Wildcard File" help="When the adapter has wildcard bases ('N's) write adapter bases matching wildcard positions to file."/>
218 <param name="too_short_file" argument="--too-short-output" type="boolean" value="False" label="Too Short Reads" help="Write reads that are too short (according to minimum length specified) to a file. (default: discard reads)"/> 229 <param name="too_short_file" argument="--too-short-output" type="boolean" value="False" label="Too Short Reads" help="Write reads that are too short (according to minimum length specified) to a file. (default: discard reads)"/>
219 <param name="too_long_file" argument="--too-long-output" type="boolean" value="False" label="Too Long Reads" help="Write reads that are too long (according to maximum length specified) to a file. (default: discard reads)"/> 230 <param name="too_long_file" argument="--too-long-output" type="boolean" value="False" label="Too Long Reads" help="Write reads that are too long (according to maximum length specified) to a file. (default: discard reads)"/>
220 <param name="untrimmed_file" argument="--untrimmed-output" type="boolean" value="False" label="Untrimmed Reads" help="Write reads that do not contain the adapter to a separate file, instead of writing them to the regular output file. (default: output to same file as trimmed)"/> 231 <param name="untrimmed_file" argument="--untrimmed-output" type="boolean" value="False" label="Untrimmed Reads" help="Write reads that do not contain the adapter to a separate file, instead of writing them to the regular output file. (default: output to same file as trimmed)"/>
232 <param name="multiple_output" argument="" type="boolean" value="False" label="Multiple output" help="Create a separate file for each adapter trimmed (default: all trimmed reads are in a single file)"/>
221 </section> 233 </section>
222 234
223 </inputs> 235 </inputs>
224 236
225 <outputs> 237 <outputs>
275 <data name="too_long_paired_output" format="fastqsanger" metadata_source="input_2" label="${tool.name} on ${on_string}: Too Long Read 2" > 287 <data name="too_long_paired_output" format="fastqsanger" metadata_source="input_2" label="${tool.name} on ${on_string}: Too Long Read 2" >
276 <filter>(library['type'] == 'paired' or library['type'] == 'paired_collection')</filter> 288 <filter>(library['type'] == 'paired' or library['type'] == 'paired_collection')</filter>
277 <filter>(output_options['too_long_file'] is True)</filter> 289 <filter>(output_options['too_long_file'] is True)</filter>
278 <expand macro="inherit_format_2" /> 290 <expand macro="inherit_format_2" />
279 </data> 291 </data>
292
293 <collection name="split_output" type="list" format_source="input" label="${tool.name} on ${on_string}: Split outputs">
294 <discover_datasets pattern="__designation_and_ext__" directory="split" visible="false" />
295 <filter>(output_options['multiple_output'] is True)</filter>
296 </collection>
297
280 </outputs> 298 </outputs>
281 299
282 <tests> 300 <tests>
283 <!-- Ensure fastq works --> 301 <!-- Ensure fastq works -->
284 <test> 302 <test>
379 <has_text text="Summary"/> 397 <has_text text="Summary"/>
380 </assert_contents> 398 </assert_contents>
381 </output> 399 </output>
382 <output name="info_file" value="cutadapt_info_out.txt" ftype="txt"/> 400 <output name="info_file" value="cutadapt_info_out.txt" ftype="txt"/>
383 </test> 401 </test>
402
403
404 <test>
405 <conditional name="library">
406 <param name="type" value="single" />
407 <param name="input_1" ftype="fastq" value="cutadapt_in_split.fastq" />
408 <section name="r1" >
409 <repeat name="front_adapters">
410 <conditional name="front_adapter_source">
411 <param name="front_adapter_source_list" value="user"/>
412 <param name="front_adapter_name" value="A1" />
413 <param name="front_adapter" value="^GTCGGTAA" />
414 </conditional>
415 </repeat>
416 <repeat name="front_adapters">
417 <conditional name="front_adapter_source">
418 <param name="front_adapter_source_list" value="user"/>
419 <param name="front_adapter_name" value="A2" />
420 <param name="front_adapter" value="^AGGTCACT" />
421 </conditional>
422 </repeat>
423 </section>
424 </conditional>
425 <param name="report" value="True" />
426 <param name="info_file" value="False" />
427 <param name="multiple_output" value="True" />
428 <output_collection name="split_output" type="list" count="3">
429 <element name="A1" value="A1.fastq" ftype="fastq">
430 </element>
431 <element name="A2" value="A2.fastq" ftype="fastq">
432 </element>
433 <element name="unknown" value="unknown.fastq" ftype="fastq">
434 </element>
435 </output_collection>
436 <output name="report">
437 <assert_contents>
438 <has_text text="Summary"/>
439 </assert_contents>
440 </output>
441 </test>
442
443
384 </tests> 444 </tests>
385 445
386 <help><![CDATA[ 446 <help><![CDATA[
387 447
388 .. class:: infomark 448 .. class:: infomark