← ClaudeAtlas

cobrapylisted

Constraint-based metabolic modeling (COBRA). FBA, FVA, gene knockouts, flux sampling, SBML models, for systems biology and metabolic engineering analysis.
tassiovale/claude-code-kit · ★ 10 · AI & Automation · score 75
Install: claude install-skill tassiovale/claude-code-kit
# COBRApy - Constraint-Based Reconstruction and Analysis ## Overview COBRApy is a Python library for constraint-based reconstruction and analysis (COBRA) of metabolic models, essential for systems biology research. Work with genome-scale metabolic models, perform computational simulations of cellular metabolism, conduct metabolic engineering analyses, and predict phenotypic behaviors. **Version note:** Examples target **cobra 0.31.1** on PyPI (import `cobra`). Docs: [cobrapy.readthedocs.io](https://cobrapy.readthedocs.io/en/latest/). Repo: [opencobra/cobrapy](https://github.com/opencobra/cobrapy). ## When to Use This Skill Use this skill when: - Loading, building, or exporting genome-scale metabolic models (SBML, JSON, YAML) - Running FBA, pFBA, FVA, or flux sampling on COBRA models - Performing gene or reaction knockout screens and production envelope analysis - Designing or optimizing growth media and exchange constraints - Gap-filling infeasible models or validating model consistency ## Installation ```bash uv pip install "cobra==0.31.1" ``` MATLAB model I/O (optional): ```bash uv pip install "cobra[array]==0.31.1" ``` COBRApy uses [optlang](https://optlang.readthedocs.io/) for solvers. GLPK installs automatically via `swiglpk`. For large MILPs/QPs, cobra 0.29+ adds a **hybrid** solver (HIGHS/OSQP); `model.solver = "osqp"` now routes through hybrid and may error on plain LPs in a future release—prefer `model.solver = "hybrid"` when available. ## Core Capabilitie