本文整理匯總了Python中puzzle.plugins.GeminiPlugin._is_variant方法的典型用法代碼示例。如果您正苦於以下問題:Python GeminiPlugin._is_variant方法的具體用法?Python GeminiPlugin._is_variant怎麽用?Python GeminiPlugin._is_variant使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類puzzle.plugins.GeminiPlugin
的用法示例。
在下文中一共展示了GeminiPlugin._is_variant方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_is_variant
# 需要導入模塊: from puzzle.plugins import GeminiPlugin [as 別名]
# 或者: from puzzle.plugins.GeminiPlugin import _is_variant [as 別名]
def test_is_variant(case_obj):
adapter = GeminiPlugin()
genotypes = ['G/A', 'G/A', 'G/G', 'G/G', './.']
ind_objs = [
Individual(ind_id=0, ind_index=0),
Individual(ind_id=1, ind_index=1),
]
#Mock a gemini variant
gemini_variant = {
'gts':genotypes,
'alt':'A'
}
assert adapter._is_variant(gemini_variant, ind_objs)
#Check with individuals that are hom ref
ind_objs = [
Individual(ind_id=0, ind_index=2),
Individual(ind_id=1, ind_index=3),
]
assert not adapter._is_variant(gemini_variant, ind_objs)
#Check with individual that has no call
ind_objs = [
Individual(ind_id=0, ind_index=4),
]
assert not adapter._is_variant(gemini_variant, ind_objs)