Computational strain design searches a genome-scale model for gene or reaction interventions that make an organism overproduce a target chemical. The unifying idea is growth-coupling: rather than just deleting competing pathways (which the cell routes around and evolution erodes), a good design makes product secretion obligatory for growth, so selection in the bioreactor maintains production. OptKnock encodes this as a bilevel optimization - the inner problem is the cell maximizing its own growth, the outer is the engineer maximizing product at that optimum - but it is optimistic, assuming the cell cooperates; RobustKnock and minimal cut sets give more trustworthy, worst-case-aware designs. Every design is a hypothesis about a model with no regulation, kinetics, toxicity, or genetic stability, so it must be verified on the production envelope and then in the lab. The optimization is MILP and combinatorially hard, so bound the intervention set and use a strong solver.
pip install straindesign # OptKnock/RobustKnock/MCS/OptCouple on COBRApy; MILP
pip install cameo # heuristic (OptGene) and FSEOF over/under-expression targets (optional)
# MILP needs a solver: GLPK/SCIP (open source) work for small models; CPLEX/Gurobi (academic) for genome-scale.
Inputs: a curated genome-scale model, a target product exchange reaction, and a defined medium. Know the model's biomass reaction id (linear_reaction_coefficients(model)).
Tell your AI agent: - "Design knockouts to overproduce succinate in E. coli, coupled to growth" - "Use RobustKnock instead of OptKnock so the design is robust to the cell's choices" - "Compute minimal cut sets that force my product" - "Find over-expression targets for my pathway with FSEOF" - "Verify that my design is actually growth-coupled"
"On anaerobic glucose, find up to four knockouts that couple succinate secretion to growth in the E. coli core model, and verify with the production envelope that the strain cannot grow without making succinate."
"My OptKnock design produces zero product at max growth. Explain OptKnock's optimism and redo it with RobustKnock so product is guaranteed in the worst-case internal state."
"Enumerate the smallest sets of reaction knockouts that force my target product, and translate them to gene deletions via the GPR."
"My bottleneck is low flux through an existing pathway, not a competing drain. Use FSEOF to find amplification targets rather than knockouts."
compute_strain_designs with an intervention budget, solution cap, time limit, and a strong solver.time_limit, bound max_cost (interventions), cap max_solutions, and use CPLEX/Gurobi for genome-scale models - GLPK is slow.reaction_id -> -1.0 in the design dict; translate reaction knockouts to gene deletions through the GPR before calling a design realizable.