Esempio n. 1
0
def test_chebi():
    ch = ChEBI()
    ch.getCompleteEntity("CHEBI:10102")
    res = ch.conv("CHEBI:10102", "ChEMBL COMPOUND")
    assert res == ["521332"]
    try:
        res = ch.conv("CHEBI:10102", "wrong db")
        assert False
    except:
        assert True

    ch.getOntologyChildren("CHEBI:27732")
    ch.getOntologyParents("CHEBI:27732")
    ch.getUpdatedPolymer("CHEBI:27732")
Esempio n. 2
0
def test_chebi():
    ch = ChEBI()
    ch.getCompleteEntity("CHEBI:10102")
    res = ch.conv("CHEBI:10102", "ChEMBL COMPOUND")
    assert res == ["521332"]
    try:
        res = ch.conv("CHEBI:10102", "wrong db")
        assert False
    except:
        assert True

    ch.getOntologyChildren("CHEBI:27732")
    ch.getOntologyParents("CHEBI:27732")
    ch.getUpdatedPolymer("CHEBI:27732")
Esempio n. 3
0
def test_chebi():
    ch = ChEBI()
    ch.getCompleteEntity("CHEBI:10102")
    res = ch.conv("CHEBI:10102", "KEGG COMPOUND accession")
    assert res == ['C07484']

    try:
        res = ch.conv("CHEBI:10102", "wrong db")
        assert False
    except:
        assert True

    ch.getOntologyChildren("CHEBI:27732")
    ch.getOntologyParents("CHEBI:27732")
    ch.getUpdatedPolymer("CHEBI:27732")
Esempio n. 4
0
def test_chebi():
    ch = ChEBI()
    ch.getCompleteEntity("CHEBI:10102")
    res = ch.conv("CHEBI:10102", "KEGG COMPOUND accession")
    assert res == ['C07484']

    try:
        res = ch.conv("CHEBI:10102", "wrong db")
        assert False
    except:
        assert True

    ch.getOntologyChildren("CHEBI:27732")
    ch.getOntologyParents("CHEBI:27732")
    ch.getUpdatedPolymer("CHEBI:27732")