本文整理汇总了Python中sourmash._minhash.MinHash.add_protein方法的典型用法代码示例。如果您正苦于以下问题:Python MinHash.add_protein方法的具体用法?Python MinHash.add_protein怎么用?Python MinHash.add_protein使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sourmash._minhash.MinHash
的用法示例。
在下文中一共展示了MinHash.add_protein方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_bytes_protein
# 需要导入模块: from sourmash._minhash import MinHash [as 别名]
# 或者: from sourmash._minhash.MinHash import add_protein [as 别名]
def test_bytes_protein(track_abundance):
# verify that we can hash protein/aa sequences
mh = MinHash(10, 6, True, track_abundance=track_abundance)
mh.add_protein('AGYYG')
mh.add_protein(u'AGYYG')
mh.add_protein(b'AGYYG')
assert len(mh.get_mins()) == 4
示例2: test_basic_dna_bad_2
# 需要导入模块: from sourmash._minhash import MinHash [as 别名]
# 或者: from sourmash._minhash.MinHash import add_protein [as 别名]
def test_basic_dna_bad_2(track_abundance):
# test behavior on bad DNA
mh = MinHash(1, 6, track_abundance=track_abundance)
with pytest.raises(ValueError):
mh.add_protein('YYYY')
示例3: test_protein_short
# 需要导入模块: from sourmash._minhash import MinHash [as 别名]
# 或者: from sourmash._minhash.MinHash import add_protein [as 别名]
def test_protein_short(track_abundance):
# verify that we can hash protein/aa sequences
mh = MinHash(10, 9, True, track_abundance=track_abundance)
mh.add_protein('AG')
assert len(mh.get_mins()) == 0, mh.get_mins()