本文整理汇总了Python中indra.assemblers.PysbAssembler.make_model方法的典型用法代码示例。如果您正苦于以下问题:Python PysbAssembler.make_model方法的具体用法?Python PysbAssembler.make_model怎么用?Python PysbAssembler.make_model使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类indra.assemblers.PysbAssembler
的用法示例。
在下文中一共展示了PysbAssembler.make_model方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_pysb_assembler_twostep_mixed
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import make_model [as 别名]
def test_pysb_assembler_twostep_mixed():
member1 = Agent("BRAF")
member2 = Agent("RAF1")
st1 = Complex([member1, member2])
st2 = Phosphorylation(Agent("MAP2K1"), Agent("MAPK3"))
pa = PysbAssembler()
pa.add_statements([st1, st2])
pa.make_model(policies="two_step")
assert len(pa.model.rules) == 5
assert len(pa.model.monomers) == 4
示例2: test_set_context_monomer_notfound
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import make_model [as 别名]
def test_set_context_monomer_notfound():
st = Phosphorylation(Agent("MAP2K1"), Agent("XYZ"))
pa = PysbAssembler()
pa.add_statements([st])
pa.make_model()
assert pa.model.parameters["MAP2K1_0"].value < 1000
assert pa.model.parameters["XYZ_0"].value < 1000
pa.set_context("A375_SKIN")
assert pa.model.parameters["MAP2K1_0"].value > 10000
assert pa.model.parameters["XYZ_0"].value < 1000
示例3: test_neg_agent_mod
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import make_model [as 别名]
def test_neg_agent_mod():
mc = ModCondition("phosphorylation", "serine", "123", False)
st = Phosphorylation(Agent("BRAF", mods=[mc]), Agent("MAP2K2"))
pa = PysbAssembler(policies="one_step")
pa.add_statements([st])
pa.make_model()
assert len(pa.model.rules) == 1
r = pa.model.rules[0]
braf = r.reactant_pattern.complex_patterns[0].monomer_patterns[0]
assert braf.monomer.name == "BRAF"
assert braf.site_conditions == {"S123": "u"}
示例4: test_mut
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import make_model [as 别名]
def test_mut():
mut = MutCondition("600", "V", "E")
st = Phosphorylation(Agent("BRAF", mutations=[mut]), Agent("MEK"))
pa = PysbAssembler()
pa.add_statements([st])
pa.make_model()
assert len(pa.model.rules) == 1
r = pa.model.rules[0]
braf = r.reactant_pattern.complex_patterns[0].monomer_patterns[0]
assert braf.monomer.name == "BRAF"
assert braf.site_conditions == {"V600": "E"}
示例5: test_pysb_assembler_phos_twostep_local_to_global
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import make_model [as 别名]
def test_pysb_assembler_phos_twostep_local_to_global():
enz = Agent("BRAF")
sub = Agent("MEK1")
stmt = Phosphorylation(enz, sub, "serine", "222")
pa = PysbAssembler()
pa.add_statements([stmt])
model = pa.make_model(policies="two_step")
# This call should have reverted to default policy
model = pa.make_model()
print model.rules
assert len(model.rules) == 1
assert len(model.monomers) == 2
示例6: test_pysb_assembler_actsub
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import make_model [as 别名]
def test_pysb_assembler_actsub():
stmt = ActiveForm(Agent("BRAF", mutations=[MutCondition("600", "V", "E")]), "activity", True)
pa = PysbAssembler()
pa.add_statements([stmt])
model = pa.make_model(policies="two_step")
assert len(model.rules) == 0
assert len(model.monomers) == 1
示例7: make_model
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import make_model [as 别名]
def make_model(text):
"""Given text, return an INDRA model."""
from indra.assemblers import PysbAssembler
pa = PysbAssembler()
pa.add_statements(make_statements(text))
model = pa.make_model(policies='two_step')
return model
示例8: test_pysb_assembler_autophos1
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import make_model [as 别名]
def test_pysb_assembler_autophos1():
enz = Agent("MEK1")
stmt = Autophosphorylation(enz, "serine", "222")
pa = PysbAssembler()
pa.add_statements([stmt])
model = pa.make_model()
assert len(model.rules) == 1
assert len(model.monomers) == 1
示例9: test_pysb_assembler_complex1
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import make_model [as 别名]
def test_pysb_assembler_complex1():
member1 = Agent("BRAF")
member2 = Agent("MEK1")
stmt = Complex([member1, member2])
pa = PysbAssembler()
pa.add_statements([stmt])
model = pa.make_model()
assert len(model.rules) == 2
assert len(model.monomers) == 2
示例10: test_pysb_assembler_dephos_noenz
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import make_model [as 别名]
def test_pysb_assembler_dephos_noenz():
enz = None
sub = Agent("MEK1")
stmt = Phosphorylation(enz, sub, "serine", "222")
pa = PysbAssembler()
pa.add_statements([stmt])
model = pa.make_model()
assert len(model.rules) == 0
assert len(model.monomers) == 0
示例11: test_activity_activity3
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import make_model [as 别名]
def test_activity_activity3():
subj = Agent("Vemurafenib")
obj = Agent("BRAF")
stmt = Activation(subj, None, obj, "activity", False)
pa = PysbAssembler(policies="one_step")
pa.add_statements([stmt])
model = pa.make_model()
print model.rules
assert len(model.rules) == 1
assert len(model.monomers) == 2
示例12: test_activity_activity
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import make_model [as 别名]
def test_activity_activity():
subj = Agent("KRAS")
obj = Agent("BRAF")
stmt = Activation(subj, "activity", obj, "activity", True)
pa = PysbAssembler(policies="interactions_only")
pa.add_statements([stmt])
model = pa.make_model()
print model.rules
assert len(model.rules) == 1
assert len(model.monomers) == 2
示例13: test_pysb_assembler_dephos_twostep1
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import make_model [as 别名]
def test_pysb_assembler_dephos_twostep1():
phos = Agent("PP2A")
sub = Agent("MEK1")
stmt = Dephosphorylation(phos, sub, "serine", "222")
pa = PysbAssembler(policies="two_step")
pa.add_statements([stmt])
model = pa.make_model()
print model.rules
assert len(model.rules) == 3
assert len(model.monomers) == 2
示例14: test_pysb_assembler_phos_twostep_local
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import make_model [as 别名]
def test_pysb_assembler_phos_twostep_local():
enz = Agent("BRAF")
sub = Agent("MEK1")
stmt = Phosphorylation(enz, sub, "serine", "222")
pa = PysbAssembler()
pa.add_statements([stmt])
model = pa.make_model(policies="two_step")
print model.rules
assert len(model.rules) == 3
assert len(model.monomers) == 2
示例15: test_pysb_assembler_autophos2
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import make_model [as 别名]
def test_pysb_assembler_autophos2():
raf1 = Agent("RAF1")
enz = Agent("MEK1", bound_conditions=[BoundCondition(raf1, True)])
stmt = Autophosphorylation(enz, "serine", "222")
pa = PysbAssembler()
pa.add_statements([stmt])
model = pa.make_model()
print model.rules
assert len(model.rules) == 1
assert len(model.monomers) == 2