Skip to content

Commit

Permalink
update tool concat_multi_datasets (while specifying how) (#636)
Browse files Browse the repository at this point in the history
* bump tool version and fix dev repo url

* add `format` tag in discover_datasets

* add explicit format to inputs (fastq, fastq.gz, txt, tabular, bed)

* Suppress unused Test param collection_cat_type


* added all `expect_num_outputs` tags to "1"

* add citation tag

* fix a bit the description in the tool xml...
  • Loading branch information
drosofff authored Oct 13, 2023
1 parent 3bb2876 commit 4249540
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion tools/concat_multi_datasets/.shed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ long_description: |
categories:
- Text Manipulation
homepage_url: http://artbio.fr
remote_repository_url: https://github.com/ARTbio/tools-artbio/tree/master/tools/concat_multi_datasets
remote_repository_url: https://github.com/ARTbio/tools-artbio/tree/main/tools/concat_multi_datasets
toolshed:
- toolshed
41 changes: 22 additions & 19 deletions tools/concat_multi_datasets/catWrapper.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<tool id="cat_multi_datasets" name="Concatenate multiple datasets" version="1.4.1">
<description>tail-to-head by specifying how</description>
<tool id="cat_multi_datasets" name="Concatenate multiple datasets" version="1.4.2">
<description>tail-to-head while specifying how</description>
<command><![CDATA[
#if $headers == 0:
#set $concat_command = "cat"
Expand Down Expand Up @@ -233,10 +233,12 @@
<option value="nested_collection">Nested collection</option>
</param>
<when value="singles">
<param name="inputs" type="data" label="Concatenate Datasets" multiple="True" help="All inputed datasets will be concatenated tail-to-head."/>
<param name="inputs" type="data" label="Concatenate Datasets" multiple="True" format="fastq,fastq.gz,txt,tabular,bed"
help="All inputed datasets will be concatenated tail-to-head."/>
</when>
<when value="paired_collection">
<param name="inputs" type="data_collection" collection_type="list:paired" label="Input paired collection to concatenate"/>
<param name="inputs" type="data_collection" collection_type="list:paired" format="fastq,fastq.gz,txt,tabular,bed"
label="Input paired collection to concatenate"/>
<param name="paired_cat_type" type="select" label="What type of concatenation do you wish to perform?">
<option value="by_strand">Concatenate all datsets of same strand (outputs a single pair of datasets)</option>
<option value="by_pair">Concatenate pairs of datasets (outputs an unpaired collection of datasets)</option>
Expand All @@ -262,53 +264,53 @@
<filter>global_condition['input_type'] == 'paired_collection' and global_condition['paired_cat_type'] == 'all'</filter>
</data>
<collection name="paired_output" type="paired" label="Concatenation by strtand">
<discover_datasets pattern="(?P&lt;name&gt;.*)\.listed\.(?P&lt;ext&gt;.*)\.listed" visible="false" directory="concatenated"/>
<discover_datasets pattern="(?P&lt;name&gt;.*)\.listed\.(?P&lt;ext&gt;.*)\.listed" format="fastq" visible="false" directory="concatenated"/>
<filter>global_condition['input_type'] == 'paired_collection' and global_condition['paired_cat_type'] == 'by_strand'</filter>
</collection>
<collection name="list_output" type="list" label="Concatenation by pairs">
<discover_datasets pattern="(?P&lt;identifier_0&gt;.*)\.listed\.(?P&lt;ext&gt;.*)\.listed" visible="false" directory="concatenated"/>
<discover_datasets pattern="(?P&lt;identifier_0&gt;.*)\.listed\.(?P&lt;ext&gt;.*)\.listed" format="fastq" visible="false" directory="concatenated"/>
<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>
</collection>
</outputs>
<tests>
<!-- Single files concatenation -->
<test> <!-- Test 2 single files concatenation with no other option -->
<test expect_num_outputs="1"> <!-- Test 1 single files concatenation with no other option -->
<param name="input_type" value="singles" />
<param name="inputs" value="1.bed,2.bed"/>
<param name="dataset_names" value="No" />
<param name="headers" value="0" />
<output name="out_file1" file="cat_wrapper_out1.bed"/>
</test>
<test> <!-- Test 2 single files concatenation with dataset names activated -->
<test expect_num_outputs="1"> <!-- Test 2 single files concatenation with dataset names activated -->
<param name="input_type" value="singles" />
<param name="inputs" value="1.bed,2.bed"/>
<param name="dataset_names" value="Yes" />
<param name="headers" value="0" />
<output name="out_file1" file="cat_wrapper_out2.bed"/>
</test>
<test> <!-- Test 2 single files concatenation skipping 1 line -->
<test expect_num_outputs="1"> <!-- Test 3 single files concatenation skipping 1 line -->
<param name="input_type" value="singles" />
<param name="inputs" value="1.bed,2.bed"/>
<param name="dataset_names" value="No" />
<param name="headers" value="1" />
<output name="out_file1" file="cat_wrapper_out3.bed"/>
</test>
<test> <!-- Test gz handling with no options -->
<test expect_num_outputs="1"> <!-- Test 4 gz handling with no options -->
<param name="input_type" value="singles" />
<param name="inputs" value="1_f.fastq.gz,1_r.fastq.gz"/>
<param name="dataset_names" value="No" />
<param name="headers" value="0" />
<output name="out_file1" file="1.fastq.gz" decompress="True"/>
</test>
<test> <!-- Test gz handling with options -->
<test expect_num_outputs="1"> <!-- Test 5 gz handling with options -->
<param name="input_type" value="singles" />
<param name="inputs" value="1_f.fastq.gz,1_r.fastq.gz"/>
<param name="dataset_names" value="Yes" />
<param name="headers" value="4" />
<output name="out_file1" file="1_options.fastq.gz" decompress="True"/>
</test>
<!-- Test paired options -->
<test> <!-- Test paired collection concatenation by_pair with no other option -->
<test expect_num_outputs="1"> <!-- Test 6 paired collection concatenation by_pair with no other option -->
<param name="input_type" value="paired_collection" />
<param name="paired_cat_type" value="by_pair"/>
<param name="inputs">
Expand Down Expand Up @@ -341,7 +343,7 @@
<element name="4" file="4.fastq"/>
</output_collection>
</test>
<test> <!-- Test paired collection concatenation by_strand with no other option -->
<test expect_num_outputs="1"> <!-- Test 7 paired collection concatenation by_strand with no other option -->
<param name="input_type" value="paired_collection" />
<param name="paired_cat_type" value="by_strand"/>
<param name="inputs">
Expand Down Expand Up @@ -373,9 +375,8 @@
<element name="reverse" file="r.fastq"/>
</output_collection>
</test>
<test> <!-- Test 2 collections concatenation -->
<test expect_num_outputs="1"> <!-- Test 8 - 2 collections concatenation -->
<param name="input_type" value="simple_collections" />
<param name="collection_cat_type" value="two_collections"/>
<param name="input_1">
<collection type="list">
<element name="2" value="2_f.fastq"/>
Expand All @@ -398,9 +399,8 @@
<element name="4" file="4.fastq"/>
</output_collection>
</test>
<test> <!-- Test 2 collections concatenation with other options-->
<test expect_num_outputs="1"> <!-- Test 9 - 2 collections concatenation with other options-->
<param name="input_type" value="simple_collections" />
<param name="collection_cat_type" value="two_collections"/>
<param name="input_1">
<collection type="list">
<element name="1_f.fastq.gz" value="1_f.fastq.gz"/>
Expand All @@ -417,7 +417,7 @@
<element name="1_f.fastq.gz_1_r.fastq.gz" file="1_options.fastq.gz" decompress="True"/>
</output_collection>
</test>
<test> <!-- Test nested collections concatenation -->
<test expect_num_outputs="1"> <!-- Test 10 nested collections concatenation -->
<param name="input_type" value="nested_collection" />
<param name="inputs">
<collection type="list:list">
Expand All @@ -441,7 +441,7 @@
<element name="3" file="3.fastq"/>
</output_collection>
</test>
<test> <!-- Test nested collections concatenation with options and gzip-->
<test expect_num_outputs="1"> <!-- Test 11 nested collections concatenation with options and gzip-->
<param name="input_type" value="nested_collection" />
<param name="inputs">
<collection type="list:list">
Expand Down Expand Up @@ -672,4 +672,7 @@ output::
Adapted from galaxy's catWrapper.xml to allow multiple input files.

</help>
<citations>
<citation type="doi">10.1186/gb-2010-11-8-r86</citation>
</citations>
</tool>

0 comments on commit 4249540

Please sign in to comment.