comparison macros.xml @ 39:fe74900d6dc7 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/cutadapt commit a5b6cb44f81abe57a4269bded1fa4d41f462f9d5
author iuc
date Fri, 17 May 2024 13:32:03 +0000
parents b1c926deaa2d
children
comparison
equal deleted inserted replaced
38:b1c926deaa2d 39:fe74900d6dc7
1 <macros> 1 <macros>
2 <token name="@TOOL_VERSION@">4.8</token> 2 <token name="@TOOL_VERSION@">4.8</token>
3 <token name="@VERSION_SUFFIX@">0</token> 3 <token name="@VERSION_SUFFIX@">1</token>
4 <token name="@FASTQ_TYPES@">fastq.bz2,fastq.gz,fastq,fasta.bz2,fasta.gz,fasta</token> 4 <token name="@FASTQ_TYPES@">fastq.bz2,fastq.gz,fastq,fasta.bz2,fasta.gz,fasta</token>
5 <xml name="edam_ontology"> 5 <xml name="edam_ontology">
6 <edam_topics> 6 <edam_topics>
7 <edam_topic>topic_0632</edam_topic> 7 <edam_topic>topic_0632</edam_topic>
8 </edam_topics> 8 </edam_topics>
9 <edam_operations> 9 <edam_operations>
10 <edam_operation>operation_0231</edam_operation> 10 <edam_operation>operation_0231</edam_operation>
11 </edam_operations> 11 </edam_operations>
23 <xml name="xrefs"> 23 <xml name="xrefs">
24 <xrefs> 24 <xrefs>
25 <xref type='bio.tools'>cutadapt</xref> 25 <xref type='bio.tools'>cutadapt</xref>
26 </xrefs> 26 </xrefs>
27 </xml> 27 </xml>
28
29 <!-- parametrized token - you need to set `$ADAPTER_ARGUMENT` --> 28 <!-- parametrized token - you need to set `$ADAPTER_ARGUMENT` -->
30 <token name="@adapter_cli@"> 29 <token name="@adapter_cli@">
31 #if $a.adapter_source.adapter_source_list == 'builtin': 30 #if $a.adapter_source.adapter_source_list == 'builtin':
32 $ADAPTER_ARGUMENT '${a.adapter_source.adapter.fields.name}'='${a.adapter_source.adapter}${a.single_noindels}' 31 $ADAPTER_ARGUMENT '${a.adapter_source.adapter.fields.name}'='${a.adapter_source.adapter}${a.single_noindels}'
33 #else if $a.adapter_source.adapter_source_list == 'file': 32 #elif $a.adapter_source.adapter_source_list == 'file':
34 $ADAPTER_ARGUMENT file:'${a.adapter_source.adapter_file}${a.single_noindels}' 33 $ADAPTER_ARGUMENT file:'${a.adapter_source.adapter_file}${a.single_noindels}'
35 #else if str($a.adapter_source.adapter_name) != "": 34 #elif str($a.adapter_source.adapter_name) != "":
36 $ADAPTER_ARGUMENT '${a.adapter_source.adapter_name}'='${a.adapter_source.adapter}${a.single_noindels}' 35 $ADAPTER_ARGUMENT '${a.adapter_source.adapter_name}'='${a.adapter_source.adapter}${a.single_noindels}'
37 #else 36 #else:
38 $ADAPTER_ARGUMENT '${a.adapter_source.adapter}${a.single_noindels}' 37 $ADAPTER_ARGUMENT '${a.adapter_source.adapter}${a.single_noindels}'
39 #end if 38 #end if
40 </token> 39 </token>
41 40 <xml name="adapter_sanitizer">
42 <token name="@read1_options@"><![CDATA[ 41 <sanitizer>
43 42 <valid initial="string.digits">
44 ## Read1 trimming 43 <add value="A"/><!--standard nucleotides-->
45 44 <add value="T"/>
46 #set ADAPTER_ARGUMENT="-a" 45 <add value="C"/>
47 #for $a in $library.r1.adapters 46 <add value="G"/>
48 @adapter_cli@ 47 <add value="U"/><!--ambiguous nucleotides-->
49 #end for 48 <add value="R"/>
50 49 <add value="Y"/>
51 #set ADAPTER_ARGUMENT="-b" 50 <add value="S"/>
52 #for $a in $library.r1.anywhere_adapters 51 <add value="W"/>
53 @adapter_cli@ 52 <add value="K"/>
54 #end for 53 <add value="M"/>
55 54 <add value="B"/>
56 #set ADAPTER_ARGUMENT="-g" 55 <add value="D"/>
57 #for $a in $library.r1.front_adapters 56 <add value="H"/>
58 @adapter_cli@ 57 <add value="V"/>
59 #end for 58 <add value="N"/>
60 59 <add value="X"/><!-- don't match any nucleotide-->
61 #if str($cut) != '0': 60 <add value="{"/><!--specify repeats .. needs digits which are added as default-->
62 -u $cut 61 <add value="}"/>
63 #end if 62 <add value="^"/><!--anchoring-->
64 63 <add value="$"/>
65 ## Additional Outputs 64 <add value="."/>
66 65 <add value="("/><!--specify what to keep-->
67 #if 'info_file' in $output_selector: 66 <add value=")"/>
68 --info-file=$info_file 67 </valid>
69 #end if 68 </sanitizer>
70 #if 'rest_file' in $output_selector: 69 </xml>
71 --rest-file='${rest_output}' 70 <xml name="adapter_conditional" tokens="adapter_type,argument">
72 #end if 71 <conditional name="adapter_source">
73 #if 'wildcard_file' in $output_selector: 72 <param name="adapter_source_list" type="select" label="Source" >
74 --wildcard-file='${wild_output}' 73 <option value="builtin" selected="true">Standard (select from the list below)</option>
75 #end if 74 <option value="user">Enter custom sequence</option>
76 #if 'too_short_file' in $output_selector: 75 <option value="file">File from history</option>
77 --too-short-output='${too_short_output}' 76 </param>
78 #end if 77 <when value="user">
79 #if 'too_long_file' in $output_selector: 78 <param name="adapter_name" type="text" value="" optional="true" label="Custom @ADAPTER_TYPE@ adapter name" help="Optional if 'Multiple output' is selected in the Outputs selector'" />
80 --too-long-output='${too_long_output}' 79 <param name="adapter" argument="@ARGUMENT@" type="text" value="AATTGGCC" label="Custom @ADAPTER_TYPE@ adapter sequence">
81 #end if 80 <expand macro="adapter_sanitizer"/>
82 #if 'untrimmed_file' in $output_selector:
83 --untrimmed-output='${untrimmed_output}'
84 #end if
85
86 ]]></token>
87
88 <token name="@read2_options@"><![CDATA[
89
90 ## Read2 trimming
91
92 #set ADAPTER_ARGUMENT="-A"
93 #for $a in $library.r2.adapters2
94 @adapter_cli@
95 #end for
96 #set ADAPTER_ARGUMENT="-B"
97 #for $a in $library.r2.anywhere_adapters2
98 @adapter_cli@
99 #end for
100 #set ADAPTER_ARGUMENT="-G"
101 #for $a in $library.r2.front_adapters2
102 @adapter_cli@
103 #end for
104
105 #if str($library.r2.cut2) != '0':
106 -U $library.r2.cut2
107 #end if
108
109 ## Additional Outputs - Read 2
110
111 #if 'too_short_file' in $output_selector:
112 --too-short-paired-output='${too_short_paired_output}'
113 #end if
114 #if 'too_long_file' in $output_selector:
115 --too-long-paired-output='${too_long_paired_output}'
116 #end if
117 #if 'untrimmed_file' in $output_selector:
118 --untrimmed-paired-output='${untrimmed_paired_output}'
119 #end if
120
121 ]]></token>
122
123 <xml name="adapter_sanitizer">
124 <sanitizer>
125 <valid initial="string.digits">
126 <add value="A"/><!--standard nucleotides-->
127 <add value="T"/>
128 <add value="C"/>
129 <add value="G"/>
130
131 <add value="U"/><!--ambiguous nucleotides-->
132 <add value="R"/>
133 <add value="Y"/>
134 <add value="S"/>
135 <add value="W"/>
136 <add value="K"/>
137 <add value="M"/>
138 <add value="B"/>
139 <add value="D"/>
140 <add value="H"/>
141 <add value="V"/>
142 <add value="N"/>
143
144 <add value="X"/><!-- don't match any nucleotide-->
145
146 <add value="{"/><!--specify repeats .. needs digits which are added as default-->
147 <add value="}"/>
148
149 <add value="^"/><!--anchoring-->
150 <add value="$"/>
151 <add value="."/>
152 <add value="("/><!--specify what to keep-->
153 <add value=")"/>
154
155 </valid>
156 </sanitizer>
157 </xml>
158
159 <xml name="adapter_conditional" tokens="adapter_type,argument">
160 <conditional name="adapter_source">
161 <param name="adapter_source_list" type="select" label="Source" >
162 <option value="builtin" selected="true">Standard (select from the list below)</option>
163 <option value="user">Enter custom sequence</option>
164 <option value="file">File from history</option>
165 </param> 81 </param>
166 <when value="user"> 82 </when>
167 <param name="adapter_name" type="text" value="" optional="true" label="Custom @ADAPTER_TYPE@ adapter name" help="Optional if 'Multiple output' is selected in the Outputs selector'" /> 83 <when value="builtin">
168 <param name="adapter" argument="@ARGUMENT@" type="text" value="AATTGGCC" label="Custom @ADAPTER_TYPE@ adapter sequence"> 84 <param name="adapter" argument="@ARGUMENT@" type="select" label="@ADAPTER_TYPE@ adapter">
169 <expand macro="adapter_sanitizer"/> 85 <options from_data_table="adapters">
170 </param> 86 <filter type="sort_by" column="1" />
87 </options>
88 <expand macro="adapter_sanitizer"/>
89 </param>
90 </when>
91 <when value="file">
92 <param name="adapter_file" argument="@ARGUMENT@" format="fasta" type="data" label="File containing @ADAPTER_TYPE@ adapters" help="Should be of datatype FASTA" />
93 </when>
94 </conditional>
95 <param name="single_noindels" type="boolean" truevalue=";noindels" falsevalue="" checked="false" label="Disallow indels for this adapter"/>
96 </xml>
97 <xml name="read1_adapters" >
98 <section name="r1" title="Read 1 Adapters" expanded="true">
99 <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.">
100 <expand macro="adapter_conditional" argument="-a" adapter_type="3'"/>
101 </repeat>
102 <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.">
103 <expand macro="adapter_conditional" argument="-g" adapter_type="5'"/>
104 </repeat>
105 <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!">
106 <expand macro="adapter_conditional" argument="-b" adapter_type="5' or 3'"/>
107 </repeat>
108 </section>
109 </xml>
110 <xml name="read2_adapters">
111 <section name="r2" title="Read 2 Adapters" expanded="true">
112 <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.">
113 <expand macro="adapter_conditional" argument="-A" adapter_type="3'"/>
114 </repeat>
115 <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.">
116 <expand macro="adapter_conditional" argument="-G" adapter_type="5'"/>
117 </repeat>
118 <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!">
119 <expand macro="adapter_conditional" argument="-B" adapter_type="5' or 3'"/>
120 </repeat>
121 </section>
122 <param argument="--pair-adapters" type="boolean" truevalue="--pair-adapters" falsevalue="" label="Pairwise adapter search" help="The tool will normally look for R1 and R2 read adapters independently. By enabling this option you can have the lists of R1 and R2 read adapters handled pairwise instead. In this mode you need to provide equal numbers of R1 and R2 adapters of each type, or the tool will fail. For a more detailed explanation see the section Paired Adapters in the tool help below."/>
123 </xml>
124 <xml name="inherit_format_1">
125 <actions>
126 <conditional name="library.type">
127 <when value="single">
128 <action type="format">
129 <option type="from_param" name="library.input_1" param_attribute="ext" />
130 </action>
171 </when> 131 </when>
172 <when value="builtin"> 132 <when value="paired">
173 <param name="adapter" argument="@ARGUMENT@" type="select" label="@ADAPTER_TYPE@ adapter"> 133 <action type="format">
174 <options from_data_table="adapters"> 134 <option type="from_param" name="library.input_1" param_attribute="ext" />
175 <filter type="sort_by" column="1" /> 135 </action>
176 </options>
177 <expand macro="adapter_sanitizer"/>
178 </param>
179 </when>
180 <when value="file">
181 <param name="adapter_file" argument="@ARGUMENT@" format="fasta" type="data" label="File containing @ADAPTER_TYPE@ adapters" help="Should be of datatype FASTA" />
182 </when> 136 </when>
183 </conditional> 137 </conditional>
184 <param name="single_noindels" type="boolean" truevalue=";noindels" falsevalue="" checked="false" label="Disallow indels for this adapter"/> 138 </actions>
185 </xml> 139 </xml>
186 140 <xml name="inherit_format_2">
187 <xml name="single_end_options" > 141 <actions>
188 <section name="r1" title="Read 1 Options" expanded="true"> 142 <conditional name="library.type">
189 <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."> 143 <when value="paired">
190 <expand macro="adapter_conditional" argument="-a" adapter_type="3'"/> 144 <action type="format">
191 </repeat> 145 <option type="from_param" name="library.input_2" param_attribute="ext" />
192 <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."> 146 </action>
193 <expand macro="adapter_conditional" argument="-g" adapter_type="5'"/> 147 </when>
194 </repeat> 148 </conditional>
195 <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!"> 149 </actions>
196 <expand macro="adapter_conditional" argument="-b" adapter_type="5' or 3'"/> 150 </xml>
197 </repeat>
198 </section>
199 </xml>
200
201 <xml name="paired_end_options" >
202
203 <!-- Read 1 Options -->
204 <expand macro="single_end_options" />
205
206 <!-- Read 2 Options -->
207 <section name="r2" title="Read 2 Options" expanded="true">
208 <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.">
209 <expand macro="adapter_conditional" argument="-A" adapter_type="3'"/>
210 </repeat>
211 <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.">
212 <expand macro="adapter_conditional" argument="-G" adapter_type="5'"/>
213 </repeat>
214 <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!">
215 <expand macro="adapter_conditional" argument="-B" adapter_type="5' or 3'"/>
216 </repeat>
217
218 <!-- read modification -->
219 <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." />
220 <param name="quality_cutoff2" argument="-Q" 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">
221 <sanitizer>
222 <valid initial="string.digits"><add value="," /></valid>
223 </sanitizer>
224 <validator type="regex">[0-9]+(,[0-9])?</validator>
225 </param>
226 <!-- read filtering-->
227 <param name="minimum_length2" type="integer" min="0" value="" optional="true" label="Minimum length (R2)" />
228 <param name="maximum_length2" type="integer" min="0" value="" optional="true" label="Maximum length (R2)" />
229 </section>
230 </xml>
231
232 <xml name="inherit_format_1">
233 <actions>
234 <conditional name="library.type">
235 <when value="single">
236 <action type="format">
237 <option type="from_param" name="library.input_1" param_attribute="ext" />
238 </action>
239 </when>
240 <when value="paired">
241 <action type="format">
242 <option type="from_param" name="library.input_1" param_attribute="ext" />
243 </action>
244 </when>
245 </conditional>
246 </actions>
247 </xml>
248
249 <xml name="inherit_format_2">
250 <actions>
251 <conditional name="library.type">
252 <when value="paired">
253 <action type="format">
254 <option type="from_param" name="library.input_2" param_attribute="ext" />
255 </action>
256 </when>
257 </conditional>
258 </actions>
259 </xml>
260
261 </macros> 151 </macros>