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


Python Species.getEnsemblDbPrefix方法代码示例

本文整理汇总了Python中cogent.db.ensembl.species.Species.getEnsemblDbPrefix方法的典型用法代码示例。如果您正苦于以下问题:Python Species.getEnsemblDbPrefix方法的具体用法?Python Species.getEnsemblDbPrefix怎么用?Python Species.getEnsemblDbPrefix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cogent.db.ensembl.species.Species的用法示例。


在下文中一共展示了Species.getEnsemblDbPrefix方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_get_ensembl_format

# 需要导入模块: from cogent.db.ensembl.species import Species [as 别名]
# 或者: from cogent.db.ensembl.species.Species import getEnsemblDbPrefix [as 别名]
 def test_get_ensembl_format(self):
     """should take common or latin names and return the corresponding
     ensembl db prefix"""
     self.assertEqual(Species.getEnsemblDbPrefix("human"), "homo_sapiens")
     self.assertEqual(Species.getEnsemblDbPrefix("mouse"), "mus_musculus")
     self.assertEqual(Species.getEnsemblDbPrefix("Mus musculus"),
                                             "mus_musculus")
开发者ID:miklou,项目名称:pycogent,代码行数:9,代码来源:test_species.py

示例2: test_add_new_species

# 需要导入模块: from cogent.db.ensembl.species import Species [as 别名]
# 或者: from cogent.db.ensembl.species.Species import getEnsemblDbPrefix [as 别名]
 def test_add_new_species(self):
     """should correctly add a new species/common combination and infer the
     correct ensembl prefix"""
     species_name, common_name = "Otolemur garnettii", "Bushbaby"
     Species.amendSpecies(species_name, common_name)
     self.assertEqual(Species.getSpeciesName(species_name), species_name)
     self.assertEqual(Species.getSpeciesName("Bushbaby"), species_name)
     self.assertEqual(Species.getSpeciesName(common_name), species_name)
     self.assertEqual(Species.getCommonName(species_name), common_name)
     self.assertEqual(Species.getCommonName("Bushbaby"), common_name)
     self.assertEqual(Species.getEnsemblDbPrefix("Bushbaby"), "otolemur_garnettii")
     self.assertEqual(Species.getEnsemblDbPrefix(species_name), "otolemur_garnettii")
     self.assertEqual(Species.getEnsemblDbPrefix(common_name), "otolemur_garnettii")
开发者ID:miklou,项目名称:pycogent,代码行数:15,代码来源:test_species.py

示例3: test_amend_existing

# 需要导入模块: from cogent.db.ensembl.species import Species [as 别名]
# 或者: from cogent.db.ensembl.species.Species import getEnsemblDbPrefix [as 别名]
 def test_amend_existing(self):
     """should correctly amend an existing species"""
     species_name = 'Ochotona princeps'
     common_name1 = 'american pika'
     common_name2 = 'pika'
     ensembl_pref = 'ochotona_princeps'
     Species.amendSpecies(species_name, common_name1)
     self.assertEqual(Species.getCommonName(species_name),common_name1)
     Species.amendSpecies(species_name, common_name2)
     self.assertEqual(Species.getSpeciesName(common_name2), species_name)
     self.assertEqual(Species.getSpeciesName(ensembl_pref), species_name)
     self.assertEqual(Species.getCommonName(species_name), common_name2)
     self.assertEqual(Species.getCommonName(ensembl_pref), common_name2)
     self.assertEqual(Species.getEnsemblDbPrefix(species_name),ensembl_pref)
     self.assertEqual(Species.getEnsemblDbPrefix(common_name2),ensembl_pref)
开发者ID:carze,项目名称:clovr-base,代码行数:17,代码来源:test_species.py


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