|
1
|
1 <tool id="list_elements" name="List elements of collection" version="0.2.0+galaxy0" profile="21.05">
|
|
0
|
2 <requirements>
|
|
|
3 </requirements>
|
|
|
4 <command detect_errors="exit_code"><![CDATA[
|
|
|
5 #set $last_element = len(list($coll)) - 1
|
|
|
6 #for $i, $element in enumerate($coll)
|
|
|
7 echo '${element.name}' >> ${output1}
|
|
|
8 #if $i != $last_element
|
|
|
9 &&
|
|
|
10 #end if
|
|
|
11 #end for
|
|
|
12 ]]></command>
|
|
|
13 <inputs>
|
|
1
|
14 <param name="coll" type="data_collection" collection_type="list:list" label="Dataset collection"/>
|
|
0
|
15 </inputs>
|
|
|
16 <outputs>
|
|
|
17 <data name="output1" format="txt" label="Collection names ${on_string}" />
|
|
|
18 </outputs>
|
|
|
19 <tests>
|
|
|
20 <test>
|
|
|
21 <param name="coll">
|
|
|
22 <collection type="list">
|
|
|
23 <element name="one" value="one.txt" ftype="txt" />
|
|
|
24 <element name="two" value="two.txt" ftype="txt" />
|
|
|
25 </collection>
|
|
|
26 </param>
|
|
|
27 <output name="output1" file="output.txt" />
|
|
|
28 </test>
|
|
|
29 </tests>
|
|
|
30 <help><![CDATA[
|
|
|
31 Outputs the names of the elements of a collection (of list type).
|
|
|
32 ]]></help>
|
|
|
33 <citations></citations>
|
|
|
34 </tool> |