2.1.1.2.1.2. enkie.dbs.metanetx
Methods for accessing the MetaNetX namespace.
2.1.1.2.1.2.1. Module Contents
- class enkie.dbs.metanetx.Metanetx[source]
Singleton class for mapping metabolite and reaction identifiers using MetaNetX.
- property rxn_id_to_mnx_id: Dict[str, str][source]
Dictionary mapping from reaction identifiers to MetaNetX identifiers.
- property cmp_id_to_mnx_id: Dict[str, str][source]
Dictionary mapping from metabolite identifiers to MetaNetX identifiers.
- property name_to_mnx_compound_map: Dict[str, Set[str]][source]
A dictionary mapping from (lower case) compound names to metanetx compound identifiers.
- property mnx_id_to_mass: Dict[str, int][source]
Dictionary mapping from MetaNetX metabolite identifiers to masses.
- property mnx_id_to_formula_map: Dict[str, str][source]
Dictionary mapping from MetaNetX reaction identifiers to reaction formulas.
- static get_data_path() path.Path [source]
Get the path to the folder containing the cached mapping files.
- to_mnx_reaction(query_id: str, substrates: Set[str] = None, products: Set[str] = None, metabolite_format: MetaboliteFormat = MetaboliteFormat.IDENTIFIER, default: str = None) Tuple[str, bool] [source]
Map the given reaction identifier to a MetaNetX identifier, checking whether the mapping preserves directionality.
- Parameters:
query_id (str) – The query identifier, in the form <namespace>:<identifier>.
substrates (Set[str], optional) – The reaction substrates, by default None
products (Set[str], optional) – The reaction products, by default None
metabolite_format (MetaboliteFormat, optional) – Specifies the format of the substrate and products, by default MetaboliteFormat.IDENTIFIER
default (str, optional) – Value to return if no mapping is found, by default None
- Returns:
The MetaNetX identifier of the reaction, and a flag denoting whether the MetaNetX reaction is defined in the same direction as the input reaction.
- Return type:
- to_mnx_compound(query_id: str, default: str = None) Optional[str] [source]
Map the given compound identifier to a MetaNetX compound.
- is_forward(reaction_formula: Optional[str], substrate_ids: Set[str], product_ids: Set[str]) Optional[bool] [source]
Detects whether the reaction formula is defined in the forward direction with respect to the given substrates and products.
- Parameters:
- Returns:
True if the formula and the substrate/products show the same direction.
- Return type:
Optional[bool]