예제 #1
0
def test_process_row_complex_down():
    test_row = _SignorRow_(ENTITYA='XIAP', TYPEA='protein', IDA='P98170',
            DATABASEA='UNIPROT', ENTITYB='CASP3', TYPEB='protein',
            IDB='P42574', DATABASEB='UNIPROT', EFFECT='down-regulates activity',
            MECHANISM='binding', RESIDUE='', SEQUENCE='', TAX_ID='9606',
            CELL_DATA='', TISSUE_DATA='', MODULATOR_COMPLEX='',
            TARGET_COMPLEX='', MODIFICATIONA='', MODASEQ='', MODIFICATIONB='',
            MODBSEQ='', PMID='10548111', DIRECT='YES', NOTES='',
            ANNOTATOR='amattioni', SENTENCE='', SIGNOR_ID='SIGNOR-71954')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 3
    assert isinstance(stmts[0], Inhibition)
    assert isinstance(stmts[1], Complex)
    cplx_agent_a = stmts[1].agent_list()[0]
    cplx_agent_b = stmts[1].agent_list()[1]
    af = stmts[2]
    assert isinstance(af, ActiveForm)
    # Won't fully match because of bound condition, so we check name
    assert af.agent.name == cplx_agent_b.name
    assert len(af.agent.bound_conditions) == 1
    bc = af.agent.bound_conditions[0]
    assert bc.agent.matches(cplx_agent_a)
    assert bc.is_bound
    assert af.activity == 'activity'
    assert not af.is_active
예제 #2
0
def test_process_row_dephos_nores_down():
    test_row = SignorRow(ENTITYA='CSNK1D', TYPEA='protein', IDA='P48730',
            DATABASEA='UNIPROT', ENTITYB='LEF1', TYPEB='protein', IDB='Q9UJU2',
            DATABASEB='UNIPROT', EFFECT='down-regulates',
            MECHANISM='dephosphorylation', RESIDUE='', SEQUENCE='',
            TAX_ID='9606', CELL_DATA='', TISSUE_DATA='', MODULATOR_COMPLEX='',
            TARGET_COMPLEX='', MODIFICATIONA='', MODASEQ='', MODIFICATIONB='',
            MODBSEQ='', PMID='15747065', DIRECT='YES', NOTES='',
            ANNOTATOR='gcesareni', SENTENCE='', SIGNOR_ID='SIGNOR-134494')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 3
    assert isinstance(stmts[0], Inhibition)
    assert isinstance(stmts[1], Dephosphorylation)
    assert stmts[1].residue is None
    assert stmts[1].position is None
    af = stmts[2]
    assert isinstance(af, ActiveForm)
    assert len(af.agent.mods) == 1
    mc = af.agent.mods[0]
    assert mc.mod_type == 'phosphorylation'
    assert mc.residue is None
    assert mc.position is None
    assert af.is_active == True
예제 #3
0
def test_process_row_phos_multi_res():
    test_row = _SignorRow_(ENTITYA='RAF1', TYPEA='protein', IDA='P04049',
            DATABASEA='UNIPROT', ENTITYB='MAP2K2', TYPEB='protein',
            IDB='P36507', DATABASEB='UNIPROT', EFFECT='up-regulates',
            MECHANISM='phosphorylation', RESIDUE='Ser218;Ser222',
            SEQUENCE='VSGQLIDsMANSFVG;LIDSMANsFVGTRSY', TAX_ID='9606',
            CELL_DATA='', TISSUE_DATA='', MODULATOR_COMPLEX='',
            TARGET_COMPLEX='', MODIFICATIONA='', MODASEQ='', MODIFICATIONB='',
            MODBSEQ='', PMID='8157000', DIRECT='YES',
            NOTES='', ANNOTATOR='gcesareni', SENTENCE='',
            SIGNOR_ID='SIGNOR-36553')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 4
    assert isinstance(stmts[0], Activation)
    assert isinstance(stmts[1], Phosphorylation)
    assert stmts[1].position == '218'
    assert isinstance(stmts[2], Phosphorylation)
    assert stmts[2].position == '222'
    af = stmts[3]
    assert isinstance(af, ActiveForm)
    assert len(af.agent.mods) == 2
    mc0 = af.agent.mods[0]
    assert mc0.mod_type == 'phosphorylation'
    assert mc0.residue == 'S'
    assert mc0.position == '218'
    mc1 = af.agent.mods[1]
    assert mc1.mod_type == 'phosphorylation'
    assert mc1.residue == 'S'
    assert mc1.position == '222'
    assert af.is_active == True
