Cobra Set Medium Preview
cobra_set_medium_preview
Open in the interactive browser →
Validate a medium dict against the model and return the effective medium (merge or replace) without running an analysis.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
medium |
object | yes | {exchange_id: positive uptake rate} (mmol/gDW/h). Merged onto the model's default medium: listed uptakes override, all other default uptakes stay open, 0 closes an exchange |
medium_replace |
boolean | no | true = COBRApy replace semantics: exchanges not listed in medium are closed |
model_id |
string | yes | bundled model id (e_coli_core, iML1515, iMM904, iCHOv1) or a session_model_id from cobra_load_model |
Examples
Validate a medium dict against the model and return the effective medium (merge or replace) without running an analysis (declared example)
Prompt: “Validate a medium dict against the model and return the effective medium (merge or replace) without running an analysis using cobra_set_medium_preview with arguments {"medium": {"EX_glc__D_e": 10.0, "EX_o2_e": 0.0}, "model_id": "e_coli_core"}”
Validate a medium dict against the model and return the effective medium (merge or replace) without running an analysis (minimal call)
Prompt: “Call cobra_set_medium_preview and summarise the result.”
cobracobra_set_medium_preview