当前位置: 首页>>代码示例>>Python>>正文


Python Binary.register_unsniffable_binary_ext方法代码示例

本文整理汇总了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:
开发者ID:eteriSokhoyan,项目名称:galaxy,代码行数:33,代码来源:msa.py

示例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")
开发者ID:GraceGanzel,项目名称:khmer,代码行数:26,代码来源:gedlab.py

示例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 ):
开发者ID:IntersectAustralia,项目名称:hcsvlab-galaxy,代码行数:33,代码来源:psysound.py

示例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')
开发者ID:MateusBellomo,项目名称:tools-galaxyp,代码行数:10,代码来源:scaffold.py

示例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)
开发者ID:bgruening,项目名称:proteomics-datatypes,代码行数:33,代码来源:proteomics.py

示例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"
开发者ID:MateusBellomo,项目名称:tools-galaxyp,代码行数:15,代码来源:proteinpilot.py

示例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")
开发者ID:erasche,项目名称:galaxy-video-datatypes,代码行数:32,代码来源:video.py

示例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")
开发者ID:galaxy-modal,项目名称:transcriptomics,代码行数:9,代码来源:datatypes_smat.py


注:本文中的galaxy.datatypes.binary.Binary.register_unsniffable_binary_ext方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。