예제 #4
0
def test_process_row_complex_up():
    test_row = _SignorRow_(ENTITYA='NONO', TYPEA='protein', IDA='Q15233',
            DATABASEA='UNIPROT', ENTITYB='TOP1', TYPEB='protein', IDB='P11387',
            DATABASEB='UNIPROT', EFFECT='up-regulates', MECHANISM='binding',
            RESIDUE='', SEQUENCE='', TAX_ID='9606', CELL_DATA='BTO:0000017',
            TISSUE_DATA='', MODULATOR_COMPLEX='', TARGET_COMPLEX='',
            MODIFICATIONA='', MODASEQ='', MODIFICATIONB='', MODBSEQ='',
            PMID='9756848', DIRECT='YES', NOTES='', ANNOTATOR='miannu',
            SENTENCE='', SIGNOR_ID='SIGNOR-60557')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 3
    assert isinstance(stmts[0], Activation)
    assert isinstance(stmts[1], Complex)
    cplx_agent_a = stmts[1].agent_list()[0]
    cplx_agent_b = stmts[1].agent_list()[1]
    af = stmts[2]
    assert isinstance(af, ActiveForm)
    # Won't fully match because of bound condition, so we check name
    assert af.agent.name == cplx_agent_b.name
    assert len(af.agent.bound_conditions) == 1
    bc = af.agent.bound_conditions[0]
    assert bc.agent.matches(cplx_agent_a)
    assert bc.is_bound
    assert af.activity == 'activity'
    assert af.is_active
예제 #5
0
def test_process_row_dephos_nores_up():
    test_row = _SignorRow_(ENTITYA='STK11', TYPEA='protein', IDA='Q15831',
            DATABASEA='UNIPROT', ENTITYB='AMPK', TYPEB='complex',
            IDB='SIGNOR-C15', DATABASEB='SIGNOR',
            EFFECT='up-regulates activity', MECHANISM='dephosphorylation',
            RESIDUE='', SEQUENCE='', TAX_ID='-1', CELL_DATA='', TISSUE_DATA='', 
            MODULATOR_COMPLEX='', TARGET_COMPLEX='', MODIFICATIONA='',
            MODASEQ='', MODIFICATIONB='', MODBSEQ='', PMID='14976552',
            DIRECT='YES', NOTES='', ANNOTATOR='lperfetto',
            SENTENCE='', SIGNOR_ID='SIGNOR-242602')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 3
    assert isinstance(stmts[0], Activation)
    assert isinstance(stmts[1], Dephosphorylation)
    assert stmts[1].residue is None
    assert stmts[1].position is None
    af = stmts[2]
    assert isinstance(af, ActiveForm)
    assert len(af.agent.mods) == 1
    mc = af.agent.mods[0]
    assert mc.mod_type == 'phosphorylation'
    assert mc.residue is None
    assert mc.position is None
    assert af.is_active == False
예제 #6
0
def test_process_row_dephos_nores_down():
    test_row = _SignorRow_(ENTITYA='CSNK1D', TYPEA='protein', IDA='P48730',
            DATABASEA='UNIPROT', ENTITYB='LEF1', TYPEB='protein', IDB='Q9UJU2',
            DATABASEB='UNIPROT', EFFECT='down-regulates',
            MECHANISM='dephosphorylation', RESIDUE='', SEQUENCE='',
            TAX_ID='9606', CELL_DATA='', TISSUE_DATA='', MODULATOR_COMPLEX='',
            TARGET_COMPLEX='', MODIFICATIONA='', MODASEQ='', MODIFICATIONB='',
            MODBSEQ='', PMID='15747065', DIRECT='YES', NOTES='',
            ANNOTATOR='gcesareni', SENTENCE='', SIGNOR_ID='SIGNOR-134494')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 3
    assert isinstance(stmts[0], Inhibition)
    assert isinstance(stmts[1], Dephosphorylation)
    assert stmts[1].residue is None
    assert stmts[1].position is None
    af = stmts[2]
    assert isinstance(af, ActiveForm)
    assert len(af.agent.mods) == 1
    mc = af.agent.mods[0]
    assert mc.mod_type == 'phosphorylation'
    assert mc.residue is None
    assert mc.position is None
    assert af.is_active == True
