Package: pymgpipe
pymgpipe|Coverage ReportFileStmtsMissCoverMissingpymgpipecoupling.py39685%20,43,46–47,52,67diet.py1031982%16,22,396–397,437–453,466–477,482–485,494,496,525fva.py1445959%32,36,88–92,98,107–113,116–117,120–121,139–149,165,174–235,244io.py1063765%17,55,61–66,80–81,95–96,108,111,117–120,125–133,142,146–147,152–157,161–167,176–177main.py1484470%112,115,167,210–212,243–297,304,309–310,323metrics.py242112%5–35modeling.py145795%36,39,54–57,129,131nmpc.py64592%95,132–134,136utils.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–367pymgpipe/teststest_e2e.py90199%197TOTAL130930677%API Docshttps://korem-lab.github.io/pymgpipe/Installationpympgipehas been built and tested with python 3.10+. To install and use our PyPi package, runpip install pymgpipeAdditional DependenciesNeed at least one of the following solvers (requirements.txt includesgurobi)-cplexgurobipyIn order to install the solver interfaces in python, you can usepip install cplexorpip 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.InputsTo create multi-species community models withpymgpipe, you need two things to start-Folder with individual taxa models (either in.mator.xmlformat)Relative abundance matrix (as a.csv) with samples ascolumnsand taxa asrows. Taxa names should correspond to file names within taxa folder (excluding extension)Examples of both can be found in theexamples/folder. Individual models for thousands of bacteria can be found and downloadedhere.OutputsThe exact location and names of output files will vary depending on the parameters you pass into each function. However, the default output for pymgpipe'sbuild_modelsfunction will look something like this-* pymgpipe input*
.
├── taxaModels/
│   ├── taxa1.xml
│   ├── taxa2.xml
│   └── ...
├── abundances.csv

# pymgpipe output*
.
├── out/
    ├── reaction_content.csv
    ├── reaction_abundance.csv
    ├── sample_label_conversion.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-FileTypeDescriptionreaction_contentCSVMatrix showing binary presence/absence of all reactions within each samplereaction_abundanceCSVMatrix showing scaled abundance (between 0 and 1) of all reactions within each samplesample_label_conversionCSVDictionary with conversion between original sample names and model names (defaultsample_prefixis 'mc')metabolic_diversityPNGPlot depicting # of unique reactions & taxa present within each sampleproblemsdirDirectory containing LP problems (default format is .mps, withcompressedset to True)modelsdirDirectory containing COBRA moddels (default format is .xml, withcompressedset to True)ExamplesClone and run throughworkflow.ipynbin theexamples/folder (see below)AttributionWhen using pymgpipe please cite-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/bty941ContributingWe 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:Fork the repo and create your branch from the master.If you've added code, add tests.Ensure the test suite passes.Issue that pull request!Reporting IssuesIssues should be reported using theGitHub 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 versionDetails of the problem, including any error messages and screenshots if possibleThank you for your contributions!Copyright 2023 The Trustees of Columbia University in the City of New York. SeeLICENSEfor additional details.