本文整理汇总了Python中indra.preassembler.Preassembler.find_contradicts方法的典型用法代码示例。如果您正苦于以下问题:Python Preassembler.find_contradicts方法的具体用法?Python Preassembler.find_contradicts怎么用?Python Preassembler.find_contradicts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类indra.preassembler.Preassembler
的用法示例。
在下文中一共展示了Preassembler.find_contradicts方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_find_contradicts_refinement
# 需要导入模块: from indra.preassembler import Preassembler [as 别名]
# 或者: from indra.preassembler.Preassembler import find_contradicts [as 别名]
def test_find_contradicts_refinement():
ras = Agent('RAS', db_refs={'FPLX': 'RAS'})
kras = Agent('KRAS', db_refs={'HGNC': '6407'})
hras = Agent('HRAS', db_refs={'HGNC': '5173'})
st1 = Phosphorylation(Agent('x'), ras)
st2 = Dephosphorylation(Agent('x'), kras)
st3 = Dephosphorylation(Agent('x'), hras)
pa = Preassembler(hierarchies, [st1, st2, st3])
contradicts = pa.find_contradicts()
assert len(contradicts) == 2
for s1, s2 in contradicts:
assert {s1.uuid, s2.uuid} in ({st1.uuid, st2.uuid},
{st1.uuid, st3.uuid})
示例2: test_find_contradicts
# 需要导入模块: from indra.preassembler import Preassembler [as 别名]
# 或者: from indra.preassembler.Preassembler import find_contradicts [as 别名]
def test_find_contradicts():
st1 = Inhibition(Agent('a'), Agent('b'))
st2 = Activation(Agent('a'), Agent('b'))
st3 = IncreaseAmount(Agent('a'), Agent('b'))
st4 = DecreaseAmount(Agent('a'), Agent('b'))
st5 = ActiveForm(Agent('a',
mods=[ModCondition('phosphorylation', None, None, True)]),
'kinase', True)
st6 = ActiveForm(Agent('a',
mods=[ModCondition('phosphorylation', None, None, True)]),
'kinase', False)
pa = Preassembler(hierarchies, [st1, st2, st3, st4, st5, st6])
contradicts = pa.find_contradicts()
assert len(contradicts) == 3
for s1, s2 in contradicts:
assert {s1.uuid, s2.uuid} in ({st1.uuid, st2.uuid},
{st3.uuid, st4.uuid},
{st5.uuid, st6.uuid})