Files
galaxy/test/functional/tools/collection_creates_dynamic_nested_from_json.xml
T
John Chilton 72e361bcf1 Allow discovering datasets directly from galaxy.json...
without needing to specify a discovered dataset pattern. If the ``discovered_datasets`` tag includes ``from_tool_provided_metadata="true"`` the datsets listed in galaxy.json will just be used directly without needing to be "discovered" using a dataset pattern. Metadata and such can continue to be specified either in that file or on the discovered_dataset element except things like pattern (which is not used) and sort_by (since the json should describe the order I suppose).
2017-08-17 15:41:10 -04:00

79 lines
2.8 KiB
XML

<tool id="collection_creates_dynamic_nested_from_json" name="collection_creates_dynamic_nested_from_json" version="0.1.0" profile="17.09">
<command>
echo "A" > oe1_ie1.fq ;
echo "B" > oe1_ie2.fq ;
echo "C" > oe2_ie1.fq ;
echo "D" > oe2_ie2.fq ;
echo "E" > oe3_ie1.fq ;
echo "F" > oe3_ie2.fq ;
cp $c1 galaxy.json
</command>
<configfiles>
<configfile name="c1">{"list_output": {
"datasets": [
{"identifier_0": "oe1", "identifier_1": "ie1", "filename": "oe1_ie1.fq"},
{"identifier_0": "oe1", "identifier_1": "ie2", "filename": "oe1_ie2.fq"},
{"identifier_0": "oe2", "identifier_1": "ie1", "filename": "oe2_ie1.fq"},
{"identifier_0": "oe2", "identifier_1": "ie2", "filename": "oe2_ie2.fq"},
{"identifier_0": "oe3", "identifier_1": "ie1", "filename": "oe3_ie1.fq"},
{"identifier_0": "oe3", "identifier_1": "ie2", "filename": "oe3_ie2.fq"}
]}}</configfile>
</configfiles>
<inputs>
<param name="foo" type="text" label="Dummy Parameter" />
</inputs>
<outputs>
<collection name="list_output" type="list:list" label="Duplicate List">
<!-- Use named regex group to grab pattern
<identifier_0>_<identifier_1>.fq. Here identifier_0 is the list
identifier of the outer list and identifier_1 is the list identifier
of the inner list (for instance oe1_ie2.fq in above example).
-->
<discover_datasets from_provided_metadata="true" ext="fastqsanger" visible="true" />
</collection>
</outputs>
<tests>
<test>
<param name="foo" value="bar" />
<output_collection name="list_output" type="list:list">
<element name="oe1">
<element name="ie1">
<assert_contents>
<has_text_matching expression="^A\n$" />
</assert_contents>
</element>
<element name="ie2">
<assert_contents>
<has_text_matching expression="^B\n$" />
</assert_contents>
</element>
</element>
<element name="oe2">
<element name="ie1">
<assert_contents>
<has_text_matching expression="^C\n$" />
</assert_contents>
</element>
<element name="ie2">
<assert_contents>
<has_text_matching expression="^D\n$" />
</assert_contents>
</element>
</element>
<element name="oe3">
<element name="ie1">
<assert_contents>
<has_text_matching expression="^E\n$" />
</assert_contents>
</element>
<element name="ie2">
<assert_contents>
<has_text_matching expression="^F\n$" />
</assert_contents>
</element>
</element>
</output_collection>
</test>
</tests>
</tool>