acore.io.kegg module#
- link_kegg_batch(target_db: str, gene_ids: Iterable[str]) str[source]#
Fetch from KEGG in batches informations.
- fetch_kegg_ko_descriptions(ko_terms: Iterable[str], timeout: float = 30.0) DataFrame[source]#
Fetch common descriptions for KEGG KO terms.
- Parameters:
- Returns:
A DataFrame with columns
ko_term,symbolandcommon_description.- Return type:
pd.DataFrame
Notes
The KEGG API accepts up to 10 entry identifiers per request. This helper batches larger inputs automatically.
- cid_to_kegg_id(pubchem_cid: int) str | None[source]#
Convert a single PubChem CID to a KEGG compound ID via KEGG conv API.
- parse_compound_pathway_mapping(raw_mapping: str) dict[str, list[str]][source]#
Parse tab-delimited KEGG-style compound/pathway mappings into a dictionary.
- parse_kegg_name_description(raw_text: str) dict[str, dict[str, str]][source]#
Parse KEGG pathway entries into ENTRY -> {NAME, DESCRIPTION}.
- lookup_cid_to_kegg_id(pubchem_cid: Iterable[int]) Series | None[source]#
Look up KEGG IDs for a list of PubChem CIDs using a pre-downloaded mapping file.
- Parameters:
pubchem_cid (Iterable[int]) – A list of PubChem CIDs to look up.
- Returns:
A Series mapping PubChem CIDs to KEGG IDs, or None if no matches are found.
- Return type:
pd.Series | None