comparison catWrapper.xml @ 8:5b2cc63d7a21 draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/main/tools/concat_multi_datasets commit 424954037a50876b306f397efd8e9790f62416bd
author artbio
date Fri, 13 Oct 2023 09:46:58 +0000
parents 55cf9d9defd1
children 5b1b635232ed
comparison
equal deleted inserted replaced
7:55cf9d9defd1 8:5b2cc63d7a21
1 <tool id="cat_multi_datasets" name="Concatenate multiple datasets" version="1.4.1"> 1 <tool id="cat_multi_datasets" name="Concatenate multiple datasets" version="1.4.2">
2 <description>tail-to-head by specifying how</description> 2 <description>tail-to-head while specifying how</description>
3 <command><![CDATA[ 3 <command><![CDATA[
4 #if $headers == 0: 4 #if $headers == 0:
5 #set $concat_command = "cat" 5 #set $concat_command = "cat"
6 #else: 6 #else:
7 #set $concat_command = 'tail -q -n +'+ str(int($headers)+1) 7 #set $concat_command = 'tail -q -n +'+ str(int($headers)+1)
231 <option value="simple_collections">2 Collections</option> 231 <option value="simple_collections">2 Collections</option>
232 <option value="paired_collection">Paired collection</option> 232 <option value="paired_collection">Paired collection</option>
233 <option value="nested_collection">Nested collection</option> 233 <option value="nested_collection">Nested collection</option>
234 </param> 234 </param>
235 <when value="singles"> 235 <when value="singles">
236 <param name="inputs" type="data" label="Concatenate Datasets" multiple="True" help="All inputed datasets will be concatenated tail-to-head."/> 236 <param name="inputs" type="data" label="Concatenate Datasets" multiple="True" format="fastq,fastq.gz,txt,tabular,bed"
237 help="All inputed datasets will be concatenated tail-to-head."/>
237 </when> 238 </when>
238 <when value="paired_collection"> 239 <when value="paired_collection">
239 <param name="inputs" type="data_collection" collection_type="list:paired" label="Input paired collection to concatenate"/> 240 <param name="inputs" type="data_collection" collection_type="list:paired" format="fastq,fastq.gz,txt,tabular,bed"
241 label="Input paired collection to concatenate"/>
240 <param name="paired_cat_type" type="select" label="What type of concatenation do you wish to perform?"> 242 <param name="paired_cat_type" type="select" label="What type of concatenation do you wish to perform?">
241 <option value="by_strand">Concatenate all datsets of same strand (outputs a single pair of datasets)</option> 243 <option value="by_strand">Concatenate all datsets of same strand (outputs a single pair of datasets)</option>
242 <option value="by_pair">Concatenate pairs of datasets (outputs an unpaired collection of datasets)</option> 244 <option value="by_pair">Concatenate pairs of datasets (outputs an unpaired collection of datasets)</option>
243 <option value="all">Concatenate all datasets into a single file regardless of strand (outputs a single file)</option> 245 <option value="all">Concatenate all datasets into a single file regardless of strand (outputs a single file)</option>
244 </param> 246 </param>
260 </data> 262 </data>
261 <data name="paired_out_file" label="${global_condition.inputs.element_identifier}" auto_format="true"> 263 <data name="paired_out_file" label="${global_condition.inputs.element_identifier}" auto_format="true">
262 <filter>global_condition['input_type'] == 'paired_collection' and global_condition['paired_cat_type'] == 'all'</filter> 264 <filter>global_condition['input_type'] == 'paired_collection' and global_condition['paired_cat_type'] == 'all'</filter>
263 </data> 265 </data>
264 <collection name="paired_output" type="paired" label="Concatenation by strtand"> 266 <collection name="paired_output" type="paired" label="Concatenation by strtand">
265 <discover_datasets pattern="(?P&lt;name&gt;.*)\.listed\.(?P&lt;ext&gt;.*)\.listed" visible="false" directory="concatenated"/> 267 <discover_datasets pattern="(?P&lt;name&gt;.*)\.listed\.(?P&lt;ext&gt;.*)\.listed" format="fastq" visible="false" directory="concatenated"/>
266 <filter>global_condition['input_type'] == 'paired_collection' and global_condition['paired_cat_type'] == 'by_strand'</filter> 268 <filter>global_condition['input_type'] == 'paired_collection' and global_condition['paired_cat_type'] == 'by_strand'</filter>
267 </collection> 269 </collection>
268 <collection name="list_output" type="list" label="Concatenation by pairs"> 270 <collection name="list_output" type="list" label="Concatenation by pairs">
269 <discover_datasets pattern="(?P&lt;identifier_0&gt;.*)\.listed\.(?P&lt;ext&gt;.*)\.listed" visible="false" directory="concatenated"/> 271 <discover_datasets pattern="(?P&lt;identifier_0&gt;.*)\.listed\.(?P&lt;ext&gt;.*)\.listed" format="fastq" visible="false" directory="concatenated"/>
270 <filter>(global_condition['input_type'] == 'paired_collection' and global_condition['paired_cat_type'] == 'by_pair') or (global_condition['input_type'] == 'simple_collections') or (global_condition['input_type'] == 'nested_collection')</filter> 272 <filter>(global_condition['input_type'] == 'paired_collection' and global_condition['paired_cat_type'] == 'by_pair') or (global_condition['input_type'] == 'simple_collections') or (global_condition['input_type'] == 'nested_collection')</filter>
271 </collection> 273 </collection>
272 </outputs> 274 </outputs>
273 <tests> 275 <tests>
274 <!-- Single files concatenation --> 276 <!-- Single files concatenation -->
275 <test> <!-- Test 2 single files concatenation with no other option --> 277 <test expect_num_outputs="1"> <!-- Test 1 single files concatenation with no other option -->
276 <param name="input_type" value="singles" /> 278 <param name="input_type" value="singles" />
277 <param name="inputs" value="1.bed,2.bed"/> 279 <param name="inputs" value="1.bed,2.bed"/>
278 <param name="dataset_names" value="No" /> 280 <param name="dataset_names" value="No" />
279 <param name="headers" value="0" /> 281 <param name="headers" value="0" />
280 <output name="out_file1" file="cat_wrapper_out1.bed"/> 282 <output name="out_file1" file="cat_wrapper_out1.bed"/>
281 </test> 283 </test>
282 <test> <!-- Test 2 single files concatenation with dataset names activated --> 284 <test expect_num_outputs="1"> <!-- Test 2 single files concatenation with dataset names activated -->
283 <param name="input_type" value="singles" /> 285 <param name="input_type" value="singles" />
284 <param name="inputs" value="1.bed,2.bed"/> 286 <param name="inputs" value="1.bed,2.bed"/>
285 <param name="dataset_names" value="Yes" /> 287 <param name="dataset_names" value="Yes" />
286 <param name="headers" value="0" /> 288 <param name="headers" value="0" />
287 <output name="out_file1" file="cat_wrapper_out2.bed"/> 289 <output name="out_file1" file="cat_wrapper_out2.bed"/>
288 </test> 290 </test>
289 <test> <!-- Test 2 single files concatenation skipping 1 line --> 291 <test expect_num_outputs="1"> <!-- Test 3 single files concatenation skipping 1 line -->
290 <param name="input_type" value="singles" /> 292 <param name="input_type" value="singles" />
291 <param name="inputs" value="1.bed,2.bed"/> 293 <param name="inputs" value="1.bed,2.bed"/>
292 <param name="dataset_names" value="No" /> 294 <param name="dataset_names" value="No" />
293 <param name="headers" value="1" /> 295 <param name="headers" value="1" />
294 <output name="out_file1" file="cat_wrapper_out3.bed"/> 296 <output name="out_file1" file="cat_wrapper_out3.bed"/>
295 </test> 297 </test>
296 <test> <!-- Test gz handling with no options --> 298 <test expect_num_outputs="1"> <!-- Test 4 gz handling with no options -->
297 <param name="input_type" value="singles" /> 299 <param name="input_type" value="singles" />
298 <param name="inputs" value="1_f.fastq.gz,1_r.fastq.gz"/> 300 <param name="inputs" value="1_f.fastq.gz,1_r.fastq.gz"/>
299 <param name="dataset_names" value="No" /> 301 <param name="dataset_names" value="No" />
300 <param name="headers" value="0" /> 302 <param name="headers" value="0" />
301 <output name="out_file1" file="1.fastq.gz" decompress="True"/> 303 <output name="out_file1" file="1.fastq.gz" decompress="True"/>
302 </test> 304 </test>
303 <test> <!-- Test gz handling with options --> 305 <test expect_num_outputs="1"> <!-- Test 5 gz handling with options -->
304 <param name="input_type" value="singles" /> 306 <param name="input_type" value="singles" />
305 <param name="inputs" value="1_f.fastq.gz,1_r.fastq.gz"/> 307 <param name="inputs" value="1_f.fastq.gz,1_r.fastq.gz"/>
306 <param name="dataset_names" value="Yes" /> 308 <param name="dataset_names" value="Yes" />
307 <param name="headers" value="4" /> 309 <param name="headers" value="4" />
308 <output name="out_file1" file="1_options.fastq.gz" decompress="True"/> 310 <output name="out_file1" file="1_options.fastq.gz" decompress="True"/>
309 </test> 311 </test>
310 <!-- Test paired options --> 312 <!-- Test paired options -->
311 <test> <!-- Test paired collection concatenation by_pair with no other option --> 313 <test expect_num_outputs="1"> <!-- Test 6 paired collection concatenation by_pair with no other option -->
312 <param name="input_type" value="paired_collection" /> 314 <param name="input_type" value="paired_collection" />
313 <param name="paired_cat_type" value="by_pair"/> 315 <param name="paired_cat_type" value="by_pair"/>
314 <param name="inputs"> 316 <param name="inputs">
315 <collection type="list:paired"> 317 <collection type="list:paired">
316 <element name="2"> 318 <element name="2">
339 <element name="2" file="2.fastq"/> 341 <element name="2" file="2.fastq"/>
340 <element name="3" file="3.fastq"/> 342 <element name="3" file="3.fastq"/>
341 <element name="4" file="4.fastq"/> 343 <element name="4" file="4.fastq"/>
342 </output_collection> 344 </output_collection>
343 </test> 345 </test>
344 <test> <!-- Test paired collection concatenation by_strand with no other option --> 346 <test expect_num_outputs="1"> <!-- Test 7 paired collection concatenation by_strand with no other option -->
345 <param name="input_type" value="paired_collection" /> 347 <param name="input_type" value="paired_collection" />
346 <param name="paired_cat_type" value="by_strand"/> 348 <param name="paired_cat_type" value="by_strand"/>
347 <param name="inputs"> 349 <param name="inputs">
348 <collection type="list:paired"> 350 <collection type="list:paired">
349 <element name="2"> 351 <element name="2">
371 <output_collection name="paired_output" type="paired" > 373 <output_collection name="paired_output" type="paired" >
372 <element name="forward" file="f.fastq"/> 374 <element name="forward" file="f.fastq"/>
373 <element name="reverse" file="r.fastq"/> 375 <element name="reverse" file="r.fastq"/>
374 </output_collection> 376 </output_collection>
375 </test> 377 </test>
376 <test> <!-- Test 2 collections concatenation --> 378 <test expect_num_outputs="1"> <!-- Test 8 - 2 collections concatenation -->
377 <param name="input_type" value="simple_collections" /> 379 <param name="input_type" value="simple_collections" />
378 <param name="collection_cat_type" value="two_collections"/>
379 <param name="input_1"> 380 <param name="input_1">
380 <collection type="list"> 381 <collection type="list">
381 <element name="2" value="2_f.fastq"/> 382 <element name="2" value="2_f.fastq"/>
382 <element name="3" value="3_f.fastq"/> 383 <element name="3" value="3_f.fastq"/>
383 <element name="4" value="4_f.fastq"/> 384 <element name="4" value="4_f.fastq"/>
396 <element name="2" file="2.fastq"/> 397 <element name="2" file="2.fastq"/>
397 <element name="3" file="3.fastq"/> 398 <element name="3" file="3.fastq"/>
398 <element name="4" file="4.fastq"/> 399 <element name="4" file="4.fastq"/>
399 </output_collection> 400 </output_collection>
400 </test> 401 </test>
401 <test> <!-- Test 2 collections concatenation with other options--> 402 <test expect_num_outputs="1"> <!-- Test 9 - 2 collections concatenation with other options-->
402 <param name="input_type" value="simple_collections" /> 403 <param name="input_type" value="simple_collections" />
403 <param name="collection_cat_type" value="two_collections"/>
404 <param name="input_1"> 404 <param name="input_1">
405 <collection type="list"> 405 <collection type="list">
406 <element name="1_f.fastq.gz" value="1_f.fastq.gz"/> 406 <element name="1_f.fastq.gz" value="1_f.fastq.gz"/>
407 </collection> 407 </collection>
408 </param> 408 </param>
415 <param name="headers" value="4" /> 415 <param name="headers" value="4" />
416 <output_collection name="list_output" type="list" count="1" > 416 <output_collection name="list_output" type="list" count="1" >
417 <element name="1_f.fastq.gz_1_r.fastq.gz" file="1_options.fastq.gz" decompress="True"/> 417 <element name="1_f.fastq.gz_1_r.fastq.gz" file="1_options.fastq.gz" decompress="True"/>
418 </output_collection> 418 </output_collection>
419 </test> 419 </test>
420 <test> <!-- Test nested collections concatenation --> 420 <test expect_num_outputs="1"> <!-- Test 10 nested collections concatenation -->
421 <param name="input_type" value="nested_collection" /> 421 <param name="input_type" value="nested_collection" />
422 <param name="inputs"> 422 <param name="inputs">
423 <collection type="list:list"> 423 <collection type="list:list">
424 <element name="2"> 424 <element name="2">
425 <collection type="list"> 425 <collection type="list">
439 <output_collection name="list_output" type="list" count="2" > 439 <output_collection name="list_output" type="list" count="2" >
440 <element name="2" file="2.fastq"/> 440 <element name="2" file="2.fastq"/>
441 <element name="3" file="3.fastq"/> 441 <element name="3" file="3.fastq"/>
442 </output_collection> 442 </output_collection>
443 </test> 443 </test>
444 <test> <!-- Test nested collections concatenation with options and gzip--> 444 <test expect_num_outputs="1"> <!-- Test 11 nested collections concatenation with options and gzip-->
445 <param name="input_type" value="nested_collection" /> 445 <param name="input_type" value="nested_collection" />
446 <param name="inputs"> 446 <param name="inputs">
447 <collection type="list:list"> 447 <collection type="list:list">
448 <element name="1"> 448 <element name="1">
449 <collection type="list"> 449 <collection type="list">
670 ----- 670 -----
671 671
672 Adapted from galaxy's catWrapper.xml to allow multiple input files. 672 Adapted from galaxy's catWrapper.xml to allow multiple input files.
673 673
674 </help> 674 </help>
675 <citations>
676 <citation type="doi">10.1186/gb-2010-11-8-r86</citation>
677 </citations>
675 </tool> 678 </tool>