예제 #7
0
def test_process_row_dephos_down():
    test_row = _SignorRow_(ENTITYA='PRKCD', TYPEA='protein', IDA='Q05655',
            DATABASEA='UNIPROT', ENTITYB='PTPN22', TYPEB='protein',
            IDB='Q9Y2R2', DATABASEB='UNIPROT', EFFECT='down-regulates',
            MECHANISM='dephosphorylation', RESIDUE='Ser35',
            SEQUENCE='FLKLKRQsTKYKADK', TAX_ID='9606', CELL_DATA='BTO:0000782',
            TISSUE_DATA='', MODULATOR_COMPLEX='', TARGET_COMPLEX='',
            MODIFICATIONA='', MODASEQ='', MODIFICATIONB='', MODBSEQ='',
            PMID='18056643', DIRECT='YES', NOTES='', ANNOTATOR='llicata',
            SENTENCE='', SIGNOR_ID='SIGNOR-159591')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 3
    assert isinstance(stmts[0], Inhibition)
    assert isinstance(stmts[1], Dephosphorylation)
    assert stmts[1].residue == 'S'
    assert stmts[1].position == '35'
    af = stmts[2]
    assert isinstance(af, ActiveForm)
    assert len(af.agent.mods) == 1
    mc = af.agent.mods[0]
    assert mc.mod_type == 'phosphorylation'
    assert mc.residue == 'S'
    assert mc.position == '35'
    assert af.is_active == True
예제 #8
0
def test_process_row_dephos_down():
    test_row = SignorRow(ENTITYA='PRKCD', TYPEA='protein', IDA='Q05655',
            DATABASEA='UNIPROT', ENTITYB='PTPN22', TYPEB='protein',
            IDB='Q9Y2R2', DATABASEB='UNIPROT', EFFECT='down-regulates',
            MECHANISM='dephosphorylation', RESIDUE='Ser35',
            SEQUENCE='FLKLKRQsTKYKADK', TAX_ID='9606', CELL_DATA='BTO:0000782',
            TISSUE_DATA='', MODULATOR_COMPLEX='', TARGET_COMPLEX='',
            MODIFICATIONA='', MODASEQ='', MODIFICATIONB='', MODBSEQ='',
            PMID='18056643', DIRECT='YES', NOTES='', ANNOTATOR='llicata',
            SENTENCE='', SIGNOR_ID='SIGNOR-159591')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 3
    assert isinstance(stmts[0], Inhibition)
    assert isinstance(stmts[1], Dephosphorylation)
    assert stmts[1].residue == 'S'
    assert stmts[1].position == '35'
    af = stmts[2]
    assert isinstance(af, ActiveForm)
    assert len(af.agent.mods) == 1
    mc = af.agent.mods[0]
    assert mc.mod_type == 'phosphorylation'
    assert mc.residue == 'S'
    assert mc.position == '35'
    assert af.is_active == True
예제 #9
0
def test_process_row_complex_up():
    test_row = SignorRow(ENTITYA='NONO', TYPEA='protein', IDA='Q15233',
            DATABASEA='UNIPROT', ENTITYB='TOP1', TYPEB='protein', IDB='P11387',
            DATABASEB='UNIPROT', EFFECT='up-regulates', MECHANISM='binding',
            RESIDUE='', SEQUENCE='', TAX_ID='9606', CELL_DATA='BTO:0000017',
            TISSUE_DATA='', MODULATOR_COMPLEX='', TARGET_COMPLEX='',
            MODIFICATIONA='', MODASEQ='', MODIFICATIONB='', MODBSEQ='',
            PMID='9756848', DIRECT='YES', NOTES='', ANNOTATOR='miannu',
            SENTENCE='', SIGNOR_ID='SIGNOR-60557')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 3
    assert isinstance(stmts[0], Activation)
    assert isinstance(stmts[1], Complex)
    cplx_agent_a = stmts[1].agent_list()[0]
    cplx_agent_b = stmts[1].agent_list()[1]
    af = stmts[2]
    assert isinstance(af, ActiveForm)
    # Won't fully match because of bound condition, so we check name
    assert af.agent.name == cplx_agent_b.name
    assert len(af.agent.bound_conditions) == 1
    bc = af.agent.bound_conditions[0]
    assert bc.agent.matches(cplx_agent_a)
    assert bc.is_bound
    assert af.activity == 'activity'
    assert af.is_active
