pymantra
Metabolic Reaction Analysis and Multi-Omics Associations from Untargeted Metabolomics
Science Score: 62.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
✓DOI references
Found 6 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
✓Institutional organization owner
Organization lipitum has institutional domain (lipitum.de) -
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.5%) to scientific vocabulary
Repository
Metabolic Reaction Analysis and Multi-Omics Associations from Untargeted Metabolomics
Basic Info
- Host: GitHub
- Owner: LipiTUM
- License: bsd-3-clause
- Language: C++
- Default Branch: main
- Homepage: https://pymantra.readthedocs.io
- Size: 624 KB
Statistics
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 4
Metadata Files
README.md
Metabolomics-centred graph-based multi-omics integration
mantra is a conceptual approach to compute estimates for the change of metabolic reaction activity between two groups of samples. It relies on linear relationships between substrate and product metabolites of a reaction and how the coefficients of these relationships change between conditions. In addition to analyzing metabolomics data, mantra also provides a correlation-based approach for multi-omics integration.
As an approach to provide smaller, mechanistically interpretable results based on both the reaction estimates (and multi-omics associations) and the metabolic network structure, network enrichment on the basis of a simulated-annealing assisted local search is used.
The pymantra package provides all functionalities for computing changes in
reaction activity, multi-omics associations and performing the network
enrichment as well as reporting and plotting their results. Additionally, it
contains utilities to perform metabolite ID mapping.
```mermaid flowchart LR
subgraph in[Required Input] met(Metabolome Data) end
subgraph opt[Optional Multi-Omics Data] direction LR subgraph opti[Input] direction LR org(Organism/Microbiome Data) cat(Genome/Transcriptome Data) end subgraph optc[Associations] associ[computemultiomicsassociations] end end
subgraph db["Databases (online and/or offline)"] neo4j[(neo4j Graph)] sql[(SQL ID maps)] end
namemap[NameMapper
Metabolite ID Mapping]
netgen[NetworkGenerator]
metnet(((Metabolic Network)))
estimates[Reaction Estimates] lso[Local Search Enrichment] res[Enrichment Results] reac[ ]
sql -.-> namemap met --> namemap --> netgen neo4j -.-> netgen
opti --> netgen --> metnet
metnet & opti & estimates --> optc metnet & met --- reac ----> estimates
estimates & optc --> lso --> res
style reac width:0px,height:0px ```
Manuscript
If you would like to learn more about the details of the methodology and see some real-world results please check out our manuscript.
Getting Started
To get started we recommend going through some code examples provided in pymantra's documentation and the installation guide below.
Installation
Using pip
The recommended installation is via pip.
It has pre-compiled wheels available for all major operating systems.
Generally using python version 3.10 or newer is recommended, but backwards compatability is ensured down to 3.8.
If you would like to run the experiments presented in the paper (code in the experiments folder), please use the second option to install the additional dependencies and mind the different version requirements (see README).
Additionally, dependencies required for package development and generation of sphinx documentation can be obtained.
```shell
install with package dependencies
pip install pymantra
for including the dependencies to run the paper experiments
pip install pymantra[experiments]
for including the development dependencies
pip install pymantra[dev]
for including the documentation dependencies
pip install pymantra[docs] ```
Installation from source
To install from source first clone the github repository including submodules
shell
git clone https://github.com/lipitum/pymantra.git --recursive
Additionally, you need to download required database files for name mapping from here
On macOS and Linux we recommend to use the following from within the pymantra directory
shell
pip install gdown
gdown --folder https://drive.google.com/drive/folders/1sWTHWRqzglWOjTMwNa_aqkKT__Y7Snmq?usp=sharing
mv package/chebi.db pymantra/namemapping/ChEBI/
mv package/hmdb.db pymantra/namemapping/HMDB/
mv package/mantra.db pymantra/namemapping/mantra_db/
mv package/reactome.db pymantra/namemapping/Reactome/
rm -r package
On Windows the syntax would change to (untested)
pip install gdown
gdown --folder https://drive.google.com/drive/folders/1sWTHWRqzglWOjTMwNa_aqkKT__Y7Snmq?usp=sharing
move package\chebi.db pymantra\namemapping\ChEBI\
move package\hmdb.db pymantra\namemapping\HMDB\
move package\mantra.db pymantra\namemapping\mantra_db\
move package\reactome.db pymantra\namemapping\Reactome\
rmdir /s /q package
Make sure you have a C++ compiler installed (recommended are gcc for Linux and OS X and Visual C++ for Windows). Please make sure the compiler matches the one, with which your python distribution was installed.
The only c++ dependency for compilation is
the boost library.
In case it is already installed on your system (with version >= 1.77) you can
also drop the --recursive flag in the git clone call. In addition to
installing boost from source you can also use conda.
In addition to boost, we use OpenMP for parallel processing. It is usually installed with your compiler, although macOS users might have to run additional installation steps. Windows has currently no support for new OpenMP standards. If it is not possible to compile with OpenMP, parallelized options will be unavailable in the python package, but all other functionalities are not affected.
On macOS installation can be done on different ways, e.g. through MacPorts or
homebrew (recommended - brew install libomp).
Once the c++ dependencies are installed, the package installation can be
invoked by calling pip install
shell
pip install .
To verify installation run the unit tests
shell
python -m pytest
Similar to the regular pip installation you can also install the optional
dependencies.
Database
Per default the setup script installs all code, but not the neo4j database. Instead, an online version of the database will be used. Since this is slower than having a local database, we provide two options to run the neo4j database locally.
Docker
We provide a docker script to run the neo4j database on your computer in a separate repository. Please follow the instructions there to run the container.
When calling the NetworkGenerator make sure your provide the correct URI
and the user and password given in your .env file int pymantra-db-api folder.
If you use the default setting this leads to
python
APINetworkGenerator("127.0.0.1:8084")
In this case only APINetworkGenerator.get_subgraph and
APINetworkGenerator.as_networkx are available instead of the whole
NewtorkGenerator function repertoire. Yet, for most use cases these functions
are all you need.
Manual Installation
If you want to generate the networks outside docker, you will have to install neo4j on your systems (community version is sufficient). For instructions see the installation page.
Having installed neo4j, download the mantra database dump from here and move the
[comment]: <> (TODO: finish the instruction)
The NetworkGenerator can now be initialized with
python
NetworkGenerator("bolt://127.0.0.1:7687", ("<user>", "<password>"))
Manuscript Experiments
All code used to generate the results presented in our manuscript is located in the examples folder. Please mind the higher version requirements indicated in the README when reproducing the experiments.
Citation
If you use pymantra for your own work, please cite our manuscript
bibtex
@article{koehler2023,
title = {Identification and Integration of Key-Metabolic Reactions from Untargeted Metabolomics Data},
author = {K\"ohler, Nikolai and W\"urf, Vivian and Rose, Tim D and Pauling, Josch K},
journal = {bioRxiv},
year = {2023},
publisher = {Cold Spring Harbor Laboratory},
doi = {https://doi.org/10.1101/2023.05.15.540613}
}
Owner
- Name: LipiTUM
- Login: LipiTUM
- Kind: organization
- Website: https://lipitum.de/
- Twitter: LipiTum
- Repositories: 7
- Profile: https://github.com/LipiTUM
Citation (CITATION.bib)
@article{koehler2023,
title = {Identification and Integration of Key-Metabolic Reactions from Untargeted Metabolomics Data},
author = {K\"ohler, Nikolai and W\"urf, Vivian and Rose, Tim D and Pauling, Josch K},
journal = {bioRxiv},
year = {2023},
publisher = {Cold Spring Harbor Laboratory},
doi = {https://doi.org/10.1101/2023.05.15.540613}
}
GitHub Events
Total
- Watch event: 1
- Push event: 1
Last Year
- Watch event: 1
- Push event: 1
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 0
- Total pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: 4 minutes
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- nklkhlr (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 242 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 4
- Total maintainers: 1
pypi.org: pymantra
Reaction-Centred Metabolic Network Analysis
- Documentation: https://pymantra.readthedocs.io
- License: AGPLv3
-
Latest release: 1.0.2
published over 2 years ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v3 composite
- actions/download-artifact v3 composite
- actions/setup-python v4 composite
- actions/upload-artifact v3 composite
- pypa/cibuildwheel v2.12.3 composite
- pypa/gh-action-pypi-publish v1.5.0 composite
- actions/checkout v3 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- codecov/codecov-action v3 composite
- Babel ==2.12.1
- Cython ==0.29.34
- Jinja2 ==3.1.2
- MarkupSafe ==2.1.2
- Pillow ==9.5.0
- PyYAML ==6.0
- Pygments ==2.15.1
- Sphinx ==6.2.1
- alabaster ==0.7.13
- beautifulsoup4 ==4.12.2
- certifi ==2022.12.7
- charset-normalizer ==3.1.0
- contourpy ==1.0.7
- cycler ==0.11.0
- docutils ==0.19
- fonttools ==4.39.3
- furo ==2023.3.27
- idna ==3.4
- imagesize ==1.4.1
- joblib ==1.2.0
- kiwisolver ==1.4.4
- latexcodec ==2.0.1
- lazy_loader ==0.2
- matplotlib ==3.7.1
- neo4j ==5.8.0
- networkx ==3.1
- numpy ==1.24.3
- outdated ==0.2.2
- packaging ==23.1
- pandas ==2.0.1
- pandas-flavor ==0.5.0
- patsy ==0.5.3
- pingouin ==0.5.3
- pybtex ==0.24.0
- pybtex-docutils ==1.0.2
- pyparsing ==3.0.9
- python-dateutil ==2.8.2
- pytz ==2023.3
- requests ==2.29.0
- scikit-learn ==1.2.2
- scipy ==1.10.1
- seaborn ==0.12.2
- six ==1.16.0
- snowballstemmer ==2.2.0
- soupsieve ==2.4.1
- sphinx-basic-ng ==1.0.0b1
- sphinx-copybutton ==0.5.2
- sphinxcontrib-applehelp ==1.0.4
- sphinxcontrib-bibtex ==2.5.0
- sphinxcontrib-devhelp ==1.0.2
- sphinxcontrib-htmlhelp ==2.0.1
- sphinxcontrib-jsmath ==1.0.1
- sphinxcontrib-mermaid ==0.8.1
- sphinxcontrib-qthelp ==1.0.3
- sphinxcontrib-serializinghtml ==1.1.5
- statsmodels ==0.13.5
- tabulate ==0.9.0
- threadpoolctl ==3.1.0
- tqdm ==4.65.0
- tzdata ==2023.3
- urllib3 ==1.26.15
- xarray ==2023.4.2
- matplotlib >=3.3.0
- neo4j >=4.4.0
- networkx >=2.8.0
- outdated *
- pandas >=1.4.3
- pandas-flavor *
- pingouin >=0.5.2
- scikit-learn >=1.0.2
- scipy >=1.8.0
- seaborn >=0.9.0
- seaborn *
- statsmodels >=0.13.5
- tqdm >=4.62.1