Skip to content

Commit

Permalink
Merge pull request #5450 from jmchilton/collection_mapping_cleanup
Browse files Browse the repository at this point in the history
Remove unused mapping code.
  • Loading branch information
martenson committed Feb 15, 2018
2 parents 41a3196 + aed2b4a commit 78ee5f8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.
26 changes: 0 additions & 26 deletions lib/galaxy/dataset_collections/structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

import six

from .type_description import map_over_collection_type

log = logging.getLogger(__name__)


Expand Down Expand Up @@ -127,30 +125,6 @@ def can_match(self, other_structure):
def __len__(self):
return sum([len(c[1]) for c in self.children])

def element_identifiers_for_outputs(self, trans, outputs):
element_identifiers = []
elements_collection_type = None
for identifier, child in self.children:
if isinstance(child, Tree):
child_identifiers = child.element_identifiers_for_outputs(trans, outputs[0:len(child)])
child_identifiers["name"] = identifier
element_identifiers.append(child_identifiers)
elements_collection_type = child_identifiers["collection_type"]
else:
output_object = outputs[0]
element_identifiers.append(dict(name=identifier, __object__=output_object))
if hasattr(output_object, "collection_type"):
elements_collection_type = output_object.collection_type

outputs = outputs[len(child):]

collection_type = map_over_collection_type(self.collection_type_description.rank_collection_type(), elements_collection_type)
return dict(
src="new_collection",
collection_type=collection_type,
element_identifiers=element_identifiers,
)

def multiply(self, other_structure):
if other_structure.is_leaf:
return self.clone()
Expand Down
5 changes: 0 additions & 5 deletions lib/galaxy/tools/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,6 @@ def _structure_for_output(self, trans, tool_output):

return structure

def _element_identifiers_for_output(self, trans, tool_output, outputs):
output_structure = self._structure_for_output(trans, tool_output)
element_identifiers = output_structure.element_identifiers_for_outputs(trans, outputs)
return element_identifiers

def _mapped_output_structure(self, trans, tool_output):
collections_manager = trans.app.dataset_collections_service
output_structure = tool_output_to_structure(self.sliced_input_collection_structure, tool_output, collections_manager)
Expand Down

0 comments on commit 78ee5f8

Please sign in to comment.