本文整理汇总了Python中indra.assemblers.PysbAssembler类的典型用法代码示例。如果您正苦于以下问题:Python PysbAssembler类的具体用法?Python PysbAssembler怎么用?Python PysbAssembler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PysbAssembler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_pysb_assembler_actsub
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
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
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
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
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
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
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
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
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
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
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
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
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_pysb_assembler_complex_multiway
def test_pysb_assembler_complex_multiway():
member1 = Agent("BRAF")
member2 = Agent("MEK1")
member3 = Agent("ERK1")
stmt = Complex([member1, member2, member3])
pa = PysbAssembler()
pa.add_statements([stmt])
model = pa.make_model(policies="multi_way")
assert len(model.rules) == 1
assert len(model.monomers) == 3
示例15: test_activity_activity
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