BIOLOGICAL_ROLE_ID = '24432' APPLICATION_ROLE_ID = '33232' BIOCHEMICAL_ROLE_CHEBI_ID = '52206' PATHWAY_INHIBITOR_CHEBI_ID = '76932' ENZYME_INHIBITOR_CHEBI_ID = '23924' AGONIST_CHEBI_ID = '48705' INVERSE_AGONIST_CHEBI_ID = '90847' INHIBITOR_CHEBI_ID = '35222' ANTAGONIST_CHEBI_ID = '48706' BLACKLIST = [ '48001', # protein synthesis inhibitor '64106', # protein kinase agonist ] chebi_obo = pyobo.get('chebi') chebi_id_to_name = pyobo.get_id_name_mapping('chebi') XREFS_DF = get_xrefs_df() CURATED_ROLE_CHEBI_IDS = { source_id[len('CHEBI:'):] for source_db, source_id in XREFS_DF[['source_db', 'source_id']].values if source_db == 'chebi' } IRRELEVANT_ROLE_CHEBI_IDS = set( itt.chain.from_iterable( chebi_obo.descendants(chebi_id[len('CHEBI'):]) for chebi_id in get_irrelevant_roles_df().identifier if chebi_id[len('CHEBI'):] in chebi_obo.hierarchy))
def setUp(self) -> None: """Set up the test with the mock ChEBI OBO file.""" with chebi_patch: self.obo = get('chebi')
def setUp(self) -> None: """Set up the test with the mock ChEBI OBO file.""" # TODO use mock self.obo = get('chebi', url=TEST_CHEBI_OBO_PATH, local=True)
def test_get_obo(self): """Test getting an OBO document.""" obo = get('chebi', url=TEST_CHEBI_OBO_PATH, local=True) terms = list(obo) self.assertEqual(18, len(terms))