In-silico gene essentiality predicts which genes a metabolic model cannot lose and still make biomass. The result is a conditional prediction about a specific model on a specific medium, never an intrinsic property of a gene. Three choices dominate the outcome: the growth cutoff that separates essential from viable (a policy you set, not a library default), the medium (rich vs minimal give different essential sets), and the deletion method (FBA re-optimizes the mutant, MOMA/ROOM model an immediate un-adapted mutant). Because genes reach reactions through gene-protein-reaction rules, a gene with an isozyme partner looks non-essential no matter how central its reaction - which is exactly why synthetic-lethal pairs exist. Predictions top out around 85-93% accuracy on E. coli metabolic genes; report MCC, not accuracy, and match the medium when validating against experimental screens.
pip install cobra pandas scikit-learn
# QP/MILP methods (MOMA, ROOM) benefit from an academic CPLEX or Gurobi; HiGHS also works.
Inputs: a genome-scale model (SBML/JSON or a built-in like load_model('textbook')) and, for validation, an experimental essential-gene list (Keio, Tn-seq, or CRISPR fitness) with the medium it was measured on.
Tell your AI agent: - "Find the essential genes in my model on glucose minimal medium" - "Sweep the essentiality cutoff and tell me which calls are low-confidence" - "Use MOMA instead of FBA because these are fresh transposon mutants" - "Find synthetic-lethal gene pairs among the viable genes" - "Compare my predicted essentials to the Keio set and report the MCC"
"Run single-gene deletions on iML1515 in M9 glucose, call genes essential below 1% of wild-type growth, and also report how many calls change if I use 5% instead."
"These are freshly knocked-out CRISPR mutants scored in one growth cycle - use MOMA, not FBA, and explain how the essential set differs from the FBA call."
"Among genes that are individually non-essential, find synthetic-lethal pairs and flag any that could be combination drug targets."
"Compare essential genes aerobically vs anaerobically and separate the core-essential set from the condition-specific ones."
"Compare my model's predicted essential genes to the Keio collection on the same medium and report MCC, sensitivity, and the false-essential and false-non-essential genes."
single_gene_deletion (GPR-aware) and apply an explicit cutoff.double_gene_deletion; use Fast-SL logic for higher-order sets.single_gene_deletion evaluates the GPR so complexes and isozymes are handled correctly.ids column holds sets of gene-id strings; list(s)[0] gives the id (no .id attribute).if __name__ == '__main__': (the functions spawn workers) or pass processes=1.