本文整理匯總了Python中species.Species.getSpeciesName方法的典型用法代碼示例。如果您正苦於以下問題:Python Species.getSpeciesName方法的具體用法?Python Species.getSpeciesName怎麽用?Python Species.getSpeciesName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類species.Species
的用法示例。
在下文中一共展示了Species.getSpeciesName方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: from species import Species [as 別名]
# 或者: from species.Species import getSpeciesName [as 別名]
def __init__(self, db_name):
"""db_name: and Emsembl database name"""
if isinstance(db_name, EnsemblDbName):
db_name = db_name.Name
self.Name = db_name
self.Type = get_dbtype_from_name(db_name)
self.Prefix = get_db_prefix(db_name)
release, build = get_version_from_name(db_name)
self.Release = release
self.GeneralRelease = self.Release
if len(build) == 1:
if self.Type != 'compara':
self.Build = build[0]
else:
self.Build = None
self.GeneralRelease = build[0]
elif build:
self.Build = build[1]
self.GeneralRelease = build[0]
else:
self.Build = None
self.Species = None
self.Species = Species.getSpeciesName(self.Prefix)