PyCoMo in Practice: Does Community Metabolic Modeling Actually Help Bioprocess Design?

July 2026 11 min read Bioprocess Engineering

Key Takeaways

Contents

  1. What Is PyCoMo?
  2. How PyCoMo Builds Community Models
  3. Getting Started: Installation and First Model
  4. Analysis Capabilities: FBA, FVA, and Cross-Feeding
  5. PyCoMo vs MICOM: Which Tool for Which Problem?
  6. Does Community Modeling Help Bioprocess Design?
  7. Limitations and When Not to Use It
  8. Frequently Asked Questions

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.

GEM 1 e.g. E. coli iML1515 2,719 reactions GEM 2 e.g. S. cerevisiae iMM904 1,226 reactions GEM n Any SBML/JSON/MAT model PyCoMo ID matching Compartmentalization Shared medium creation FBA Max growth rate at given abundance Composition Analysis Feasible abundances at given growth rate FVA Cross-Feeding All possible exchange metabolites
Figure 1. PyCoMo workflow. Individual genome-scale models are preprocessed, merged into a compartmentalized community model with a shared medium compartment, then analysed via FBA (growth rate prediction), composition analysis (feasible abundance profiles), and FVA (cross-feeding enumeration).
Diagram showing PyCoMo workflow: multiple individual genome-scale metabolic models feed into PyCoMo, which performs ID matching, compartmentalization, and shared medium creation. The resulting community model enables three types of analysis: FBA for maximum growth rate, composition analysis for feasible abundances, and FVA for cross-feeding metabolite enumeration.

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.

  1. Load models: Load GEMs for both organisms from BiGG or CarveMe reconstructions.
  2. Build community: CommunityModel(members=[t_reesei, s_cerevisiae]). PyCoMo creates a shared medium with cellulose as the sole carbon source.
  3. 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.
  4. 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.
  5. 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.

Table 1. PyCoMo computation benchmarks on AGORA models (16 GB RAM, single core)
PyCoMo computation time for community model construction and analysis
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.

Figure 2. PyCoMo computation time scaling with community size. Model construction and FBA scale linearly, while exchange metabolite calculation via FVA scales quadratically. Data from Predl et al. 2024, benchmarked on AGORA models with 16 GB RAM on a single core.

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.

Table 2. PyCoMo vs MICOM comparison for bioprocess applications
Feature comparison of PyCoMo and MICOM for community metabolic modeling
Feature PyCoMo MICOM
Primary use caseSynthetic co-culture designGut microbiome analysis
Model structureCompartmentalized, SBML-compliantPooled with cooperative tradeoff
Input dataAny GEMs (SBML/JSON/MAT/YAML)AGORA models + 16S abundance
Cross-feeding predictionFVA over full abundance spaceAt fixed abundance from 16S data
Model reusabilityStandard SBML, any COBRA toolSolver-coupled, MICOM-specific
VisualizationScyNet (Cytoscape app)Built-in plotting
Community size testedUp to 40 members (benchmarked)Up to 818 members (gut)
LicenseMITApache 2.0
PublicationPredl et al. 2024Diener 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:

Figure 3. Community metabolic modeling tool comparison across six dimensions relevant to bioprocess co-culture design. Scores are relative (1-5 scale) based on published benchmarks and documented capabilities. PyCoMo scores highest on model portability and cross-feeding detail; MICOM leads on community scale and built-in visualization.

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:

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.

Open Calculator

Media Estimator

Estimate media requirements for co-culture fermentations with shared carbon sources.

Open Calculator

Related Tools

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

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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

Resources & Further Reading