diff --git a/lib/galaxy/tools/evaluation.py b/lib/galaxy/tools/evaluation.py index a9833edd765..b1fcb00c56b 100644 --- a/lib/galaxy/tools/evaluation.py +++ b/lib/galaxy/tools/evaluation.py @@ -329,7 +329,8 @@ class ToolEvaluator( object ): # Assume the reason we lack this output is because a filter # failed to pass; for tool writing convienence, provide a # NoneDataset - param_dict[ out_name ] = NoneDataset( datatypes_registry=self.app.datatypes_registry, ext=output.format ) + ext = getattr( output, "format", None ) # populate only for output datasets (not collections) + param_dict[ out_name ] = NoneDataset( datatypes_registry=self.app.datatypes_registry, ext=ext ) def __populate_non_job_params(self, param_dict): # -- Add useful attributes/functions for use in creating command line. diff --git a/lib/galaxy/tools/parser/xml.py b/lib/galaxy/tools/parser/xml.py index 0777c6b5d76..61e1005c1a8 100644 --- a/lib/galaxy/tools/parser/xml.py +++ b/lib/galaxy/tools/parser/xml.py @@ -186,6 +186,7 @@ class XmlToolSource(ToolSource): inherit_metadata = string_as_bool( collection_elem.get( "inherit_metadata", None ) ) default_format_source = collection_elem.get( "format_source", None ) default_metadata_source = collection_elem.get( "metadata_source", "" ) + filters = collection_elem.findall( 'filter' ) dataset_collectors = None if collection_elem.find( "discover_datasets" ) is not None: @@ -199,6 +200,7 @@ class XmlToolSource(ToolSource): name, structure, label=label, + filters=filters, default_format=default_format, inherit_format=inherit_format, inherit_metadata=inherit_metadata, diff --git a/test/functional/tools/output_collection_filter.xml b/test/functional/tools/output_collection_filter.xml new file mode 100644 index 00000000000..e66e3dd1867 --- /dev/null +++ b/test/functional/tools/output_collection_filter.xml @@ -0,0 +1,52 @@ + + + echo "AF" > af.txt; + echo "AR" > ar.txt; + echo "BF" > bf.txt; + echo "BR" > br.txt; + + + + + + + + + + + + output_type == "a" + + + + + output_type == "b" + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/functional/tools/samples_tool_conf.xml b/test/functional/tools/samples_tool_conf.xml index b26e371625e..4b1f5fb7001 100644 --- a/test/functional/tools/samples_tool_conf.xml +++ b/test/functional/tools/samples_tool_conf.xml @@ -27,6 +27,7 @@ +