Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

cobrapy

Skill by davila7

Runs constraint-based metabolic modeling in Python with COBRApy. It covers flux balance and variability analysis, gene knockouts and flux sampling. It is built for systems biology and metabolic engineering analysis.

  • Score 94
  • 35k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install cobrapy

Built from the published package, never by AI.

git clone --depth 1 https://github.com/davila7/claude-code-templates /tmp/claude-code-templates && mkdir -p ~/.claude/skills && cp -r /tmp/claude-code-templates/cli-tool/components/skills/scientific/cobrapy ~/.claude/skills/cobrapy

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install cobrapy in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

COBRApy is a Python library for constraint-based reconstruction and analysis (COBRA) of metabolic models. It loads and saves models in SBML, JSON and YAML formats, and gives access to reactions, metabolites and genes. It supports flux balance analysis, parsimonious and geometric FBA, and flux variability analysis, including loopless FVA.

The library also covers gene and reaction knockout studies, minimal growth media, flux sampling with OptGP and ACHR, production envelopes and gapfilling. Users can also build models from scratch with reactions and metabolites. The skill is aimed at systems biology and metabolic engineering analysis. Worked examples include a gene knockout screen and media optimization.

Written from the project's SKILL.md and checked against it.

What it can do

  • Model loading and savingReads and writes models in SBML, JSON and YAML formats.
  • Flux balance analysisRuns FBA, parsimonious FBA and geometric FBA on a model.
  • Flux variability analysisFinds flux ranges for reactions, including loopless FVA.
  • Gene and reaction deletionsRuns single and double knockout analyses and manual knockouts.
  • Minimal mediaCalculates minimal growth media for a model.
  • Flux samplingSamples the feasible flux space using OptGP or ACHR.
  • Production envelopesCalculates phenotype phase planes for production analysis.
  • GapfillingAdds reactions from a universal model to make a model feasible.
  • Model buildingCreates metabolites, reactions and models from scratch.

What you need

  • Python
  • A linear programming solver such as GLPK, CPLEX or Gurobi (optional, for solver changes)

Try asking

  • Load the E. coli model and run FBA to report its growth rate.
  • Run a single gene knockout screen on the E. coli model and list essential genes.
  • Compute the minimal medium for 50% of maximum growth in E. coli.

Good to know

  • Minimal media with minimize_components=True uses MILP and is slower.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: cli-tool/components/skills/scientific/cobrapy/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md12 KB
  • references/api_quick_reference.md16 KB
  • references/workflows.md21 KB

Alternatives to cobrapy

All alternatives →

Compare with literature-search-arxiv, alphafold-database-fetch-and-analyze or quickgo-database

cobrapy: common questions

What does cobrapy do?

It is a Python library for constraint-based metabolic modeling. It covers FBA, FVA, gene knockouts and flux sampling.

Which model formats does cobrapy read and write?

It reads and writes SBML, JSON and YAML. The source says SBML is preferred for model exchange and long-term storage.

Can cobrapy use different solvers?

Yes. The troubleshooting section says solvers such as GLPK, CPLEX and Gurobi can be set via model.solver.

How do I install cobrapy?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is cobrapy free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is cobrapy safe to use?

It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to cobrapy?

Similar skills: literature-search-arxiv, alphafold-database-fetch-and-analyze, quickgo-database, peloton.

cobrapy Install

Add to stack

Loading.