Tools for building Escher-compatible metabolic maps from KEGG and model annotations
Project description
BioEMMA
BioEMMA is an early-stage Python library for building Escher-compatible metabolic maps from KEGG pathway layouts and genome-scale metabolic models.
The current main workflow is:
- Parse a KEGG KGML/XML pathway with
KeggMap. - Convert KEGG compounds and reactions to BiGG/SEED identifiers using bundled MetaNetX-derived mapping tables.
- Build an Escher JSON map with
EscherMapper.
The project is currently in alpha. The public API may still change while the package structure is being prepared for PyPI.
Installation
For local development:
pip install -e .
Runtime dependencies can also be installed from:
pip install -r requirements.txt
Basic Usage
import cobra
from bioemma import KeggMap, EscherMapper
kegg_map = KeggMap()
with open("path/to/rn00010.xml", "r", encoding="utf-8") as file:
kegg_map.read_from_file(file)
metabolites = kegg_map.get_metabolites()
reactions = kegg_map.get_reactions()
model = cobra.io.read_sbml_model("path/to/model.xml")
mapper = EscherMapper(
metabolites=metabolites,
reactions=reactions,
database="BIGG",
)
escher_map = mapper.build_map(model)
escher_map is a Python object compatible with the Escher JSON map structure.
It can be serialized with json.dump.
Included Mapping Data
BioEMMA currently bundles two compact runtime mapping files:
metabolite_mapping.tsvreaction_mapping.tsv
These files are derived from MetaNetX cross-reference tables and are used to map KEGG identifiers to BiGG and SEED identifiers. The large raw MetaNetX download cache is not intended to be included in the Python package.
See NOTICE.md for third-party data attribution and usage notes.
License
BioEMMA's source code is distributed under the MIT License. Bundled mapping
data are derived from third-party database resources and may be subject to
their own license terms. See LICENSE and NOTICE.md.
Development Notes
The package code lives in:
src/bioemma/
The current core modules are:
bioemma.maps.KeggMapbioemma.mapper_base.EscherMapperbioemma.metanetx_mapper.MetaNetXMapperbioemma.merger.EscherMerger
The script for regenerating mapping tables is kept separately in:
scripts/prepare_db_mapping.py
Status
BioEMMA is not yet a stable release. Before publishing to PyPI, the package still needs packaging metadata, tests, and a final check of bundled data and license compatibility.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bioemma-0.1.1.tar.gz.
File metadata
- Download URL: bioemma-0.1.1.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8340758b00d4486abadf1c74fb4c3d308a208afcd004279fd3abeee2e6b1a0e
|
|
| MD5 |
107cc0cbbb2a8d3d13929e6114a1e24d
|
|
| BLAKE2b-256 |
91f80c2025b08477e71f6c089a661c9a59ad78d302473227b7832d436ab4500b
|
File details
Details for the file bioemma-0.1.1-py3-none-any.whl.
File metadata
- Download URL: bioemma-0.1.1-py3-none-any.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1a4828ca1328d44b55e2be1d2e92fc510ff2c6b7cebff3043b59aadb7250729
|
|
| MD5 |
2df9c6d81f31734d8a135936320a295e
|
|
| BLAKE2b-256 |
9bd8616c749dfc89ac5bd144ea2df6abf25620e98aa05c8a67deb8d60014e7d8
|