コード例 #1
0
def test_build_model_from_ekb():
    m = MRA()
    html = trips_client.send_query('MEK1 phosphorylates ERK2.')
    ekb_xml = trips_client.get_xml(html)
    model = m.build_model_from_ekb(ekb_xml)
    assert (model is not None)
    assert (len(m.statements[0]) == 1)
    assert (isinstance(m.statements[0][0], indra.statements.Phosphorylation))
    assert (m.statements[0][0].enz.name == 'MAP2K1')
    assert (m.statements[0][0].sub.name == 'MAPK1')
コード例 #2
0
ファイル: mra_test.py プロジェクト: sorgerlab/bioagents
def test_build_model_from_ekb():
    m = MRA()
    html = trips_client.send_query('MEK1 phosphorylates ERK2.')
    ekb_xml = trips_client.get_xml(html)
    model = m.build_model_from_ekb(ekb_xml)
    assert(model is not None)
    assert(len(m.statements[0]) == 1)
    assert(isinstance(m.statements[0][0], indra.statements.Phosphorylation))
    assert(m.statements[0][0].enz.name == 'MAP2K1')
    assert(m.statements[0][0].sub.name == 'MAPK1')
コード例 #3
0
ファイル: mra_test.py プロジェクト: pvtodorov/bioagents
def test_build_model_from_ekb():
    m = MRA()
    html = trips_client.send_query('MAP2K1 phosphorylates ERK2.')
    ekb_xml = trips_client.get_xml(html)
    res = m.build_model_from_ekb(ekb_xml)
    assert (res.get('model'))
    assert (res.get('model_id') == 1)
    assert (res.get('model_exec'))
    assert (len(m.models[1]) == 1)
    assert (isinstance(m.models[1][0], Phosphorylation))
    assert (m.models[1][0].enz.name == 'MAP2K1')
    assert (m.models[1][0].sub.name == 'MAPK1')
コード例 #4
0
ファイル: mra_test.py プロジェクト: pvtodorov/bioagents
def test_has_mechanism():
    m = MRA()
    ekb = '<ekb><EVENT id="V33716"><type>ONT::BIND</type><arg1 id="V33712" role=":AGENT" /><arg2 id="V33734" role=":AFFECTED" /></EVENT><TERM id="V33712" dbid="HGNC:1097|NCIT:C51194|NCIT:C17476"><features></features><type>ONT::GENE-PROTEIN</type><name>BRAF</name></TERM><TERM id="V33734" dbid="NCIT:C52823|NCIT:C105947|NCIT:C17808|HGNC:6840|UP:Q91447|UP:Q05116"><features></features><type>ONT::GENE-PROTEIN</type><name>MEK-1</name></TERM></ekb>'
    m.build_model_from_ekb(ekb)
    has_mechanism = m.has_mechanism(ekb, 1)
    assert (has_mechanism)
コード例 #5
0
ファイル: mra_test.py プロジェクト: sorgerlab/bioagents
def test_has_mechanism():
    m = MRA()
    ekb = '<ekb><EVENT id="V33716"><type>ONT::BIND</type><arg1 id="V33712" role=":AGENT" /><arg2 id="V33734" role=":AFFECTED" /></EVENT><TERM id="V33712" dbid="HGNC:1097|NCIT:C51194|NCIT:C17476"><features></features><type>ONT::GENE-PROTEIN</type><name>BRAF</name></TERM><TERM id="V33734" dbid="NCIT:C52823|NCIT:C105947|NCIT:C17808|HGNC:6840|UP:Q91447|UP:Q05116"><features></features><type>ONT::GENE-PROTEIN</type><name>MEK-1</name></TERM></ekb>'
    m.build_model_from_ekb(ekb)
    has_mechanism = m.has_mechanism(ekb, 1)
    assert(has_mechanism)