Agent skill · research science · k-dense-ai

cobrapy

Constraint-based metabolic modeling (COBRA). FBA, FVA, gene knockouts, flux sampling, SBML models, for systems biology and metabolic engineering analysis.

Why this skill is useful

Provides specific commands and workflows for metabolic modeling that the AI wouldn't reliably generate on its own.

What it needs

Requires cobra, python installed locally. About 7k tokens when loaded. Last updated 2026-08-03. 32,849 stars on the source repository.

What this skill does

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. Repo: 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 MATLAB model I/O (optional): COBRApy uses optlang 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 Capabilities COBRApy provides comprehensive tools organized into several key areas: 1. Model Management Load existing models from repositories or files: Save models in various formats: 2. Model Structure and Components Access and inspect model components: 3. Flux Balance Analysis (FBA) Perform standard FBA simulation: Parsimonious FBA (minimize total flux): Geometric FBA (find central solution): 4. Flux Variability Analysis (FVA) Determine flux ranges for all reactions: 5. Gene and Reaction Deletion Studies Perform knockout analyses: 6. Growth Media and Minimal Media Manage growth medium: 7. Flux Sampling Sample the feasible flux space: 8. Production Envelopes Calculate phenotype phase planes: 9. Gapfilling Add reactions to make models feasible: 10. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills k-dense-ai/cobrapy

View the source on GitHub

Browse the @skills marketplace