comparison obigrep.xml.orig @ 5:e2332ae385c4 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/obitools commit a01e3c562cf5d62af522b893a25abde6476a1f45
author iuc
date Thu, 30 Oct 2025 16:04:12 +0000
parents d0f6ac976373
children
comparison
equal deleted inserted replaced
4:d0f6ac976373 5:e2332ae385c4
1 <<<<<<< HEAD
2 <tool id="obi_grep" name="obigrep" version="@TOOL_VERSION@" profile="@PROFILE@">
3 <description>Filters sequence file</description>
4 <macros>
5 <import>macros.xml</import>
6 </macros>
7 <expand macro="requirements"/>
8 <expand macro="stdio"/>
9 <command><![CDATA[
10 @GUNZIP_INPUT@
11
12 obigrep
13 --without-progress-bar
14 ${v}
15 #if str($options_grep.options_grep_selector) == 'sequence'
16 -s ${options_grep.sequence}
17 #else if str($options_grep.options_grep_selector) == 'definition'
18 -D ${options_grep.definition}
19 #else if str($options_grep.options_grep_selector) == 'identifier'
20 -I ${options_grep.identifier}
21 #else if str($options_grep.options_grep_selector) == 'idlist'
22 --id-list '${options_grep.idlist}'
23 #else if str($options_grep.options_grep_selector) == 'attribute'
24 -a ${options_grep.attribute}
25 #else if str($options_grep.options_grep_selector) == 'hasattribute'
26 -A ${options_grep.attribute}
27 #else if str($options_grep.options_grep_selector) == 'predicat'
28 -p ${options_grep.predicat}
29 #else if str($options_grep.options_grep_selector) == 'lmax'
30 -L ${options_grep.lmax}
31 #else if str($options_grep.options_grep_selector) == 'lmin'
32 -l ${options_grep.lmin}
33 #end if
34 @INPUT_FORMAT@
35 @OUT_FORMAT@
36 input
37 @GZIP_OUTPUT@
38 > '$output'
39 @GENERATE_GALAXY_JSON@
40 ]]></command>
41 <inputs>
42 <param name="input" type="data" format="@INPUT_FORMATS@" label="Input sequences file" />
43 <conditional name="options_grep">
44 <param name="options_grep_selector" type="select" label="Choose the sequence record selection option" >
45 <option value="sequence" selected="true">sequence</option>
46 <option value="definition">definition</option>
47 <option value="identifier">identifier</option>
48 <option value="idlist">idlist</option>
49 <option value="attribute">attribute</option>
50 <option value="hasattribute">hasattribute</option>
51 <option value="predicat">predicat</option>
52 <option value="lmax">lmax</option>
53 <option value="lmin">lmin</option>
54 </param>
55 <when value="sequence">
56 <param name="sequence" type="text" label="Regular expression pattern to be tested against the sequence itself. The pattern is case insensitive." >
57 <expand macro="sanitizer" />
58 </param>
59 </when>
60 <when value="definition">
61 <param name="definition" type="text" label="Regular expression pattern to be tested against the definition of the sequence record. The pattern is case sensitive." >
62 <expand macro="sanitizer" />
63 </param>
64 </when>
65 <when value="identifier">
66 <param name="identifier" type="text" label="Regular expression pattern to be tested against the identifier of the sequence record. The pattern is case sensitive." >
67 <expand macro="sanitizer" />
68 </param>
69 </when>
70 <when value="idlist">
71 <param name="idlist" type="data" format="txt,tabular" label="points to a text file containing the list of sequence record identifiers to be selected. The file format consists in a single identifier per line." />
72 </when>
73 <when value="attribute">
74 <param name="attribute" type="text" label="Regular expression pattern matched against the attributes of the sequence record. the value of this attribute is of the form : key:regular_pattern. The pattern is case sensitive." >
75 <expand macro="sanitizer" />
76 </param>
77 </when>
78 <when value="hasattribute">
79 <param name="hasattribute" type="text" label="Selects sequence records having an attribute who is key." >
80 <expand macro="sanitizer" />
81 </param>
82 </when>
83 <when value="predicat">
84 <param name="predicat" type="text" label="Python boolean expression to be evaluated for each sequence record." help="The attribute keys defined for each sequence record can be used in the expression as variable names. An extra variable named sequenceefers to the sequence record itself." >
85 <expand macro="sanitizer" />
86 </param>
87 </when>
88 <when value="lmax">
89 <param name="lmax" type="text" label="lmax" help="Keeps sequence records whose sequence length is equal or shorter than lmax" />
90 </when>
91 <when value="lmin">
92 <param name="lmin" type="text" label="lmin" help="Keeps sequence records whose sequence length is equal or longer than lmin"/>
93 </when>
94 </conditional>
95
96 <param name="v" type="boolean" truevalue="-v" falsevalue="" checked="false" label="Invert the sequence record selection (option -v)" />
97 <expand macro="input_format_options_macro"/>
98 <expand macro="out_format_macro"/>
99 </inputs>
100 <outputs>
101 <data format="auto" name="output"/>
102 </outputs>
103 <tests>
104 <test>
105 <param name="input" value="illuminapairedend.output.fastq" />
106 <conditional name="options_grep">
107 <param name="options_grep_selector" value="lmin"/>
108 <param name="lmin" value="80"/>
109 </conditional>
110 <param name="v" value="true" />
111 <param name="out_format" value="fastq" />
112 <output name="output" file="output_obigrep_lmin.fastq" ftype="fastqsanger"/>
113 </test>
114 <test>
115 <param name="input" value="illuminapairedend.output.fastq.gz" ftype="fastq.gz" />
116 <conditional name="options_grep">
117 <param name="options_grep_selector" value="predicat"/>
118 <param name="predicat" value='mode!="joined"'/>
119 </conditional>
120 <param name="v" value="false" />
121 <param name="out_format" value="fasta" />
122 <output name="output" file="output_obigrep_predicat.fasta.gz" ftype="fasta.gz" decompress="true"/>
123 </test>
124 </tests>
125 <help><![CDATA[
126
127 .. class:: infomark
128
129 **What it does**
130
131 The obigrep command is in some way analog to the standard Unix grep command. It selects a subset of sequence records from a sequence file.
132
133 A sequence record is a complex object composed of an identifier, a set of attributes (key=value), a definition, and the sequence itself.
134
135 Instead of working text line by text line as the standard Unix tool, selection is done sequence record by sequence record. A large set of options allows refining selection on any of the sequence record elements.
136
137 Moreover obigrep allows specifying simultaneously several conditions (that take the value TRUE or FALSE) and only the sequence records that fulfill all the conditions (all conditions are TRUE) are selected.
138
139 Sequence record selection options :
140 * sequence : Regular expression pattern to be tested against the sequence itself. ex: GAATTC
141
142 * definition : Regular expression pattern to be tested against the definition of the sequence record. ex: [Cc]hloroplast
143
144 * identifier : Regular expression pattern to be tested against the identifier of the sequence record. ex: ^GH
145
146 * idlist : points to a text file containing the list of sequence record identifiers to be selected.
147
148 * attribute : Regular expression pattern matched against the attributes of the sequence record. the value of this attribute is of the form : key:regular_pattern. ex:'family_name:Asteraceae'
149
150 * hasattribute : Selects sequence records having an attribute whose key = KEY.
151
152 * predicat : Python boolean expression to be evaluated for each sequence record. The attribute keys defined for each sequence record can be used in the expression as variable names. An extra variable named ‘sequence’ refers to the sequence record itself. ex: mode!="joined"
153
154 * lmax : Keeps sequence records whose sequence length is equal or shorter than lmax. ex : 100
155
156 * lmin : Selects sequence records whose sequence length is equal or longer than lmin. ex : 100
157
158 @OBITOOLS_LINK@
159
160 ]]>
161
162 </help>
163 <expand macro="citation" />
164
165 </tool>
166 =======
167 <tool id="obi_grep" name="obigrep" version="@TOOL_VERSION@">
168 <description>Filters sequence file</description>
169 <expand macro="bio_tools"/>
170 <macros>
171 <import>macros.xml</import>
172 </macros>
173 <expand macro="requirements"/>
174 <expand macro="stdio"/>
175
176 <command>
177
178 <![CDATA[
179 obigrep
180 ${v}
181 #if str($options_grep.options_grep_selector) == 'sequence'
182 -s ${options_grep.sequence}
183 #else if str($options_grep.options_grep_selector) == 'definition'
184 -D ${options_grep.definition}
185 #else if str($options_grep.options_grep_selector) == 'identifier'
186 -I ${options_grep.identifier}
187 #else if str($options_grep.options_grep_selector) == 'idlist'
188 --id-list '$options_grep.idlist}
189 #else if str($options_grep.options_grep_selector) == 'attribute'
190 -a ${options_grep.attribute}
191 #else if str($options_grep.options_grep_selector) == 'hasattribute'
192 -A ${options_grep.attribute}
193 #else if str($options_grep.options_grep_selector) == 'predicat'
194 -p ${options_grep.predicat}
195 #else if str($options_grep.options_grep_selector) == 'lmax'
196 -L ${options_grep.lmax}
197 #else if str($options_grep.options_grep_selector) == 'lmin'
198 -l ${options_grep.lmin}
199 #end if
200 '$input' > '$output'
201 ]]>
202
203 </command>
204
205 <inputs>
206 <param name="input" type="data" format="fasta,fastq" label="Input sequences file" />
207 <conditional name="options_grep">
208 <param name="options_grep_selector" type="select" label="Choose the sequence record selection option" >
209 <option value="sequence" selected="true">sequence</option>
210 <option value="definition">definition</option>
211 <option value="identifier">identifier</option>
212 <option value="idlist">idlist</option>
213 <option value="attribute">attribute</option>
214 <option value="hasattribute">hasattribute</option>
215 <option value="predicat">predicat</option>
216 <option value="lmax">lmax</option>
217 <option value="lmin">lmin</option>
218 </param>
219 <when value="sequence">
220 <param name="sequence" type="text" label="Regular expression pattern to be tested against the sequence itself. The pattern is case insensitive." >
221 <expand macro="sanitizer" />
222 </param>
223 </when>
224 <when value="definition">
225 <param name="definition" type="text" label="Regular expression pattern to be tested against the definition of the sequence record. The pattern is case sensitive." >
226 <expand macro="sanitizer" />
227 </param>
228 </when>
229 <when value="identifier">
230 <param name="identifier" type="text" label="Regular expression pattern to be tested against the identifier of the sequence record. The pattern is case sensitive." >
231 <expand macro="sanitizer" />
232 </param>
233 </when>
234 <when value="idlist">
235 <param name="idlist" type="data" format="txt,tabular" label="points to a text file containing the list of sequence record identifiers to be selected. The file format consists in a single identifier per line." />
236 </when>
237 <when value="attribute">
238 <param name="attribute" type="text" label="Regular expression pattern matched against the attributes of the sequence record. the value of this attribute is of the form : key:regular_pattern. The pattern is case sensitive." >
239 <expand macro="sanitizer" />
240 </param>
241 </when>
242 <when value="hasattribute">
243 <param name="hasattribute" type="text" label="Selects sequence records having an attribute who is key." >
244 <expand macro="sanitizer" />
245 </param>
246 </when>
247 <when value="predicat">
248 <param name="predicat" type="text" label="Python boolean expression to be evaluated for each sequence record." help="The attribute keys defined for each sequence record can be used in the expression as variable names. An extra variable named sequenceefers to the sequence record itself." >
249 <expand macro="sanitizer" />
250 </param>
251 </when>
252 <when value="lmax">
253 <param name="lmax" type="text" label="lmax" help="Keeps sequence records whose sequence length is equal or shorter than lmax" />
254 </when>
255 <when value="lmin">
256 <param name="lmin" type="text" label="lmin" help="Keeps sequence records whose sequence length is equal or longer than lmin"/>
257 </when>
258 </conditional>
259
260 <param name="v" type="boolean" truevalue="-v" falsevalue="" checked="false" label="Invert the sequence record selection (option -v)" />
261 <param name="out_format" type="select" label="Output data type">
262 <option value="fasta">fasta</option>
263 <option value="fastq">fastq</option>
264 </param>
265
266 </inputs>
267 <outputs>
268 <data format="fastq" name="output" label="output with ${tool.name} on ${on_string}" >
269 <change_format>
270 <when input="out_format" value="fasta" format="fasta" />
271 </change_format>
272 </data>
273 </outputs>
274 <tests>
275 <test>
276 <param name="input" value="illuminapairedend.output.fastq" />
277 <conditional name="options_grep">
278 <param name="options_grep_selector" value="lmin"/>
279 <param name="lmin" value="80"/>
280 </conditional>
281 <param name="v" value="true" />
282 <param name="out_format" value="fastq" />
283 <output name="output" file="output_obigrep_lmin.fastq" ftype="fastq"/>
284 </test>
285 <test>
286 <param name="input" value="illuminapairedend.output.fastq" />
287 <conditional name="options_grep">
288 <param name="options_grep_selector" value="predicat"/>
289 <param name="predicat" value='mode!="joined"'/>
290 </conditional>
291 <param name="v" value="false" />
292 <param name="out_format" value="fasta" />
293 <output name="output" file="output_obigrep_predicat.fasta" ftype="fasta"/>
294 </test>
295 </tests>
296 <help><![CDATA[
297
298 .. class:: infomark
299
300 **What it does**
301
302 The obigrep command is in some way analog to the standard Unix grep command. It selects a subset of sequence records from a sequence file.
303
304 A sequence record is a complex object composed of an identifier, a set of attributes (key=value), a definition, and the sequence itself.
305
306 Instead of working text line by text line as the standard Unix tool, selection is done sequence record by sequence record. A large set of options allows refining selection on any of the sequence record elements.
307
308 Moreover obigrep allows specifying simultaneously several conditions (that take the value TRUE or FALSE) and only the sequence records that fulfill all the conditions (all conditions are TRUE) are selected.
309
310 Sequence record selection options :
311 * sequence : Regular expression pattern to be tested against the sequence itself. ex: GAATTC
312
313 * definition : Regular expression pattern to be tested against the definition of the sequence record. ex: [Cc]hloroplast
314
315 * identifier : Regular expression pattern to be tested against the identifier of the sequence record. ex: ^GH
316
317 * idlist : points to a text file containing the list of sequence record identifiers to be selected.
318
319 * attribute : Regular expression pattern matched against the attributes of the sequence record. the value of this attribute is of the form : key:regular_pattern. ex:'family_name:Asteraceae'
320
321 * hasattribute : Selects sequence records having an attribute whose key = KEY.
322
323 * predicat : Python boolean expression to be evaluated for each sequence record. The attribute keys defined for each sequence record can be used in the expression as variable names. An extra variable named ‘sequence’ refers to the sequence record itself. ex: mode!="joined"
324
325 * lmax : Keeps sequence records whose sequence length is equal or shorter than lmax. ex : 100
326
327 * lmin : Selects sequence records whose sequence length is equal or longer than lmin. ex : 100
328
329 @OBITOOLS_LINK@
330
331 ]]>
332
333 </help>
334 <expand macro="citation" />
335
336 </tool>
337 >>>>>>> 7abad681f (add tools up until P)