pymgpipe

pymgpipe: microbiome metabolic modeling in Python - Published in JOSS (2023)

https://github.com/korem-lab/pymgpipe

Science Score: 95.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org, zenodo.org
  • Committers with academic emails
    1 of 8 committers (12.5%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

cobra flux-balance-analysis metabolic-models metabolic-reconstruction mgpipe microbiome microbiome-modeling-toolbox modeling systems-biology

Scientific Fields

Mathematics Computer Science - 41% confidence
Last synced: 6 months ago · JSON representation

Repository

Python implementation of mgpipe

Basic Info
Statistics
  • Stars: 7
  • Watchers: 2
  • Forks: 0
  • Open Issues: 1
  • Releases: 29
Topics
cobra flux-balance-analysis metabolic-models metabolic-reconstruction mgpipe microbiome microbiome-modeling-toolbox modeling systems-biology
Created over 3 years ago · Last pushed over 2 years ago
Metadata Files
Readme License

README.md

pymgpipe | DOI status Python package Tests Docs PyPI version

Coverage

Coverage Report
FileStmtsMissCoverMissing
pymgpipe
   coupling.py39685%20, 43, 46–47, 52, 67
   diet.py1031982%16, 22, 396–397, 437–453, 466–477, 482–485, 494, 496, 525
   fva.py1445959%32, 36, 88–92, 98, 107–113, 116–117, 120–121, 139–149, 165, 174–235, 244
   io.py1063765%17, 55, 61–66, 80–81, 95–96, 108, 111, 117–120, 125–133, 142, 146–147, 152–157, 161–167, 176–177
   main.py1484470%112, 115, 167, 210–212, 243–297, 304, 309–310, 323
   metrics.py242112%5–35
   modeling.py145795%36, 39, 54–57, 129, 131
   nmpc.py64592%95, 132–134, 136
   utils.py23510754%45–46, 49, 52, 67, 73, 83, 87, 102–105, 111, 115–117, 120–138, 142–152, 160, 173–174, 176–177, 199–200, 205–207, 245–248, 250–264, 270, 281–286, 289–293, 313–314, 325–367
pymgpipe/tests
   teste2e.py90199%<a href="https://github.com/korem-lab/pymgpipe/blob/main/pymgpipe/tests/teste2e.py#L197">197
TOTAL130930677% 
<!-- Pytest Coverage Comment:End -->

API Docs

https://korem-lab.github.io/pymgpipe/

Installation

pympgipe has been built and tested with python 3.10+. To install and use our PyPi package, run pip install pymgpipe

Additional Dependencies

Need at least one of the following solvers (requirements.txt includes gurobi)-

In order to install the solver interfaces in python, you can use pip install cplex or pip install gurobipy. This does not actually create a license, it just installs the python interface to interact with these solvers. Both gurobipy and cplex offer free academic licenses. To install the licenses themselves, refer to the links provided above.

Inputs

To create multi-species community models with pymgpipe, you need two things to start-

  • Folder with individual taxa models (either in .mat or .xml format)
  • Relative abundance matrix (as a .csv) with samples as columns and taxa as rows. Taxa names should correspond to file names within taxa folder (excluding extension)

Examples of both can be found in the examples/ folder. Individual models for thousands of bacteria can be found and downloaded here.

Outputs

The exact location and names of output files will vary depending on the parameters you pass into each function. However, the default output for pymgpipe's build_models function will look something like this-

```

  • pymgpipe input* . ├── taxaModels/ │ ├── taxa1.xml │ ├── taxa2.xml │ └── ... ├── abundances.csv

pymgpipe output*

. ├── out/ ├── reactioncontent.csv ├── reactionabundance.csv ├── samplelabelconversion.csv ├── metabolic_diversity.png ├── problems/ │ ├── mc1.mps.gz │ ├── mc2.mps.gz │ └── ... └── models/ ├── mc1.xml.gz ├── mc2.xml.gz └── ... ```

Here is a breakdown of each output files/directory and their descriptions-

| File | Type | Description |
|---|---|---| | reactioncontent | CSV | Matrix showing binary presence/absence of all reactions within each sample | | reactionabundance | CSV | Matrix showing scaled abundance (between 0 and 1) of all reactions within each sample |
| samplelabelconversion | CSV | Dictionary with conversion between original sample names and model names (default sample_prefix is 'mc') | | metabolic_diversity | PNG | Plot depicting # of unique reactions & taxa present within each sample | | problems | dir | Directory containing LP problems (default format is .mps, with compressed set to True) |
| models | dir | Directory containing COBRA moddels (default format is .xml, with compressed set to True) |

Examples

Clone and run through workflow.ipynb in the examples/ folder (see below)

Attribution

When using pymgpipe please cite-

Meydan et al., (2023). pymgpipe: microbiome metabolic modeling in Python. Journal of Open Source Software, 8(88), 5545, https://doi.org/10.21105/joss.05545

Baldini, F., Heinken, A., Heirendt, L., Magnusdottir, S., Fleming, R. M. T., & Thiele, I. (2019). The Microbiome Modeling Toolbox: from microbial interactions to personalized microbial communities. Bioinformatics (Oxford, England), 35(13), 2332–2334. https://doi.org/10.1093/bioinformatics/bty941

Contributing

We warmly welcome and appreciate contributions from everyone. There are several ways you can contribute:

  • Reporting Bugs: If you find a bug, please create a new issue on our GitHub page. Be sure to include as much information as possible so we can reproduce and fix the bug. The more detail you provide, the better.
  • Code Contributions: If you'd like to contribute code, great! Please fork this repository, make your changes in a separate branch, and then submit a pull request. We'll review your changes and discuss any necessary modifications or improvements before merging.

Here are some general guidelines for code contributions:

  1. Fork the repo and create your branch from the master.
  2. If you've added code, add tests.
  3. Ensure the test suite passes.
  4. Issue that pull request!

Reporting Issues

Issues should be reported using the GitHub issue tracker. Please check the existing issues to avoid duplicates. When reporting an issue, please provide as much detail as possible about how to reproduce the problem, including the following information:

  • Operating system and version
  • Details of the problem, including any error messages and screenshots if possible

Thank you for your contributions!

Copyright 2023 The Trustees of Columbia University in the City of New York. See LICENSE for additional details.

Owner

  • Name: korem-lab
  • Login: korem-lab
  • Kind: organization

JOSS Publication

pymgpipe: microbiome metabolic modeling in Python
Published
August 02, 2023
Volume 8, Issue 88, Page 5545
Authors
Yoli Meydan ORCID
Program for Mathematical Genomics, Department of Systems Biology, Columbia University Irving Medical Center, New York, NY, United States of America.
Federico Baldini ORCID
Program for Mathematical Genomics, Department of Systems Biology, Columbia University Irving Medical Center, New York, NY, United States of America.
Tal Korem ORCID
Program for Mathematical Genomics, Department of Systems Biology, Columbia University Irving Medical Center, New York, NY, United States of America., Department of Obstetrics and Gynecology, Columbia University Irving Medical Center, New York, NY, United States of America.
Editor
Frederick Boehm ORCID
Tags
metabolic modeling flux balance analysis microbial communities microbiome

GitHub Events

Total
Last Year

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 450
  • Total Committers: 8
  • Avg Commits per committer: 56.25
  • Development Distribution Score (DDS): 0.144
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Yoli Meydan y****7@c****u 385
github-actions[bot] g****] 25
Yoli Meydan % Korem y****7@l****c 15
Yoli Meydan % Korem y****7@l****c 11
Yoli Meydan % Korem y****7@l****c 6
Yoli Meydan % Korem y****7@l****c 5
Tal Korem 4****m 2
Yoli y****1@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 3
  • Total pull requests: 4
  • Average time to close issues: 1 day
  • Average time to close pull requests: less than a minute
  • Total issue authors: 3
  • Total pull request authors: 1
  • Average comments per issue: 2.33
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • 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
  • ammaraziz (1)
  • cdiener (1)
  • cumbof (1)
Pull Request Authors
  • ym2877 (4)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 15 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 5
  • Total maintainers: 1
pypi.org: pymgpipe

Community level microbiome metabolic modeling in Python

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 15 Last month
Rankings
Dependent packages count: 7.5%
Downloads: 9.7%
Stargazers count: 28.1%
Average: 29.0%
Forks count: 30.2%
Dependent repos count: 69.7%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/docs.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
  • peaceiris/actions-gh-pages v3 composite
.github/workflows/python-package.yml actions
  • MishaKav/pytest-coverage-comment main composite
  • actions-js/push master composite
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
  • rymndhng/release-on-push-action master composite
.github/workflows/tests.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
requirements.txt pypi
  • cobra ==0.26.3
  • flake8 *
  • gurobipy ==9.5.2
  • matplotlib ==3.7.1
  • numpy ==1.23.5
  • optlang ==1.6.1
  • pandas ==1.5.3
  • pytest *
  • pytest-cov *
  • pytest_check *
  • scikit_bio ==0.5.8
  • scipy ==1.10.1
  • seaborn ==0.12.2
  • setuptools ==67.7.2
  • sympy ==1.11.1
  • tqdm ==4.65.0
setup.py pypi
  • cobra *
  • optlang *
  • tqdm *