diff mira.py @ 85:59500bcfaf82 draft default tip

planemo upload for repository https://github.com/peterjc/pico_galaxy/tree/master/datatypes/mira_datatypes commit f7e6686f564972fb2892bec8da890565bb41e0ac-dirty
author peterjc
date Mon, 01 Jul 2019 14:02:09 -0400
parents 8d7684a3346a
children
line wrap: on
line diff
--- a/mira.py	Mon Jul 01 13:28:59 2019 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-"""MiraAssemblyFormat class for the 'mira' format within Galaxy."""
-
-from galaxy.datatypes.data import Text
-
-
-class MiraAssemblyFormat(Text):
-    """MIRA Assembly Format  data."""
-
-    file_ext = "mira"
-
-    def sniff(self, filename):
-        """Determine if the file is a MIRA Assembly Format file.
-
-        Note currently this only detects MIRA Assembly Format v2.0,
-        as used in MIRA v3.9 and v4.0.
-
-        It does not detect MIRA Assembly Format v1 as used in both
-        MIRA v3.2 and v3.4.
-        """
-        h = open(filename)
-        line = h.readline()
-        if line.rstrip() != "@Version\t2\t0":
-            h.close()
-            return False
-        line = h.readline()
-        if line.rstrip() != "@Program\tMIRALIB":
-            h.close()
-            return False
-        return True
-
-    def merge(split_files, output_file):
-        """Merge MIRA assembly files (not implemented).
-
-        Merging multiple MIRA files is non-trivial and may not be possible...
-        """
-        if len(split_files) == 1:
-            # For one file only, use base class method (move/copy)
-            return Text.merge(split_files, output_file)
-        if not split_files:
-            raise ValueError(
-                "No MIRA files to merge, %r, into %r" % (split_files, output_file)
-            )
-        raise NotImplementedError(
-            "Merging MIRA Assembly Files has not been implemented"
-        )
-
-    merge = staticmethod(merge)
-
-    def split(cls, input_datasets, subdir_generator_function, split_params):
-        """Split a MIRA Assembly File (not implemented for now)."""
-        if split_params is None:
-            return None
-        raise NotImplementedError("Can't yet split a MIRA Assembly Format file")
-
-    merge = staticmethod(merge)