cobrapy

Optimize fluxes in genome-scale metabolic models with COBRApy.

Updated May 24, 2026
One-click install
npx skills add https://github.com/Estrella-231/Mathematical_modeling_tongmeng --skill cobrapy-estrella-231
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cobrapy
Source: https://github.com/Estrella-231/Mathematical_modeling_tongmeng/tree/main/.agents/skills/cobrapy
Command: npx skills add https://github.com/Estrella-231/Mathematical_modeling_tongmeng --skill cobrapy-estrella-231

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

COBRApy helps you model and simulate cellular metabolism by translating a metabolic network into solvable constraint-based optimization problems, so you can predict phenotypes like growth, production, and flux ranges.

Core Features & Use Cases

  • Model I/O (SBML/JSON/YAML): Load and export genome-scale metabolic models to reuse established reconstructions or share results.
  • FBA & pFBA-style optimization: Compute optimal objective fluxes (e.g., biomass growth, ATP maintenance, product formation) under reaction bounds and media constraints.
  • FVA, knockouts, sampling, and production envelopes: Quantify uncertainty/ranges (FVA), test gene/reaction deletions (single/double), explore feasible flux space (sampling), and map achievable trade-offs (production envelopes).
  • Use case: You want to evaluate how a gene knockout affects growth and acetate production in a metabolic model, then compare flux variability and explore alternative feasible flux solutions.

Quick Start

Use the cobrapy skill to compute an FBA solution for the loaded model and then run flux variability analysis at 90% of the optimal objective.

Frequently Asked Questions about cobrapy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I predict cellular growth rates using constraint-based modeling on a metabolic network?

Constraint-based modeling predicts cellular phenotypes by optimizing metabolic fluxes under stoichiometric constraints. You can calculate maximum growth rates by performing Flux Balance Analysis (FBA) on genome-scale metabolic models using reaction bounds and media constraints.

Can I analyze how a gene knockout affects metabolic flux and product formation?

Yes, you can simulate gene and reaction knockouts to evaluate their effect on cellular metabolism. The analysis computes resulting optimal objective fluxes, allowing you to compare growth rates and product formation against the wild-type metabolic model.

What is flux variability analysis and when do I need it for my metabolic model?

Flux Variability Analysis (FVA) quantifies the range of possible fluxes for each reaction while maintaining a optimal objective threshold. You need it to quantify uncertainty and explore alternative feasible flux solutions within the metabolic network's feasible space.

Does this approach support importing genome-scale metabolic models in SBML, JSON, or YAML formats?

Yes, the analysis supports model I/O across SBML, JSON, and YAML formats. This allows you to load established genome-scale metabolic network reconstructions for simulation and export the optimized results for sharing.

How do I map achievable trade-offs between biomass growth and product secretion?

You map achievable trade-offs by computing production envelopes. This analysis evaluates optimal fluxes across varying secretion rates to identify feasible production boundaries within the metabolic network's stoichiometric constraints.

What are the limitations of flux sampling for exploring a metabolic network's feasible space?

Flux sampling explores the feasible space of a metabolic network but relies on solver-backed feasibility checks and defined stoichiometric constraints. It requires properly bounded genome-scale models to avoid infeasible spaces and ensure biologically meaningful flux distributions.