示例#1
0
def test_phospho_mod_grounding():
    a = Agent('MEK1',
              mods=[
                  ModCondition('phosphorylation', 'S', '218'),
                  ModCondition('phosphorylation', 'S', '222')
              ],
              db_refs={'HGNC': '6840'})
    b = Agent('ERK2', db_refs={'HGNC': '6871'})
    a_phos = Agent('Foo',
                   mods=[ModCondition('phosphorylation', None, None)],
                   db_refs={'HGNC': '6840'})
    st1 = Phosphorylation(a, b, 'T', '185')
    pysb_asmb = pa.PysbAssembler(policies='one_step')
    pysb_asmb.add_statements([st1])
    model = pysb_asmb.make_model()
    mps = list(pa.grounded_monomer_patterns(model, a_phos))
    assert len(mps) == 2
    assert mps[0].monomer.name == 'MEK1'
    assert mps[1].monomer.name == 'MEK1'
    sc = [mp.site_conditions for mp in mps]
    assert {'S218': ('p', WILD)} in sc
    assert {'S222': ('p', WILD)} in sc
    # Check if we get the doubly phosphorylated MonomerPattern
    mps = list(pa.grounded_monomer_patterns(model, a))
    assert len(mps) == 1
    assert mps[0].monomer.name == 'MEK1'
    assert mps[0].site_conditions == {'S218': ('p', WILD), 'S222': ('p', WILD)}
示例#2
0
 def check_policy(policy):
     pysb_asmb = pa.PysbAssembler(policies=policy)
     pysb_asmb.add_statements([st1])
     model = pysb_asmb.make_model()
     mps = list(pa.grounded_monomer_patterns(model, b_phos))
     assert len(mps) == 1
     assert mps[0].monomer.name == 'ERK2'
     assert mps[0].site_conditions == {'T185': ('p', WILD)}
示例#3
0
def test_multiple_grounding_mods():
    mek = Agent('MEK1', db_refs={'HGNC': '6840'})
    erk = Agent('ERK2', db_refs={'HGNC': '6871'})
    cbl = Agent('CBL', db_refs={'HGNC': '1541'})
    ub_phos_erk = Agent('ERK2',
            mods=[ModCondition('phosphorylation', None, None),
                  ModCondition('ubiquitination', None, None)],
            db_refs={'HGNC': '6871'})
    st1 = Phosphorylation(mek, erk, 'T', '185')
    st2 = Phosphorylation(mek, erk, 'Y', '187')
    st3 = Ubiquitination(cbl, erk, 'K', '40')
    st4 = Ubiquitination(cbl, erk, 'K', '50')
    pysb_asmb = pa.PysbAssembler(policies='one_step')
    pysb_asmb.add_statements([st1, st2, st3, st4])
    model = pysb_asmb.make_model()
    mps = list(pa.grounded_monomer_patterns(model, ub_phos_erk))
    assert len(mps) == 4
    assert mps[0].monomer.name == 'ERK2'
    assert mps[1].monomer.name == 'ERK2'
    assert mps[2].monomer.name == 'ERK2'
    assert mps[3].monomer.name == 'ERK2'