예제 #10
0
def test_process_row_dephos_up():
    test_row = _SignorRow_(ENTITYA='CHEK2', TYPEA='protein', IDA='O96017',
            DATABASEA='UNIPROT', ENTITYB='CHEK2', TYPEB='protein', IDB='O96017',
            DATABASEB='UNIPROT', EFFECT='up-regulates activity',
            MECHANISM='dephosphorylation', RESIDUE='Thr387',
            SEQUENCE='LMRTLCGtPTYLAPE', TAX_ID='9606', CELL_DATA='BTO:0000007',
            TISSUE_DATA='', MODULATOR_COMPLEX='', TARGET_COMPLEX='',
            MODIFICATIONA='', MODASEQ='', MODIFICATIONB='', MODBSEQ='',
            PMID='11901158', DIRECT='YES', NOTES='', ANNOTATOR='gcesareni',
            SENTENCE='', SIGNOR_ID='SIGNOR-116131')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 3
    assert isinstance(stmts[0], Activation)
    assert isinstance(stmts[1], Dephosphorylation)
    assert stmts[1].residue == 'T'
    assert stmts[1].position == '387'
    af = stmts[2]
    assert isinstance(af, ActiveForm)
    assert len(af.agent.mods) == 1
    mc = af.agent.mods[0]
    assert mc.mod_type == 'phosphorylation'
    assert mc.residue == 'T'
    assert mc.position == '387'
    assert af.is_active == False
예제 #11
0
def test_process_row_complex_down():
    test_row = SignorRow(ENTITYA='XIAP', TYPEA='protein', IDA='P98170',
            DATABASEA='UNIPROT', ENTITYB='CASP3', TYPEB='protein',
            IDB='P42574', DATABASEB='UNIPROT', EFFECT='down-regulates activity',
            MECHANISM='binding', RESIDUE='', SEQUENCE='', TAX_ID='9606',
            CELL_DATA='', TISSUE_DATA='', MODULATOR_COMPLEX='',
            TARGET_COMPLEX='', MODIFICATIONA='', MODASEQ='', MODIFICATIONB='',
            MODBSEQ='', PMID='10548111', DIRECT='YES', NOTES='',
            ANNOTATOR='amattioni', SENTENCE='', SIGNOR_ID='SIGNOR-71954')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 3
    assert isinstance(stmts[0], Inhibition)
    assert isinstance(stmts[1], Complex)
    cplx_agent_a = stmts[1].agent_list()[0]
    cplx_agent_b = stmts[1].agent_list()[1]
    af = stmts[2]
    assert isinstance(af, ActiveForm)
    # Won't fully match because of bound condition, so we check name
    assert af.agent.name == cplx_agent_b.name
    assert len(af.agent.bound_conditions) == 1
    bc = af.agent.bound_conditions[0]
    assert bc.agent.matches(cplx_agent_a)
    assert bc.is_bound
    assert af.activity == 'activity'
    assert not af.is_active
예제 #12
0
파일: test_signor.py 프로젝트: budakn/INDRA
def test_process_row_chem_inh():
    test_row_chem_inh = SignorRow(ENTITYA='722544-51-6',
                                  TYPEA='chemical',
                                  IDA='CID:16007391',
                                  DATABASEA='PUBCHEM',
                                  ENTITYB='AURKB',
                                  TYPEB='protein',
                                  IDB='Q96GD4',
                                  DATABASEB='UNIPROT',
                                  EFFECT='down-regulates',
                                  MECHANISM='chemical inhibition',
                                  RESIDUE='',
                                  SEQUENCE='',
                                  TAX_ID='9606',
                                  CELL_DATA='',
                                  TISSUE_DATA='',
                                  MODULATOR_COMPLEX='',
                                  TARGET_COMPLEX='',
                                  MODIFICATIONA='',
                                  MODASEQ='',
                                  MODIFICATIONB='',
                                  MODBSEQ='',
                                  PMID='Other',
                                  DIRECT='YES',
                                  NOTES='Selleck',
                                  ANNOTATOR='gcesareni',
                                  SENTENCE='',
                                  SIGNOR_ID='SIGNOR-190245')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row_chem_inh)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 1
    assert isinstance(stmts[0], Inhibition)
