cobrapy

Analyze and simulate metabolic models with flux balance analysis using COBRApy.

Updated May 17, 2026
One-click install
npx skills add https://github.com/galeep/plugin-place --skill cobrapy-galeep
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cobrapy
Source: https://github.com/galeep/plugin-place/tree/main/plugins/sci-materials-chemistry/skills/cobrapy
Command: npx skills add https://github.com/galeep/plugin-place --skill cobrapy-galeep

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires cobra, optlang, glpk, cplex, gurobi, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenges in systems biology and metabolic engineering by enabling the construction and analysis of metabolic models using COBRApy.

Core Features & Use Cases

  • Model Management: Load, save, and manage models in various formats, including SBML, JSON, and YAML.
  • Flux Analysis: Perform flux balance analysis (FBA), flux variability analysis (FVA), and other computational tasks.
  • Use Case: Use this Skill to run FBA and FVA on a metabolic model to analyze the effect of genetic changes on metabolic fluxes.

Quick Start

To get started with COBRApy, install it using the command: uv pip install cobra==0.31.1. Then, load a model with model = load_model("path/to/model") and perform an FBA with solution = model.optimize().

Frequently Asked Questions about cobrapy

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

FAQPage Schema
How do I perform flux balance analysis on a metabolic model?

Perform flux balance analysis (FBA) by loading a metabolic model and executing the optimize method to calculate optimal metabolic fluxes. This Skill automates the FBA simulation process using COBRApy for systems biology workflows.

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

Flux variability analysis (FVA) determines the range of possible flux values for each reaction in a metabolic model while maintaining optimal growth. Use FVA when analyzing genetic changes and identifying alternative metabolic pathways in constraint-based models.

Can I load and save metabolic models in SBML, JSON, and YAML formats?

Yes, metabolic models can be loaded, saved, and managed in SBML, JSON, and YAML formats. This Skill handles model management across these standard file formats for constraint-based metabolic modeling workflows.

Do I need GLPK to run COBRApy or can I use CPLEX and Gurobi solvers?

GLPK is required by default, but you can use alternative linear programming solvers like CPLEX or Gurobi. This Skill supports these solver dependencies to perform constraint-based metabolic model optimization and analysis.

How do I fill gaps in a metabolic model using COBRApy?

Model gapfilling identifies and adds missing metabolic reactions to incomplete models using COBRApy. This Skill performs gapfilling to complete metabolic networks, allowing successful flux balance analysis and simulation of biological systems.

What is the best way to analyze the effect of genetic changes on metabolic fluxes?

The best way to analyze genetic changes on metabolic fluxes is running FBA and FVA on metabolic models. This Skill uses constraint-based approaches to simulate genetic perturbations and evaluate their impact on biological pathways.

Related Skills