-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c89bcad
commit f99c729
Showing
5 changed files
with
118 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
hg19_value hg19 hg19_name hg19_path | ||
absent_value absent absent_name absent_path |
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,45 @@ | ||
<tool id="filter_data_table" name="filter data table" version="0.1.0"> | ||
<description>Filter on datatable entries</description> | ||
<command><![CDATA[ | ||
echo $dynamic_select > '$output' | ||
]]></command> | ||
<inputs> | ||
<param name="dynamic_select" type="select"> | ||
<!-- initialize options from file (contains all entries that could be added to the data table) --> | ||
<options from_file="../test/functional/tool-data/test_file.tsv"> | ||
<column name="name" index="0"/> | ||
<column name="value" index="0"/> | ||
<!-- filter options that are already in the data table --> | ||
<filter type="data_table" column="0" table_name="test_fasta_indexes" data_table_column="0" keep="false"/> | ||
<validator type="no_options" message="No options available" /> | ||
</options> | ||
</param> | ||
</inputs> | ||
|
||
<outputs> | ||
<data name="output" format="txt" /> | ||
</outputs> | ||
|
||
<tests> | ||
<!-- select the value that is absent from the data table --> | ||
<test expect_failure="false"> | ||
<param name="dynamic_select" value="absent_value" /> | ||
<output name="output"> | ||
<assert_contents> | ||
<has_text text="absent_value"/> | ||
</assert_contents> | ||
</output> | ||
</test> | ||
<!-- selecting the value that is already in the data table (and therefor filtered) fails --> | ||
<test expect_failure="true"> | ||
<param name="dynamic_select" value="hg19_value" /> | ||
<output name="output"> | ||
<assert_contents> | ||
<has_text text="hg19_value"/> | ||
</assert_contents> | ||
</output> | ||
</test> | ||
</tests> | ||
<help> | ||
</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