7.1.2.8. pta.metabolite_interpreter
Parsing and identification of metabolites.
7.1.2.8.1. Module Contents
- class pta.metabolite_interpreter.CompartmentConvention[source]
Bases:
enum.EnumThe convention used to define the compartment of a metabolite.
- class pta.metabolite_interpreter.Namespace[source]
Bases:
enum.EnumThe namespace in which metabolite identifiers are defined.
- class pta.metabolite_interpreter.MetaboliteInterpreter(compartment_convention: CompartmentConvention = CompartmentConvention.UNDERSCORE, namespace: Namespace = Namespace.BIGG)[source]
An interpreter used to transform metabolite IDs to compound identifiers that can be understood by eQuilibrator and compartment identifiers. Note: this class could/should partially replaced by cobrapy’s functionalities if/when this feature is implemented: https://github.com/opencobra/cobrapy/issues/967
- Parameters
compartment_convention (CompartmentConvention, optional) – Naming convention used to specify metabolite and compartment identifiers, by default CompartmentConvention.UNDERSCORE.
namespace (Namespace, optional) – Namespace in which the metabolite identifiers are defined, by default Namespace.BIGG.
- read(self, metabolite_id: str) pta.metabolite.Metabolite[source]
Parses a metabolite from a string, reading its identifier and compartment.
- Parameters
metabolite_name (str) – The identifier of a metabolite.
- Returns
Object describing the parsed metabolite. Note that only the identifier and compartment are set, the remaining fields (such as the charge) have to be specified manually.
- Return type
- Raises
Exception – If the naming convention or namespace of the metabolite are not supported.
- property compartment_convention(self) CompartmentConvention[source]
Gets the convention used to specify compartments.