예제 #13
0
파일: test_signor.py 프로젝트: budakn/INDRA
def test_process_row_chem_act():
    test_row_chem_act = SignorRow(ENTITYA='Prostaglandin E2',
                                  TYPEA='smallmolecule',
                                  IDA='CID:5280360',
                                  DATABASEA='PUBCHEM',
                                  ENTITYB='GNG12',
                                  TYPEB='protein',
                                  IDB='Q9UBI6',
                                  DATABASEB='UNIPROT',
                                  EFFECT='up-regulates',
                                  MECHANISM='chemical activation',
                                  RESIDUE='',
                                  SEQUENCE='',
                                  TAX_ID='9606',
                                  CELL_DATA='',
                                  TISSUE_DATA='',
                                  MODULATOR_COMPLEX='',
                                  TARGET_COMPLEX='',
                                  MODIFICATIONA='',
                                  MODASEQ='',
                                  MODIFICATIONB='',
                                  MODBSEQ='',
                                  PMID='16293724',
                                  DIRECT='YES',
                                  NOTES='',
                                  ANNOTATOR='gcesareni',
                                  SENTENCE='',
                                  SIGNOR_ID='SIGNOR-141820')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row_chem_act)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 1
    assert isinstance(stmts[0], Activation)
예제 #14
0
def test_process_row_dephos_nores_up():
    test_row = SignorRow(ENTITYA='STK11', TYPEA='protein', IDA='Q15831',
            DATABASEA='UNIPROT', ENTITYB='AMPK', TYPEB='complex',
            IDB='SIGNOR-C15', DATABASEB='SIGNOR',
            EFFECT='up-regulates activity', MECHANISM='dephosphorylation',
            RESIDUE='', SEQUENCE='', TAX_ID='-1', CELL_DATA='', TISSUE_DATA='', 
            MODULATOR_COMPLEX='', TARGET_COMPLEX='', MODIFICATIONA='',
            MODASEQ='', MODIFICATIONB='', MODBSEQ='', PMID='14976552',
            DIRECT='YES', NOTES='', ANNOTATOR='lperfetto',
            SENTENCE='', SIGNOR_ID='SIGNOR-242602')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 3
    assert isinstance(stmts[0], Activation)
    assert isinstance(stmts[1], Dephosphorylation)
    assert stmts[1].residue is None
    assert stmts[1].position is None
    af = stmts[2]
    assert isinstance(af, ActiveForm)
    assert len(af.agent.mods) == 1
    mc = af.agent.mods[0]
    assert mc.mod_type == 'phosphorylation'
    assert mc.residue is None
    assert mc.position is None
    assert af.is_active == False
예제 #15
0
def test_process_row_phos_multi_res():
    test_row = SignorRow(ENTITYA='RAF1', TYPEA='protein', IDA='P04049',
            DATABASEA='UNIPROT', ENTITYB='MAP2K2', TYPEB='protein',
            IDB='P36507', DATABASEB='UNIPROT', EFFECT='up-regulates',
            MECHANISM='phosphorylation', RESIDUE='Ser218;Ser222',
            SEQUENCE='VSGQLIDsMANSFVG;LIDSMANsFVGTRSY', TAX_ID='9606',
            CELL_DATA='', TISSUE_DATA='', MODULATOR_COMPLEX='',
            TARGET_COMPLEX='', MODIFICATIONA='', MODASEQ='', MODIFICATIONB='',
            MODBSEQ='', PMID='8157000', DIRECT='YES',
            NOTES='', ANNOTATOR='gcesareni', SENTENCE='',
            SIGNOR_ID='SIGNOR-36553')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 4
    assert isinstance(stmts[0], Activation)
    assert isinstance(stmts[1], Phosphorylation)
    assert stmts[1].position == '218'
    assert isinstance(stmts[2], Phosphorylation)
    assert stmts[2].position == '222'
    af = stmts[3]
    assert isinstance(af, ActiveForm)
    assert len(af.agent.mods) == 2
    mc0 = af.agent.mods[0]
    assert mc0.mod_type == 'phosphorylation'
    assert mc0.residue == 'S'
    assert mc0.position == '218'
    mc1 = af.agent.mods[1]
    assert mc1.mod_type == 'phosphorylation'
    assert mc1.residue == 'S'
    assert mc1.position == '222'
    assert af.is_active == True
