本文整理汇总了Python中indra.assemblers.PysbAssembler.add_statements方法的典型用法代码示例。如果您正苦于以下问题:Python PysbAssembler.add_statements方法的具体用法?Python PysbAssembler.add_statements怎么用?Python PysbAssembler.add_statements使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类indra.assemblers.PysbAssembler
的用法示例。
在下文中一共展示了PysbAssembler.add_statements方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_pysb_assembler_actsub
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import add_statements [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
示例2: make_model
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import add_statements [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
示例3: test_pysb_assembler_autophos1
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import add_statements [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
示例4: test_pysb_assembler_complex1
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import add_statements [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
示例5: test_pysb_assembler_dephos_noenz
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import add_statements [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
示例6: test_pysb_assembler_phos_twostep_local
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import add_statements [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
示例7: test_pysb_assembler_twostep_mixed
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import add_statements [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
示例8: test_pysb_assembler_rasgap1
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import add_statements [as 别名]
def test_pysb_assembler_rasgap1():
gap = Agent("NF1")
ras = Agent("HRAS")
stmt = RasGap(gap, "catalytic", ras)
pa = PysbAssembler()
pa.add_statements([stmt])
model = pa.make_model()
print model.rules
assert len(model.rules) == 1
assert len(model.monomers) == 2
示例9: test_pysb_assembler_transphos1
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import add_statements [as 别名]
def test_pysb_assembler_transphos1():
egfr = Agent("EGFR")
enz = Agent("EGFR", bound_conditions=[BoundCondition(egfr, True)])
stmt = Transphosphorylation(enz, "tyrosine")
pa = PysbAssembler()
pa.add_statements([stmt])
model = pa.make_model()
print model.rules
assert len(model.rules) == 1
assert len(model.monomers) == 1
示例10: test_pysb_assembler_autophos2
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import add_statements [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
示例11: test_pysb_assembler_dephos_twostep1
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import add_statements [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
示例12: test_activity_activity3
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import add_statements [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
示例13: test_pysb_assembler_phos2
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import add_statements [as 别名]
def test_pysb_assembler_phos2():
hras = Agent("HRAS")
enz = Agent("BRAF", bound_conditions=[BoundCondition(hras, True)])
sub = Agent("MEK1")
stmt = Phosphorylation(enz, sub, "serine", "222")
pa = PysbAssembler()
pa.add_statements([stmt])
model = pa.make_model()
assert len(model.rules) == 1
assert len(model.monomers) == 3
示例14: test_set_context_monomer_notfound
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import add_statements [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
示例15: test_activity_activity
# 需要导入模块: from indra.assemblers import PysbAssembler [as 别名]
# 或者: from indra.assemblers.PysbAssembler import add_statements [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