本文整理汇总了Python中cogent.seqsim.searchpath.SearchPath._get_alphabet方法的典型用法代码示例。如果您正苦于以下问题:Python SearchPath._get_alphabet方法的具体用法?Python SearchPath._get_alphabet怎么用?Python SearchPath._get_alphabet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cogent.seqsim.searchpath.SearchPath
的用法示例。
在下文中一共展示了SearchPath._get_alphabet方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_alphabet_default
# 需要导入模块: from cogent.seqsim.searchpath import SearchPath [as 别名]
# 或者: from cogent.seqsim.searchpath.SearchPath import _get_alphabet [as 别名]
def test_get_alphabet_default(self):
"""Should return default alphabet if none defined for position"""
#SearchPathHelper.alphabets has only a default entry
test = SearchPath(SearchPathHelper.alphabets)
real_alph = test._get_alphabet(0)
correct_alph = SearchPathHelper.alphabets[SearchPath.DEFAULT_KEY]
self.assertEquals(str(real_alph), str(correct_alph))
示例2: test_get_alphabet_exists
# 需要导入模块: from cogent.seqsim.searchpath import SearchPath [as 别名]
# 或者: from cogent.seqsim.searchpath.SearchPath import _get_alphabet [as 别名]
def test_get_alphabet_exists(self):
"""Should return alphabet for position when one exists"""
alph1 = "G"
alph2 = "ACGT"
test_alphs = {0:alph1, 2:alph1, SearchPath.DEFAULT_KEY:alph2}
test = SearchPath(test_alphs)
real_alph = test._get_alphabet(2)
self.assertEquals(str(real_alph), alph1)