From a42d7f30a74638a2d5baeaccbca17f0e480b67f9 Mon Sep 17 00:00:00 2001 From: Wolfgang Maier Date: Fri, 29 Nov 2024 12:30:30 +0100 Subject: [PATCH 1/3] Create harmonized collections from correct tool outputs --- lib/galaxy/tools/__init__.py | 7 ++--- .../tools/harmonize_two_collections_list.xml | 31 +++++++++++++++++++ 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py index 42fe49f58f4d..97fd83f8561a 100644 --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -3660,14 +3660,13 @@ def produce_outputs(self, trans, out_data, output_collections, incoming, history final_sorted_identifiers = [ element.element_identifier for element in elements1 if element.element_identifier in old_elements2_dict ] - # Raise Exception if it is empty if len(final_sorted_identifiers) == 0: # Create empty collections: output_collections.create_collection( - next(iter(self.outputs.values())), "output1", elements={}, propagate_hda_tags=False + self.outputs["output1"], "output1", elements={}, propagate_hda_tags=False ) output_collections.create_collection( - next(iter(self.outputs.values())), "output2", elements={}, propagate_hda_tags=False + self.outputs["output2"], "output2", elements={}, propagate_hda_tags=False ) return @@ -3685,7 +3684,7 @@ def output_with_selected_identifiers(old_elements_dict, output_label): self._add_datasets_to_history(history, new_elements.values()) # Create collections: output_collections.create_collection( - next(iter(self.outputs.values())), output_label, elements=new_elements, propagate_hda_tags=False + self.outputs[output_label], output_label, elements=new_elements, propagate_hda_tags=False ) # Create outputs: diff --git a/lib/galaxy/tools/harmonize_two_collections_list.xml b/lib/galaxy/tools/harmonize_two_collections_list.xml index 7828ec5138e6..f580779835f1 100644 --- a/lib/galaxy/tools/harmonize_two_collections_list.xml +++ b/lib/galaxy/tools/harmonize_two_collections_list.xml @@ -171,6 +171,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Date: Fri, 29 Nov 2024 13:50:44 +0100 Subject: [PATCH 2/3] Fix test file type --- lib/galaxy/tools/harmonize_two_collections_list.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/tools/harmonize_two_collections_list.xml b/lib/galaxy/tools/harmonize_two_collections_list.xml index f580779835f1..546351802e77 100644 --- a/lib/galaxy/tools/harmonize_two_collections_list.xml +++ b/lib/galaxy/tools/harmonize_two_collections_list.xml @@ -182,7 +182,7 @@ - + @@ -197,7 +197,7 @@ - + From 891d7aa0bfc8f70d0ece6e731687712b634a9bf5 Mon Sep 17 00:00:00 2001 From: Wolfgang Maier Date: Fri, 29 Nov 2024 15:08:35 +0100 Subject: [PATCH 3/3] Try to fix tool test --- lib/galaxy/tools/harmonize_two_collections_list.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/tools/harmonize_two_collections_list.xml b/lib/galaxy/tools/harmonize_two_collections_list.xml index 546351802e77..3a12173f04e8 100644 --- a/lib/galaxy/tools/harmonize_two_collections_list.xml +++ b/lib/galaxy/tools/harmonize_two_collections_list.xml @@ -182,7 +182,7 @@ - + @@ -197,7 +197,7 @@ - +