本文整理汇总了Python中galaxy.datatypes.binary.Binary.register_unsniffable_binary_ext方法的典型用法代码示例。如果您正苦于以下问题:Python Binary.register_unsniffable_binary_ext方法的具体用法?Python Binary.register_unsniffable_binary_ext怎么用?Python Binary.register_unsniffable_binary_ext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类galaxy.datatypes.binary.Binary
的用法示例。
在下文中一共展示了Binary.register_unsniffable_binary_ext方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: database
# 需要导入模块: from galaxy.datatypes.binary import Binary [as 别名]
# 或者: from galaxy.datatypes.binary.Binary import register_unsniffable_binary_ext [as 别名]
return dataset.peek
except:
return "HMMER3 database (multiple files)"
def __init__(self, **kwd):
Binary.__init__(self, **kwd)
# Binary model
self.add_composite_file('model.hmm.h3m', is_binary=True)
# SSI index for binary model
self.add_composite_file('model.hmm.h3i', is_binary=True)
# Profiles (MSV part)
self.add_composite_file('model.hmm.h3f', is_binary=True)
# Profiles (remained)
self.add_composite_file('model.hmm.h3p', is_binary=True)
Binary.register_unsniffable_binary_ext("hmmpress")
class Stockholm_1_0( Text ):
edam_data = "data_0863"
edam_format = "format_1961"
file_ext = "stockholm"
MetadataElement( name="number_of_models", default=0, desc="Number of multiple alignments", readonly=True, visible=True, optional=True, no_value=0 )
def set_peek( self, dataset, is_multi_byte=False ):
if not dataset.dataset.purged:
dataset.peek = get_file_peek( dataset.file_name, is_multi_byte=is_multi_byte )
if (dataset.metadata.number_of_models == 1):
dataset.blurb = "1 alignment"
else:
示例2: Count
# 需要导入模块: from galaxy.datatypes.binary import Binary [as 别名]
# 或者: from galaxy.datatypes.binary.Binary import register_unsniffable_binary_ext [as 别名]
"""
k-mer count and presence
"""
from galaxy.datatypes.binary import Binary
import logging
log = logging.getLogger(__name__)
class Count(Binary):
def __init__(self, **kwd):
Binary.__init__(self, **kwd)
class Presence(Binary):
def __init__(self, **kwd):
Binary.__init__(self, **kwd)
Binary.register_unsniffable_binary_ext("ct")
Binary.register_unsniffable_binary_ext("pt")
示例3: display_peek
# 需要导入模块: from galaxy.datatypes.binary import Binary [as 别名]
# 或者: from galaxy.datatypes.binary.Binary import register_unsniffable_binary_ext [as 别名]
else:
dataset.peek = 'file does not exist'
dataset.blurb = 'file purged from disk'
def display_peek( self, dataset ):
try:
return dataset.peek
except:
return "Audio (WAV) file (%s)" % ( data.nice_size( dataset.get_size() ) )
def display_data(self, trans, dataset, preview=False, filename=None, to_ext=None, size=None, offset=None, **kwd):
if preview:
return ("WAV audio files cannot be previewed.")
else:
return super(Wav, self).display_data( trans, dataset, preview, filename, to_ext, size, offset, **kwd)
Binary.register_unsniffable_binary_ext("wav")
class Mp3(Binary):
file_ext = "mp3"
def __init__( self, **kwd ):
Binary.__init__( self, **kwd )
def set_peek( self, dataset, is_multi_byte=False ):
if not dataset.dataset.purged:
dataset.peek = "Audio (MP3) file"
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 ):
示例4: Sf3
# 需要导入模块: from galaxy.datatypes.binary import Binary [as 别名]
# 或者: from galaxy.datatypes.binary.Binary import register_unsniffable_binary_ext [as 别名]
from galaxy.datatypes.binary import Binary
class Sf3(Binary):
"""Class describing a Scaffold SF3 files"""
file_ext = "sf3"
Binary.register_unsniffable_binary_ext('sf3')
示例5: hasattr
# 需要导入模块: from galaxy.datatypes.binary import Binary [as 别名]
# 或者: from galaxy.datatypes.binary.Binary import register_unsniffable_binary_ext [as 别名]
rval = ['<html><head><title>Wiff Composite Dataset </title></head><p/>']
rval.append('<div>This composite dataset is composed of the following files:<p/><ul>')
for composite_name, composite_file in self.get_composite_files(dataset=dataset).iteritems():
fn = composite_name
opt_text = ''
if composite_file.optional:
opt_text = ' (optional)'
if composite_file.get('description'):
rval.append('<li><a href="%s" type="text/plain">%s (%s)</a>%s</li>' % (fn, fn, composite_file.get('description'), opt_text))
else:
rval.append('<li><a href="%s" type="text/plain">%s</a>%s</li>' % (fn, fn, opt_text))
rval.append('</ul></div></html>')
return "\n".join(rval)
if hasattr(Binary, 'register_unsniffable_binary_ext'):
Binary.register_unsniffable_binary_ext('wiff')
class IdpDB(Binary):
file_ext = "idpDB"
if hasattr(Binary, 'register_unsniffable_binary_ext'):
Binary.register_unsniffable_binary_ext('idpDB')
class PepXmlReport(Tabular):
"""pepxml converted to tabular report"""
file_ext = "tsv"
def __init__(self, **kwd):
Tabular.__init__(self, **kwd)
示例6: Group
# 需要导入模块: from galaxy.datatypes.binary import Binary [as 别名]
# 或者: from galaxy.datatypes.binary.Binary import register_unsniffable_binary_ext [as 别名]
from galaxy.datatypes.binary import Binary
from galaxy.datatypes.xml import GenericXml
class Group( Binary ):
"""Class describing a ProteinPilot group files"""
file_ext = "group"
Binary.register_unsniffable_binary_ext('group')
class ProteinPilotXml( GenericXml ):
file_ext = "proteinpilot.xml"
示例7: set_meta
# 需要导入模块: from galaxy.datatypes.binary import Binary [as 别名]
# 或者: from galaxy.datatypes.binary.Binary import register_unsniffable_binary_ext [as 别名]
if match:
x = match.group('resx')
y = match.group('resy')
fps = match.group('fps')
else:
x = y = fps = 0
return x, y, fps
def set_meta(self, dataset, **kwd):
(x, y, fps) = self._get_resolution( dataset.file_name )
dataset.metadata.resolution_y = y
dataset.metadata.resolution_x = x
dataset.metadata.fps = fps
class Mp4( Video ):
file_ext = "mp4"
def sniff(self, filename):
with magic.Magic(flags=magic.MAGIC_MIME_TYPE) as m:
return m.id_filename(filename) is 'video/mp4'
#Binary.register_unsniffable_binary_ext("mp4")
class Flv( Video ):
file_ext = "flv"
def sniff(self, filename):
with magic.Magic(flags=magic.MAGIC_MIME_TYPE) as m:
return m.id_filename(filename) is 'video/x-flv'
Binary.register_unsniffable_binary_ext("flv")
示例8: Cel
# 需要导入模块: from galaxy.datatypes.binary import Binary [as 别名]
# 或者: from galaxy.datatypes.binary.Binary import register_unsniffable_binary_ext [as 别名]
from galaxy.datatypes import data
from galaxy.datatypes.binary import Binary
class Cel( Binary ):
"""Class for generic CEL binary format"""
file_ext = "cel"
Binary.register_unsniffable_binary_ext("cel")