diff --git a/lib/galaxy/datatypes/registry.py b/lib/galaxy/datatypes/registry.py index 671f30d82e16..a717dad0098f 100644 --- a/lib/galaxy/datatypes/registry.py +++ b/lib/galaxy/datatypes/registry.py @@ -881,7 +881,16 @@ def find_conversion_destination_for_dataset_by_extensions( if datatype and datatype.matches_any(accepted_datatypes): return True, None, None - for convert_ext in self.get_converters_by_datatype(ext): + converter_extensions = self.get_converters_by_datatype(ext) + uncompressed_instance = getattr(datatype, "uncompressed_datatype_instance", None) + if uncompressed_instance and uncompressed_instance.file_ext in converter_extensions: + # sort uncompressed instance ahead of other possible conversions + converter_extensions = [ + uncompressed_instance.file_ext, + *(ext for ext in converter_extensions if ext != uncompressed_instance.file_ext), + ] + + for convert_ext in converter_extensions: convert_ext_datatype = self.get_datatype_by_extension(convert_ext) if convert_ext_datatype is None: self.log.warning( diff --git a/test/functional/tools/implicit_conversion_format_input.xml b/test/functional/tools/implicit_conversion_format_input.xml index e93f54095592..090aa474f0fc 100644 --- a/test/functional/tools/implicit_conversion_format_input.xml +++ b/test/functional/tools/implicit_conversion_format_input.xml @@ -3,7 +3,7 @@ cut -f 1 '$input1' > '$output1' - +