예제 #16
0
def test_process_row_dephos_up():
    test_row = SignorRow(ENTITYA='CHEK2', TYPEA='protein', IDA='O96017',
            DATABASEA='UNIPROT', ENTITYB='CHEK2', TYPEB='protein', IDB='O96017',
            DATABASEB='UNIPROT', EFFECT='up-regulates activity',
            MECHANISM='dephosphorylation', RESIDUE='Thr387',
            SEQUENCE='LMRTLCGtPTYLAPE', TAX_ID='9606', CELL_DATA='BTO:0000007',
            TISSUE_DATA='', MODULATOR_COMPLEX='', TARGET_COMPLEX='',
            MODIFICATIONA='', MODASEQ='', MODIFICATIONB='', MODBSEQ='',
            PMID='11901158', DIRECT='YES', NOTES='', ANNOTATOR='gcesareni',
            SENTENCE='', SIGNOR_ID='SIGNOR-116131')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 3
    assert isinstance(stmts[0], Activation)
    assert isinstance(stmts[1], Dephosphorylation)
    assert stmts[1].residue == 'T'
    assert stmts[1].position == '387'
    af = stmts[2]
    assert isinstance(af, ActiveForm)
    assert len(af.agent.mods) == 1
    mc = af.agent.mods[0]
    assert mc.mod_type == 'phosphorylation'
    assert mc.residue == 'T'
    assert mc.position == '387'
    assert af.is_active == False
예제 #17
0
파일: test_signor.py 프로젝트: budakn/INDRA
def test_process_row_stab():
    test_row_stab = SignorRow(ENTITYA='UCHL5',
                              TYPEA='protein',
                              IDA='Q9Y5K5',
                              DATABASEA='UNIPROT',
                              ENTITYB='TGFBR1',
                              TYPEB='protein',
                              IDB='P36897',
                              DATABASEB='UNIPROT',
                              EFFECT='up-regulates',
                              MECHANISM='stabilization',
                              RESIDUE='',
                              SEQUENCE='',
                              TAX_ID='9606',
                              CELL_DATA='',
                              TISSUE_DATA='',
                              MODULATOR_COMPLEX='',
                              TARGET_COMPLEX='',
                              MODIFICATIONA='',
                              MODASEQ='',
                              MODIFICATIONB='',
                              MODBSEQ='',
                              PMID='17052192',
                              DIRECT='YES',
                              NOTES='',
                              ANNOTATOR='gcesareni',
                              SENTENCE='',
                              SIGNOR_ID='SIGNOR-150135')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row_stab)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 1
    assert isinstance(stmts[0], IncreaseAmount)
예제 #18
0
def test_process_row():
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 1
    assert isinstance(stmts[0], IncreaseAmount)
    assert stmts[0].agent_list()[0].activity.activity_type == 'transcription'
예제 #19
0
파일: test_signor.py 프로젝트: budakn/INDRA
def test_process_row():
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 1
    assert isinstance(stmts[0], IncreaseAmount)
    assert stmts[0].agent_list()[0].activity.activity_type == 'transcription'
예제 #20
0
def test_process_row_chem_act():
    test_row_chem_act = _SignorRow_(ENTITYA='Prostaglandin E2',
        TYPEA='smallmolecule', IDA='CID:5280360', DATABASEA='PUBCHEM',
        ENTITYB='GNG12', TYPEB='protein', IDB='Q9UBI6', DATABASEB='UNIPROT',
        EFFECT='up-regulates', MECHANISM='chemical activation', RESIDUE='',
        SEQUENCE='', TAX_ID='9606', CELL_DATA='', TISSUE_DATA='',
        MODULATOR_COMPLEX='', TARGET_COMPLEX='', MODIFICATIONA='', MODASEQ='',
        MODIFICATIONB='', MODBSEQ='', PMID='16293724', DIRECT='YES', NOTES='',
        ANNOTATOR='gcesareni', SENTENCE='', SIGNOR_ID='SIGNOR-141820')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row_chem_act)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 1
    assert isinstance(stmts[0], Activation)
