torchcell.metabolism.constraints.parse_catalytic_units

parse_catalytic_units(model: cobra.Model, rxn_ids: list[str]) → CatalyticUnits[source]

Flatten every GPR into AND-terms indexed against rxn_ids.

Uses cobra’s own parsed gene_reaction_rule string rather than the model’s genes collection, because the collection loses the AND/OR structure that decides whether a deletion is lethal: an isozyme pair and a two-subunit complex have the same gene set and opposite deletion phenotypes.