What Is PyCoMo?
PyCoMo is a free, MIT-licensed Python package that builds compartmentalized community metabolic models from individual genome-scale metabolic models (GEMs). Developed by the Zanghellini group at the University of Vienna, it was published in Bioinformatics in 2024 (Predl et al., doi:10.1093/bioinformatics/btae153).
The core problem PyCoMo solves is model construction. Building a community metabolic model by hand requires merging reaction networks, creating shared exchange compartments, converting boundary reactions, matching metabolite identifiers across databases, and handling the bilinear dependence of growth on species abundance. PyCoMo automates all of this, producing a standard SBML model that any COBRA tool can read.
PyCoMo accepts individual GEMs in any COBRApy-supported format (SBML, MATLAB, JSON, YAML) and generates a compartmentalized community model where each organism occupies its own compartment, connected through a shared medium compartment. This structure enables three types of prediction: maximum community growth rate at a given abundance profile, feasible community compositions at a given growth rate, and all possible exchange metabolites and cross-feeding interactions.
How PyCoMo Builds Community Models
PyCoMo uses a compartmentalized approach where each community member retains its own intracellular compartment. All boundary (exchange) reactions from individual models are converted into internal transport reactions that shuttle metabolites into a shared medium compartment. This architecture preserves the full flux detail of each organism while enabling inter-species metabolite exchange through the shared pool.
A key technical challenge is the bilinear dependence of community growth on species abundance. If both growth rate and abundance fraction are free variables, the resulting optimization problem is nonlinear. PyCoMo handles this by constraining one variable and optimizing the other: either fix the growth rate and find feasible abundance profiles, or fix the abundance profile and maximize the community growth rate.
Another design decision is how PyCoMo stores dynamic flux bounds. Since the SBML standard does not natively support bounds that depend on a variable (the abundance fraction), PyCoMo encodes them as stoichiometric coefficients on dummy metabolites. This encoding is lossless: the model can be saved as standard SBML, loaded by any COBRA tool, and the original bounds are reconstructed. This is a practical advantage over MICOM, whose cooperative tradeoff formulation is tightly coupled to its own solver and not easily portable.
Getting Started: Installation and First Model
PyCoMo installs from PyPI in a single command and requires Python 3.8 or later with COBRApy as its main dependency. The command-line interface handles the most common workflows without writing Python code, though the Python API offers full flexibility.
# Install PyCoMo from PyPI pip install pycomo # Python API: build a 2-member community model from pycomo import CommunityModel import cobra # Load individual GEMs ecoli = cobra.io.read_sbml_model("iML1515.xml") yeast = cobra.io.read_sbml_model("iMM904.xml") # Create community model community = CommunityModel( members=[ecoli, yeast], member_names=["ecoli", "yeast"] ) # Run FBA at equal abundance solution = community.optimize() print(f"Community growth rate: {solution.objective_value:.4f} h⁻¹")
The community model is a standard COBRApy Model object. You can inspect reactions, metabolites, and genes using the same interface you would for any single-organism GEM. The shared medium metabolites are identifiable by their compartment prefix.
Worked Example: Two-Member Consolidated Bioprocessing Community
Consider a consolidated bioprocessing (CBP) co-culture of T. reesei (cellulase producer) and S. cerevisiae (ethanol producer) growing on cellulose.
- Load models: Load GEMs for both organisms from BiGG or CarveMe reconstructions.
- Build community:
CommunityModel(members=[t_reesei, s_cerevisiae]). PyCoMo creates a shared medium with cellulose as the sole carbon source. - Run FBA: At equal abundance (50:50), the model predicts whether S. cerevisiae can grow on the glucose released by T. reesei's extracellular cellulases.
- FVA cross-feeding: FVA reveals that glucose, cellobiose, and amino acids are the primary exchange metabolites. If glucose exchange flux is zero across all feasible solutions, the co-culture is stoichiometrically infeasible under the given medium.
- Composition sweep: Fixing the growth rate at 0.05 h-1 and sweeping the T. reesei fraction from 0.1 to 0.9 reveals the range of feasible compositions. Typical CBP consortia operate at 60-80% cellulase producer by biomass.
Analysis Capabilities: FBA, FVA, and Cross-Feeding
PyCoMo's most powerful feature is its ability to enumerate all thermodynamically feasible cross-feeding interactions via flux variability analysis (FVA). Unlike a single FBA solution that shows one optimal exchange pattern, FVA explores the entire feasible flux space, revealing metabolites that could be exchanged under any feasible abundance profile. This is particularly valuable for bioprocess design because it identifies metabolic dependencies that are not obvious from looking at individual models.
| Community size | Model construction | FBA (equal abundance) | Exchange metabolite calculation (FVA) | Scaling |
|---|---|---|---|---|
| 2 members | ~15 s | ~5 s | ~10 s | - |
| 5 members | ~40 s | ~15 s | ~45 s | - |
| 10 members | ~1.5 min | ~30 s | ~3 min | - |
| 20 members | ~4.5 min | ~1 min | ~12 min | - |
| 40 members | ~11.3 min | ~2.3 min | ~31.5 min | - |
| Construction and FBA scale linearly; exchange metabolite calculation scales quadratically with community size. | ||||
The companion tool ScyNet (Predl et al. 2024, Bioinformatics Advances) is a Cytoscape app that visualizes the exchange metabolite network as an interaction graph. ScyNet reduces the full community model (potentially thousands of reactions) to a network of community members connected by their exchanged metabolites, with edge widths proportional to flux values from FBA or flux ranges from FVA.
PyCoMo vs MICOM: Which Tool for Which Problem?
PyCoMo and MICOM are the two leading Python packages for community metabolic modeling, but they were designed for different use cases. Understanding the distinction is essential for choosing the right tool for bioprocess co-culture design.
| Feature | PyCoMo | MICOM |
|---|---|---|
| Primary use case | Synthetic co-culture design | Gut microbiome analysis |
| Model structure | Compartmentalized, SBML-compliant | Pooled with cooperative tradeoff |
| Input data | Any GEMs (SBML/JSON/MAT/YAML) | AGORA models + 16S abundance |
| Cross-feeding prediction | FVA over full abundance space | At fixed abundance from 16S data |
| Model reusability | Standard SBML, any COBRA tool | Solver-coupled, MICOM-specific |
| Visualization | ScyNet (Cytoscape app) | Built-in plotting |
| Community size tested | Up to 40 members (benchmarked) | Up to 818 members (gut) |
| License | MIT | Apache 2.0 |
| Publication | Predl et al. 2024 | Diener et al. 2020 |
For bioprocess co-culture design, PyCoMo's compartmentalized approach is generally more suitable. It preserves member-level flux detail (you can inspect every reaction in each organism), produces portable SBML models, and its FVA-based cross-feeding analysis explores all feasible exchange patterns rather than a single optimum. MICOM excels at microbiome-scale problems where you have 16S abundance data and want to predict community-level metabolism.
A third option, SteadyCom (Chan et al. 2017), predicts steady-state community compositions but does not generate reusable community models. It is implemented within the COBRA Toolbox (MATLAB) rather than Python.
Does Community Modeling Help Bioprocess Design?
Community metabolic modeling is most useful as a screening and hypothesis-generation tool. It answers the question "can these organisms exchange the metabolites needed for the co-culture to work?" before you invest weeks in experimental validation. It does not tell you whether the co-culture will be stable, productive, or scalable.
Practical bioprocess applications where community metabolic modeling adds value include:
- Consolidated bioprocessing (CBP): Predicting whether a cellulase producer can supply enough glucose to support an ethanol producer at industrially relevant growth rates. Roell et al. (2019) demonstrated that constraint-based models correctly predicted cross-feeding dependencies in a T. reesei / S. cerevisiae / S. stipitis consortium that achieved 67% of theoretical ethanol yield from wheat straw.
- Auxotrophic cross-feeding design: Identifying which amino acid or vitamin auxotrophies create stable mutual dependencies. FVA can confirm that a proposed cross-feeding pair is thermodynamically feasible before you engineer the knockouts.
- Anaerobic digestion: Mapping syntrophic interactions between acidogens, acetogens, and methanogens in large-scale (>10,000 m3) biogas communities, where four trophic guilds must exchange hydrogen, acetate, and formate.
- Waste stream valorization: Screening co-culture candidates for converting complex substrates (e.g., lignocellulose hydrolysates, food waste) into value-added products through division of metabolic labour.
Limitations and When Not to Use It
Community metabolic modeling has fundamental limitations that bioprocess engineers must understand. Constraint-based models (FBA/FVA) assume steady state, meaning they cannot predict dynamic population shifts, lag phases, or transient metabolite accumulation. If your co-culture question involves timing ("when does the second organism start growing?") or stability ("will the ratio stay at 60:40?"), you need kinetic models or experimental population dynamics data.
Specific limitations to keep in mind:
- No kinetics: FBA maximizes flux at steady state. It cannot predict growth curves, substrate depletion profiles, or how long a co-culture takes to reach equilibrium.
- No spatial effects: The model assumes a well-mixed compartment. Biofilm structure, cell-cell proximity effects, and spatial metabolite gradients in large-scale bioreactors are not captured.
- No regulation: Gene regulation, quorum sensing, and stress responses are absent. A co-culture predicted as feasible may fail in practice because one organism downregulates its transporters under the actual conditions.
- GEM quality dependence: The community model is only as good as the individual GEMs. Poorly curated models with missing exchange reactions or incorrect growth-associated maintenance will produce misleading community predictions.
- Quadratic FVA scaling: Exchange metabolite calculation scales quadratically with community size (Table 1). For communities larger than 20 members, computation times become significant (>12 minutes on a single core).
The bottom line: use PyCoMo to screen candidates and generate hypotheses, then validate experimentally. Do not use it to replace shake-flask co-culture experiments.
E. coli Expression Optimizer
Optimize expression parameters for your E. coli strains before building community models.
Media Estimator
Estimate media requirements for co-culture fermentations with shared carbon sources.
Related Tools
- Fed-Batch Calculator — Design feeding strategies for co-culture fed-batch processes where metabolite supply must match consumption rates.
- Fermentation Economics Calculator — Model the cost implications of co-culture vs monoculture production at different scales.
- OTR/kLa Estimator — Estimate oxygen transfer requirements when co-culture partners have different oxygen demands.
Frequently Asked Questions
What is PyCoMo and what does it do?
PyCoMo is a free, MIT-licensed Python package for building and analysing compartmentalized community metabolic models from individual genome-scale models. It predicts maximum community growth rate, feasible abundance profiles, and all possible cross-feeding interactions between community members using flux balance analysis and flux variability analysis.
How does PyCoMo differ from MICOM?
MICOM was designed for gut microbiome analysis with 16S abundance data and uses a cooperative tradeoff objective. PyCoMo focuses on compartmentalized model construction from any GEMs, produces SBML-compliant models reusable by any COBRA tool, and uses FVA to enumerate all possible exchange metabolites. For bioprocess co-culture design, PyCoMo's compartmentalized approach is generally more suitable because it preserves member-level flux detail.
Can PyCoMo handle large microbial communities?
Yes. PyCoMo benchmarks show that a 10-member community using genome-scale AGORA models takes approximately 1-2 minutes for model construction, 30 seconds for FBA, and 3 minutes for exchange metabolite calculation. A 40-member community takes approximately 11 minutes for construction and 32 minutes for exchange calculation. Construction and FBA scale linearly with community size; exchange calculation scales quadratically.
What inputs does PyCoMo require?
PyCoMo accepts individual genome-scale metabolic models in any format supported by COBRApy: SBML (.xml), MATLAB (.mat), JSON, or YAML. You also specify the shared medium composition. PyCoMo automatically handles ID matching, boundary reaction conversion, and compartment creation.
Is community metabolic modeling useful for bioprocess co-culture design?
Community metabolic modeling can predict cross-feeding interactions, identify essential exchange metabolites, and evaluate whether a proposed co-culture is stoichiometrically feasible before running experiments. However, it does not capture kinetic dynamics, population stability, or spatial heterogeneity. It is most useful as a screening tool to narrow down co-culture candidates and identify metabolic dependencies before experimental validation.
References
- Predl M., Mießkes M., Rattei T., Zanghellini J. (2024). PyCoMo: a python package for community metabolic model creation and analysis. Bioinformatics, 40(4), btae153. doi:10.1093/bioinformatics/btae153
- Diener C., Gibbons S.M., Resendis-Antonio O. (2020). MICOM: Metagenome-Scale Modeling To Infer Metabolic Interactions in the Gut Microbiota. mSystems, 5(1), e00606-19. doi:10.1128/msystems.00606-19
- Chan S.H.J., Simons M.N., Maranas C.D. (2017). SteadyCom: Predicting microbial abundances while ensuring community stability. PLOS Computational Biology, 13(5), e1005539. doi:10.1371/journal.pcbi.1005539
- Roell G.W., Zha J., Carr R.R., Kishi M.A., Gerber S.A., Tang Y.J. (2019). Engineering microbial consortia by division of labor. Microbial Cell Factories, 18, 35. doi:10.1186/s12934-019-1083-3
- Predl M., Gandolf K., Hofer M., Rattei T. (2024). ScyNet: Visualizing interactions in community metabolic models. Bioinformatics Advances, 4(1), vbae104. doi:10.1093/bioadv/vbae104