예제 #21
0
def test_process_row_stab():
    test_row_stab = _SignorRow_(ENTITYA='UCHL5', TYPEA='protein', IDA='Q9Y5K5',
            DATABASEA='UNIPROT', ENTITYB='TGFBR1', TYPEB='protein',
            IDB='P36897', DATABASEB='UNIPROT', EFFECT='up-regulates',
            MECHANISM='stabilization', RESIDUE='', SEQUENCE='', TAX_ID='9606',
            CELL_DATA='', TISSUE_DATA='', MODULATOR_COMPLEX='',
            TARGET_COMPLEX='', MODIFICATIONA='', MODASEQ='', MODIFICATIONB='',
            MODBSEQ='', PMID='17052192', DIRECT='YES', NOTES='',
            ANNOTATOR='gcesareni', SENTENCE='', SIGNOR_ID='SIGNOR-150135')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row_stab)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 1
    assert isinstance(stmts[0], IncreaseAmount)
예제 #22
0
def test_process_row_binding_complex():
    test_row = _SignorRow_(ENTITYA='ATG5', TYPEA='protein', IDA='Q9H1Y0',
            DATABASEA='UNIPROT', ENTITYB='ATG12/5/16L1', TYPEB='complex',
            IDB='SIGNOR-C109', DATABASEB='SIGNOR', EFFECT='form complex',
            MECHANISM='binding', RESIDUE='', SEQUENCE='', TAX_ID='9606',
            CELL_DATA='', TISSUE_DATA='BTO:0000007', MODULATOR_COMPLEX='',
            TARGET_COMPLEX='', MODIFICATIONA='', MODASEQ='', MODIFICATIONB='',
            MODBSEQ='', PMID='18321988', DIRECT='YES', NOTES='',
            ANNOTATOR='lperfetto', SENTENCE='', SIGNOR_ID='SIGNOR-226693')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 1
    assert isinstance(stmts[0], Complex)
    assert len(stmts[0].agent_list()) == 2
예제 #23
0
def test_process_row_chem_inh():
    test_row_chem_inh = _SignorRow_(ENTITYA='722544-51-6', TYPEA='chemical',
        IDA='CID:16007391', DATABASEA='PUBCHEM', ENTITYB='AURKB',
        TYPEB='protein', IDB='Q96GD4', DATABASEB='UNIPROT',
        EFFECT='down-regulates', MECHANISM='chemical inhibition', RESIDUE='',
        SEQUENCE='', TAX_ID='9606', CELL_DATA='', TISSUE_DATA='',
        MODULATOR_COMPLEX='', TARGET_COMPLEX='', MODIFICATIONA='', MODASEQ='',
        MODIFICATIONB='', MODBSEQ='', PMID='Other', DIRECT='YES',
        NOTES='Selleck', ANNOTATOR='gcesareni', SENTENCE='',
        SIGNOR_ID='SIGNOR-190245')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row_chem_inh)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 1
    assert isinstance(stmts[0], Inhibition)
예제 #24
0
def test_process_row_binding_complex():
    test_row = SignorRow(ENTITYA='ATG5', TYPEA='protein', IDA='Q9H1Y0',
            DATABASEA='UNIPROT', ENTITYB='ATG12/5/16L1', TYPEB='complex',
            IDB='SIGNOR-C109', DATABASEB='SIGNOR', EFFECT='form complex',
            MECHANISM='binding', RESIDUE='', SEQUENCE='', TAX_ID='9606',
            CELL_DATA='', TISSUE_DATA='BTO:0000007', MODULATOR_COMPLEX='',
            TARGET_COMPLEX='', MODIFICATIONA='', MODASEQ='', MODIFICATIONB='',
            MODBSEQ='', PMID='18321988', DIRECT='YES', NOTES='',
            ANNOTATOR='lperfetto', SENTENCE='', SIGNOR_ID='SIGNOR-226693')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 1
    assert isinstance(stmts[0], Complex)
    assert len(stmts[0].agent_list()) == 2
