compounds
Data structures for storing all compounds from the Neo4j graph.
CompoundMap(db)
Source code in algo/compounds.py
compound_exact_match(query)
Finds biocyc IDs corresponding to the query.
Source code in algo/compounds.py
get_all_compounds()
See the BioCyc concepts guide for detailed descriptions.
Returns:
| Type | Description |
|---|---|
tuple[pd.DataFrame, pd.DataFrame]
|
A tuple of two |
Source code in algo/compounds.py
search_compound_biocyc_id(query, **kwargs)
Query for the compound BioCyc ID.
If the query doesn't have an exact full match, performs a fuzzy match and returns the top hits.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query |
str
|
anything that resembles a BioCyc compound ID. |
required |
**kwargs |
passed to difflib.get_close_matches. |
{}
|
Returns:
| Type | Description |
|---|---|
dict[str, Union[str, list[str], bool]]
|
The compound biocyc ID if it exists. |
Source code in algo/compounds.py
search_compound_compartment(query)
Given a biocyc ID, return compartments it is in.
search_compound_metaid_in_compartment(query, compartment='cytosol')
Find the first compound ID in a given compartment.