mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
53 lines
1.9 KiB
XML
53 lines
1.9 KiB
XML
<tool id="multi_data_param" name="multi_data_param" version="0.1.0">
|
|
<!-- Demonstrate looping and using functional-style access to multi-data
|
|
parameters. -->
|
|
<command>
|
|
cat #for $f in $f1# ${f} #end for# >> $out1;
|
|
cat ${" ".join(map(str, $f2))} >> $out2
|
|
</command>
|
|
<inputs>
|
|
<param name="f1" type="data" format="txt" multiple="true" label="Data 1" min="1" max="1235" />
|
|
<param name="f2" type="data" format="txt" multiple="true" label="Data 2" />
|
|
<conditional name="advanced">
|
|
<param name="full" type="select" label="Parameter Settings">
|
|
<option value="no">Use defaults</option>
|
|
<option value="yes">Full parameter list</option>
|
|
</param>
|
|
<when value="yes">
|
|
<param name="advanced_threshold" type="integer" value="8" />
|
|
</when>
|
|
<when value="no">
|
|
</when>
|
|
</conditional>
|
|
</inputs>
|
|
<outputs>
|
|
<data format="txt" name="out1" />
|
|
<data format="txt" name="out2" />
|
|
</outputs>
|
|
<tests>
|
|
<test>
|
|
<param name="f1" value="simple_line.txt" />
|
|
<param name="f2" value="simple_line_alternative.txt" />
|
|
<output name="out1" file="simple_line.txt" />
|
|
<output name="out2" file="simple_line_alternative.txt" />
|
|
</test>
|
|
<test>
|
|
<param name="f1" value="simple_line.txt,simple_line_alternative.txt" />
|
|
<param name="f2" value="simple_line_alternative.txt" />
|
|
<output name="out1">
|
|
<assert_contents>
|
|
<has_line line="This is a line of text." />
|
|
<has_line line="This is a different line of text." />
|
|
</assert_contents>
|
|
</output>
|
|
</test>
|
|
<!-- UI widget can do this next one, but API can. -->
|
|
<test>
|
|
<param name="f1" value="simple_line.txt,simple_line.txt" />
|
|
<param name="f2" value="simple_line_alternative.txt" />
|
|
<output name="out1" file="simple_line_x2.txt" />
|
|
<output name="out2" file="simple_line_alternative.txt" />
|
|
</test>
|
|
</tests>
|
|
</tool>
|