Bugfix: Hadn't implemented clean way to iterate of collection element names in tools.

Perhaps stretching the definition of bugfix here to get this in next-stable.
This commit is contained in:
John Chilton
2014-05-27 12:52:41 -05:00
parent 82334f9ae7
commit 3e7b1b511a
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -272,6 +272,12 @@ class DatasetCollectionWrapper( object, HasDatasets ):
def is_collection( self ):
return True
def __getitem__( self, key ):
if isinstance( key, int ):
return self.element_instance_list[ key ]
else:
return self.element_instances[ key ]
def __getattr__( self, key ):
return self.element_instances[ key ]
@@ -1,6 +1,6 @@
<tool id="collection_paired_test" name="paired_test" version="0.1.0">
<command>
cat $f1.forward $f1.reverse >> $out1;
cat $f1.forward $f1['reverse'] >> $out1;
</command>
<inputs>
<param name="f1" type="data_collection" collection_type="paired" />