forked from galaxyproject/galaxy
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request galaxyproject#18928 from mvdbeek/add_filter_null_c…
…ollection_operation_tool Add filter null collection operation tool
- Loading branch information
Showing
11 changed files
with
129 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<tool id="__FILTER_NULL__" name="Filter null elements" version="1.0.0" tool_type="filter_null"> | ||
<description/> | ||
<type class="FilterNullTool" module="galaxy.tools"/> | ||
<action module="galaxy.tools.actions.model_operations" class="ModelOperationToolAction"/> | ||
<edam_operations> | ||
<edam_operation>operation_3695</edam_operation> | ||
</edam_operations> | ||
<inputs> | ||
<param type="data_collection" collection_type="list,list:paired" name="input" label="Input Collection"/> | ||
</inputs> | ||
<outputs> | ||
<collection name="output" format_source="input" type_source="input" label="${on_string} (without null datasets)"> | ||
</collection> | ||
</outputs> | ||
<tests> | ||
<test> | ||
<param name="input"> | ||
<collection type="list"> | ||
<element name="e1" value="simple_line.txt"/> | ||
</collection> | ||
</param> | ||
<output_collection name="output" type="list" count="1"> | ||
<element name="e1"> | ||
<assert_contents> | ||
<has_text_matching expression="^This is a line of text.\n$"/> | ||
</assert_contents> | ||
</element> | ||
</output_collection> | ||
</test> | ||
</tests> | ||
<help><![CDATA[ | ||
======== | ||
Synopsis | ||
======== | ||
Removes null elements from a collection. | ||
This tool takes a dataset collection and filters out nulls. This is useful for removing elements that resulted from conditional execution of jobs. | ||
.. class:: infomark | ||
This tool will create new history datasets from your collection but your quota usage will not increase. | ||
]]></help> | ||
</tool> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
- doc: | | ||
Test to verify filter null tool keeps non-null datasets. | ||
job: | ||
input_collection: | ||
collection_type: list | ||
elements: | ||
- identifier: first | ||
content: "abc" | ||
when: | ||
value: true | ||
type: raw | ||
outputs: | ||
out: | ||
class: Collection | ||
collection_type: list | ||
element_count: 1 | ||
- doc: | | ||
Test to verify filter null tool discards null datasets. | ||
job: | ||
input_collection: | ||
collection_type: list | ||
elements: | ||
- identifier: first | ||
content: "abc" | ||
when: | ||
value: false | ||
type: raw | ||
outputs: | ||
out: | ||
class: Collection | ||
collection_type: list | ||
element_count: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
class: GalaxyWorkflow | ||
inputs: | ||
input_collection: | ||
type: data_collection | ||
when: | ||
type: boolean | ||
outputs: | ||
out: | ||
outputSource: filter_null/output | ||
steps: | ||
cat: | ||
tool_id: cat | ||
in: | ||
input1: | ||
source: input_collection | ||
when: | ||
source: when | ||
when: $(inputs.when) | ||
filter_null: | ||
tool_id: '__FILTER_NULL__' | ||
in: | ||
input: cat/out_file1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters