Add test tool demontrating filtering selections based on dbkey.

This commit is contained in:
John Chilton
2015-07-31 11:09:45 +01:00
parent e8f3553404
commit 607aca84e7
4 changed files with 46 additions and 0 deletions
@@ -0,0 +1,2 @@
hg19 hg19 hg19 hg19
hg18 hg18 hg18 hg18
@@ -7,4 +7,8 @@
<columns>value, path</columns>
<file path="${__HERE__}/testbeta.loc" />
</table>
<table name="test_fasta_indexes" comment_char="#">
<columns>value, dbkey, name, path</columns>
<file path="${__HERE__}/fasta_indexes.loc" />
</table>
</tables>
@@ -0,0 +1,39 @@
<tool id="dbkey_filter_input" name="dbkey_filter_input" version="0.1.0">
<description>Filter (single) input on a dbkey</description>
<command>
cat $inputs > $output
</command>
<inputs>
<param format="txt" name="inputs" type="data" label="Inputs" help="" />
<param name="index" type="select" label="Using reference genome">
<options from_data_table="test_fasta_indexes">
<filter type="data_meta" ref="inputs" key="dbkey" column="1" />
<validator type="no_options" message="No reference genome is available for the build associated with the selected input dataset" />
</options>
</param>
</inputs>
<outputs>
<data format="txt" name="output" />
</outputs>
<tests>
<!-- can choose a dbkey if it matches input -->
<test>
<param name="inputs" value="simple_line.txt" dbkey="hg19" />
<param name="index" value="hg19" />
<output name="output" file="simple_line.txt"/>
</test>
<!-- cannot pick index otherwise -->
<!-- Does this make sense - if no dbkey is defined there is no option
available? -->
<test expect_failure="true">
<param name="inputs" value="simple_line.txt" />
<param name="index" value="hg18" />
<output name="output" file="simple_line.txt"/>
</test>
</tests>
<help>
</help>
</tool>
@@ -16,6 +16,7 @@
<tool file="multi_output.xml" />
<tool file="multi_output_configured.xml" />
<tool file="multi_output_assign_primary.xml" />
<tool file="dbkey_filter_input.xml" />
<tool file="composite_output.xml" />
<tool file="metadata.xml" />
<tool file="metadata_bam.xml" />