13c-metabolic-flux
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,โฆ
Performs constraint-based metabolic modeling with COBRApy, including FBA, pFBA, FVA, gene knockouts, flux sampling, growth media, production envelopes, gap filling, and SBML model validation for systems biology and metabolic engineering.
Claude Code
$ npx -y skills add K-Dense-AI/scientific-agent-skills --skill cobrapy --agent claude-code
Codex
$ npx skills add K-Dense-AI/scientific-agent-skills --skill cobrapy -a codex -y
Cursor
$ npx skills add K-Dense-AI/scientific-agent-skills --skill cobrapy -a cursor -y
Gemini CLI
$ npx skills add K-Dense-AI/scientific-agent-skills --skill cobrapy -a gemini-cli -y
GitHub Copilot
$ npx skills add K-Dense-AI/scientific-agent-skills --skill cobrapy -a github-copilot -y
OpenCode
$ npx skills add K-Dense-AI/scientific-agent-skills --skill cobrapy -a opencode -y
Windsurf
$ npx skills add K-Dense-AI/scientific-agent-skills --skill cobrapy -a windsurf -y
name: cobrapy description: Performs constraint-based metabolic modeling with COBRApy, including FBA, pFBA, FVA, gene knockouts, flux sampling, growth media, production envelopes, gap filling, and SBML model validation for systems biology and metabolic engineering. license: GPL-2.0 license allowed-tools: Read Write Edit Bash compatibility: Requires Python 3.9+ and cobra; examples tested with Python 3.12 and cobra 0.32.1. GLPK installs via swiglpk; commercial solvers need separate installation/licensing. Remote model downloads need network access; bundled textbook examples run offline. metadata: version: "1.5" skill-author: K-Dense Inc. last-reviewed: "2026-09-30"
Use for loading/building metabolic networks, optimizing their steady-state fluxes, knockout screens, medium design, feasible-space sampling, and gap-filling hypotheses. FBA is a constraint-based prediction; it does not infer kinetic rates or establish experimental growth, thermodynamic feasibility, or flux identifiability.
Targets **cobra 0.32.1** (import `cobra`), checked against its released source and [current documentation](https://cobrapy.readthedocs.io/en/latest/).
uv pip install "cobra==0.32.1" # Optional SciPy support for MATLAB I/O and array operations: uv pip install "cobra[array]==0.32.1"
Plotting examples additionally require matplotlib, pandas, and seaborn. The `cobra[chrr]` extra supplies hopsy for the new CHRR sampler; that optional backend was documentation-reviewed, not executed in this refresh. In 0.32.1, `sample()` defaults to `method="auto"` (CHRR when hopsy is installed, otherwise OptGP). Choose the method explicitly to avoid environment-dependent changes.
Record model source/version/checksum, cobra and solver versions, objective, medium, bounds, tolerances, and any random seed with each analysis. GLPK handles the examples below; inspect `cobra.util.solver.solvers` before choosing an optional solver. Use `"hybrid"` for its HiGHS/OSQP interface when installed; the legacy `"osqp"` alias is deprecated. QP methods require a suitable backend. Start with `processes=1`; scripts using multiprocessing need a guarded entry point.
from cobra.io import load_model
# These names are bundled: textbook, iJO1366, salmonella.
model = load_model("textbook") # model.id is e_coli_core; 95 reactions
model.solver = "glpk"
print(model.id, len(model.reactions), len(model.metabolites), len(model.genes))
print(model.reactions.get_by_id("PFK").reaction)
print(model.reactions.PFK.gene_reaction_rule)
print(model.medium)
solution = model.optimize(raise_error=True)
assert solution.status == "optimal"
print(solution.objective_value, solution.fluxes["PFK"])
# error_value=None raises on a failed solve; the default instead returns NaN.
baseline = model.slim_optimize(error_value=None)
assert baseline > 0`e_coli_core` is a remote BiGG identifier, **not** a bundled alias for `textbook`. The released remote adapters encounter redirects on current BiGG/BioModels URLs; see [model I/O](references/api_quick_reference.md) for verified download routes and local SBML loading. Do not assume `load_model` caches: its 0.32.1 implementation accepts `cache` but does not use it. Save source files for reproducibility.
Check chemical formulas/charges and boundary annotations separately from solver feasibility. Review excluded biomass/pseudo reactions and missing chemistry; an empty imbalance dictionary alone cannot establish a chemically valid model. The [validation workflow](references/workflows.md) distinguishes those cases.
from cobra.flux_analysis import pfba, geometric_fba, flux_variability_analysis
biomass_id = "Biomass_Ecoli_core" # inspect IDs/objective for each new model
parsimonious = pfba(model)
print(parsimonious.fluxes[biomass_id])
# parsimonious.objective_value is the minimized total flux, not biomass growth.
centered = geometric_fba(model, processes=1)
fva = flux_variability_analysis(
model, reaction_list=["PFK", "FBA", "PGI"],
fraction_of_optimum=0.9, processes=1,
)
loopless_fva = flux_variability_analysis(
model, reaction_list=["PFK", "FBA", "PGI"],
fraction_of_optimum=0.9, loopless="fastSNP", processes=1,
)
print(fva) # index: reaction ID; columns: minimum, maximumFVA extrema are optimized separately and need not be jointly achievable. `loopless="fastSNP"` computes loopless bounds; `"cycleFreeFlux"` is an alternative that need not find the optimal bounds. Boolean `loopless` arguments are deprecated. Loop removal does not impose measured Gibbs energies or metabolite concentrations. Fractional objective thresholds here assume a positive biomass maximization objective; use an explicit constraint for other objective signs/directions.
from cobra.flux_analysis import single_gene_deletion
from cobra.medium import minimal_medium
results = single_gene_deletion(model, processes=1)
valid = results[results.status.eq("optimal") & results.growth.notna()]
low_growth = valid[valid.growth < 0.01 * baseline] # declared 1% criterion
unresolved = results[~results.index.isin(valid.index)]
print(low_growth[["ids", "growth"]], unresolved[["ids", "status"]])
with model:
medium = model.medium
medium["EX_o2_e"] = 0.0
model.medium = medium # editing the returned dict alone does not change model
anaerobic = model.optimize()
print(anaerobic.status, anaerobic.objective_value)
min_medium = minimal_medium(model, 0.5 * baseline, minimize_components=True)
if min_medium is None:
raise RuntimeError("No medium found at the requested growth target")
with model:
model.medium = min_medium.to_dict()
assert model.slim_optimize(error_value=None) >= 0.5 * baseline - 1e-6Deletion results contain `ids` **se
๐ Claude Scientific Skills is now Scientific Agent Skills. Same skills, broader compatibility โ now works with any AI agent that supports the open Agent Skills standard, not just Claude.
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,โฆ
Uses the Adaptyv Bio Foundry API and Python SDK to design protein characterization experiments, estimate costs, submit sequences,โฆ
This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting,โฆ
AlphaGenome API key, free for non-commercial use from deepmind.google.com/science/alphagenome. ALPHA_GENOME_API_KEY is acceptedโฆ
Plans, executes, and documents validation, verification, and transfer of analytical procedures under the governing framework -โฆ
Handles annotated matrices in single-cell analysis, .h5ad and Zarr files, and integration with the scverse ecosystem. This is theโฆ
Use this skill to extract structured Markdown/JSON from PDFs and document imagesโtables with cell-level precision, formulas asโฆ