Mercurial > repos > matt-shirley > sra_tools
diff sra.py @ 16:93a60318b9ca draft
updates to SRA datatype
author | Matt Shirley <mdshw5@gmail.com> |
---|---|
date | Mon, 17 Jun 2013 20:30:16 -0400 |
parents | b77840618b8f |
children | a1255154fa3f |
line wrap: on
line diff
--- a/sra.py Mon Jun 17 17:08:53 2013 -0400 +++ b/sra.py Mon Jun 17 20:30:16 2013 -0400 @@ -1,14 +1,16 @@ """ Sra class """ - +import logging import binascii -from galaxy.datatypes.binary import Binary -from galaxy.datatypes.data import Data -from galaxy.datatypes.metadata import MetadataElement +from galaxy.datatypes.data import * from galaxy.datatypes.sniff import * +from galaxy.datatypes.binary import * +from galaxy.datatypes.metadata import * -class Sra( Binary ): +log = logging.getLogger(__name__) + +class SRA( Binary ): """ Sequence Read Archive (SRA) """ file_ext = 'sra' @@ -37,4 +39,7 @@ try: return dataset.peek except: - return 'Binary sra file (%s)' % ( data.nice_size(dataset.get_size())) + return 'Binary SRA file (%s)' % ( data.nice_size(dataset.get_size())) + +if hasattr(Binary, 'register_sniffable_binary_format'): + Binary.register_sniffable_binary_format('SRA', 'SRA', SRA)