Add test tool and workflow for mapping over with mapping output

This doesn't quite work because of the dynamic output collection,
which fails with:

```
galaxy.tools.parameters.output_collect DEBUG 2018-06-06 18:40:38,784 (3) Add dynamic collection datasets to history for output [reverse] (171.970 ms)
galaxy.tools.parameters.output_collect ERROR 2018-06-06 18:40:38,839 Problem gathering output collection.
Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/lib/galaxy/tools/parameters/output_collect.py", line 340, in collect_dynamic_outputs
    collection_builder.populate()
  File "/Users/mvandenb/src/galaxy/lib/galaxy/dataset_collections/builder.py", line 88, in populate
    elements = self.build_elements()
  File "/Users/mvandenb/src/galaxy/lib/galaxy/dataset_collections/builder.py", line 59, in build_elements
    new_elements[identifier] = element.build()
AttributeError: 'HistoryDatasetAssociation' object has no attribute 'build'
```

This seems to happen because the inner collection is wrongly detected as
nested. In general I doubt that mapping over colleciton output works
with dynamically discovered output collections.
This commit is contained in:
mvdbeek
2018-06-20 09:54:40 -04:00
committed by John Chilton
parent f5aec1cdf1
commit 647ba8531a
3 changed files with 37 additions and 0 deletions
@@ -0,0 +1,16 @@
<tool id="collection_type_source_map_over" name="collection_type_source_map_over" version="0.1.0">
<command>
mkdir output;
#for $key in $input_collect.keys()#
cat "$input_collect[$key]" >> output/"$key";
#end for#
</command>
<inputs>
<param name="input_collect" type="data_collection" collection_type="list,paired" label="Input Collect" help="Input collection..." />
</inputs>
<outputs>
<collection name="list_output" type_source="input_collect" label="Duplicate List">
<discover_datasets pattern="__name__" directory="output" visible="true" />
</collection>
</outputs>
</tool>
@@ -125,6 +125,7 @@
<tool file="collection_creates_dynamic_nested_from_json_elements.xml" />
<tool file="collection_creates_dynamic_list_of_pairs.xml" />
<tool file="collection_type_source.xml" />
<tool file="collection_type_source_map_over.xml" />
<tool file="collection_creates_list_fail.xml" />
<tool file="collection_creates_dynamic_nested_fail.xml" />
<tool file="cheetah_casting.xml" />