예제 #25
0
def test_process_row_destab():
    test_row_destab = SignorRow(ENTITYA='INS', TYPEA='protein', IDA='P01308',
            DATABASEA='UNIPROT', ENTITYB='APOB', TYPEB='protein', IDB='P04114',
            DATABASEB='UNIPROT',
            EFFECT='down-regulates quantity by destabilization',
            MECHANISM='destabilization', RESIDUE='', SEQUENCE='',
            TAX_ID='9606', CELL_DATA='BTO:0000575', TISSUE_DATA='',
            MODULATOR_COMPLEX='', TARGET_COMPLEX='', MODIFICATIONA='',
            MODASEQ='', MODIFICATIONB='', MODBSEQ='', PMID='23721961',
            DIRECT='NO', NOTES='', ANNOTATOR='miannu',
            SENTENCE='', SIGNOR_ID='SIGNOR-252114')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row_destab)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 1
    assert isinstance(stmts[0], DecreaseAmount)
예제 #26
0
def test_process_row_destab():
    test_row_destab = _SignorRow_(ENTITYA='INS', TYPEA='protein', IDA='P01308',
            DATABASEA='UNIPROT', ENTITYB='APOB', TYPEB='protein', IDB='P04114',
            DATABASEB='UNIPROT',
            EFFECT='down-regulates quantity by destabilization',
            MECHANISM='destabilization', RESIDUE='', SEQUENCE='',
            TAX_ID='9606', CELL_DATA='BTO:0000575', TISSUE_DATA='',
            MODULATOR_COMPLEX='', TARGET_COMPLEX='', MODIFICATIONA='',
            MODASEQ='', MODIFICATIONB='', MODBSEQ='', PMID='23721961',
            DIRECT='NO', NOTES='', ANNOTATOR='miannu',
            SENTENCE='', SIGNOR_ID='SIGNOR-252114')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row_destab)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 1
    assert isinstance(stmts[0], DecreaseAmount)
예제 #27
0
def test_mod_unknown_effect():
    test_row = _SignorRow_(ENTITYA='JAK2', TYPEA='protein', IDA='O60674',
            DATABASEA='UNIPROT', ENTITYB='JAK2', TYPEB='protein', IDB='O60674',
            DATABASEB='UNIPROT', EFFECT='unknown', MECHANISM='phosphorylation',
            RESIDUE='Tyr1007', SEQUENCE='VLPQDKEyYKVKEPG', TAX_ID='-1',
            CELL_DATA='', TISSUE_DATA='', MODULATOR_COMPLEX='',
            TARGET_COMPLEX='', MODIFICATIONA='', MODASEQ='', MODIFICATIONB='',
            MODBSEQ='', PMID='9111318', DIRECT='YES', NOTES='', ANNOTATOR='',
            SENTENCE='', SIGNOR_ID='SIGNOR-251358')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 1
    assert isinstance(stmts[0], Phosphorylation)
    assert stmts[0].residue == 'Y'
    assert stmts[0].position == '1007'
예제 #28
0
def test_mod_unknown_effect():
    test_row = SignorRow(ENTITYA='JAK2', TYPEA='protein', IDA='O60674',
            DATABASEA='UNIPROT', ENTITYB='JAK2', TYPEB='protein', IDB='O60674',
            DATABASEB='UNIPROT', EFFECT='unknown', MECHANISM='phosphorylation',
            RESIDUE='Tyr1007', SEQUENCE='VLPQDKEyYKVKEPG', TAX_ID='-1',
            CELL_DATA='', TISSUE_DATA='', MODULATOR_COMPLEX='',
            TARGET_COMPLEX='', MODIFICATIONA='', MODASEQ='', MODIFICATIONB='',
            MODBSEQ='', PMID='9111318', DIRECT='YES', NOTES='', ANNOTATOR='',
            SENTENCE='', SIGNOR_ID='SIGNOR-251358')
    # Create an empty Signor processor
    sp = SignorProcessor([])
    stmts, no_mech = sp._process_row(test_row)
    assert not no_mech
    assert isinstance(stmts, list)
    assert len(stmts) == 1
    assert isinstance(stmts[0], Phosphorylation)
    assert stmts[0].residue == 'Y'
    assert stmts[0].position == '1007'