# HG changeset patch -- Bitbucket.org # Project galaxy-dist # URL http://bitbucket.org/galaxy/galaxy-dist/overview # User Nate Coraor <nate@bx.psu.edu> # Date 1278088028 14400 # Node ID b68cbc002e8aabb1750d1c82607430124065736f # Parent fad6bc5478fa9a4ac4e9d368bcfae1651528deac Remove txtseq and binseq from datatypes. --- a/lib/galaxy/datatypes/binary.py +++ b/lib/galaxy/datatypes/binary.py @@ -141,28 +141,6 @@ class Bam( Binary ): def get_track_type( self ): return "ReadTrack", {"data": "bai", "index": "summary_tree"} -class Binseq( Binary ): - """Class describing a zip archive of binary sequence files""" - file_ext = "binseq.zip" - - def set_peek( self, dataset, is_multi_byte=False ): - if not dataset.dataset.purged: - zip_file = zipfile.ZipFile( dataset.file_name, "r" ) - num_files = len( zip_file.namelist() ) - dataset.peek = "Archive of %s binary sequence files" % ( str( num_files ) ) - dataset.blurb = data.nice_size( dataset.get_size() ) - else: - dataset.peek = 'file does not exist' - dataset.blurb = 'file purged from disk' - def display_peek( self, dataset ): - try: - return dataset.peek - except: - return "Binary sequence file archive (%s)" % ( data.nice_size( dataset.get_size() ) ) - def get_mime( self ): - """Returns the mime type of the datatype""" - return 'application/zip' - class Scf( Binary ): """Class describing an scf binary sequence file""" file_ext = "scf" --- a/lib/galaxy/datatypes/data.py +++ b/lib/galaxy/datatypes/data.py @@ -414,27 +414,6 @@ class Text( Data ): dataset.peek = 'file does not exist' dataset.blurb = 'file purged from disk' -class Txtseq( Data ): - """Class describing a zip archive of text sequence files""" - file_ext = "txtseq.zip" - def set_peek( self, dataset, is_multi_byte=False ): - if not dataset.dataset.purged: - zip_file = zipfile.ZipFile( dataset.file_name, "r" ) - num_files = len( zip_file.namelist() ) - dataset.peek = "Archive of %s text sequence files" % ( str( num_files ) ) - dataset.blurb = data.nice_size( dataset.get_size() ) - else: - dataset.peek = 'file does not exist' - dataset.blurb = 'file purged from disk' - def display_peek(self, dataset): - try: - return dataset.peek - except: - return "Text sequence file archive (%s)" % ( data.nice_size( dataset.get_size() ) ) - def get_mime(self): - """Returns the mime type of the datatype""" - return 'application/zip' - class Newick( Text ): pass --- a/lib/galaxy/datatypes/registry.py +++ b/lib/galaxy/datatypes/registry.py @@ -150,7 +150,6 @@ class Registry( object ): 'axt' : sequence.Axt(), 'bam' : binary.Bam(), 'bed' : interval.Bed(), - 'binseq.zip' : binary.Binseq(), 'blastxml' : xml.BlastXml(), 'coverage' : coverage.LastzCoverage(), 'customtrack' : interval.CustomTrack(), @@ -176,7 +175,6 @@ class Registry( object ): 'tabular' : tabular.Tabular(), 'taxonomy' : tabular.Taxonomy(), 'txt' : data.Text(), - 'txtseq.zip' : data.Txtseq(), 'wig' : interval.Wiggle() } self.mimetypes_by_extension = { @@ -184,7 +182,6 @@ class Registry( object ): 'axt' : 'text/plain', 'bam' : 'application/octet-stream', 'bed' : 'text/plain', - 'binseq.zip' : 'application/zip', 'blastxml' : 'text/plain', 'customtrack' : 'text/plain', 'csfasta' : 'text/plain', @@ -208,7 +205,6 @@ class Registry( object ): 'tabular' : 'text/plain', 'taxonomy' : 'text/plain', 'txt' : 'text/plain', - 'txtseq.zip' : 'application/zip', 'wig' : 'text/plain' } # Default values - the order in which we attempt to determine data types is critical