def test_ngam_presence(model): """ Expect a single non growth-associated maintenance reaction. The Non-Growth Associated Maintenance reaction (NGAM) is an ATP-hydrolysis reaction added to metabolic models to represent energy expenses that the cell invests in continuous processes independent of the growth rate. Memote tries to infer this reaction from a list of buzzwords, and the stoichiometry and components of a simple ATP-hydrolysis reaction. Implementation: From the list of all reactions that convert ATP to ADP select the reactions that match the irreversible reaction "ATP + H2O -> ADP + HO4P + H+", whose metabolites are situated within the main model compartment. The main model compartment is assumed to be the cytosol, yet, if that cannot be identified, it is assumed to be the compartment with the most metabolites. The resulting list of reactions is then filtered further by attempting to match the reaction name with any of the following buzzwords ('maintenance', 'atpm', 'requirement', 'ngam', 'non-growth', 'associated'). If this is possible only the filtered reactions are returned, if not the list is returned as is. """ ann = test_ngam_presence.annotation ann["data"] = get_ids(basic.find_ngam(model)) ann["metric"] = 1.0 - float(len(ann["data"]) == 1) ann["message"] = wrapper.fill( """A total of {} NGAM reactions could be identified: {}""".format(len(ann["data"]), truncate(ann["data"]))) assert len(ann["data"]) == 1, ann["message"]
def test_ngam_presence(read_only_model, store): """Expect a single non growth-associated maintenance reaction.""" ngam_reaction = basic.find_ngam(read_only_model) store["ngam_reaction"] = [rxn.id for rxn in ngam_reaction] assert len(ngam_reaction) == 1, \ "Could not identify a unique non growth-associated maintenance " \ "reaction. Please make sure to add only a single ATP-hydrolysis " \ "reaction and set the lower bound to a fixed value."
def test_ngam_presence(read_only_model): """ Expect a single non growth-associated maintenance reaction. The Non-Growth Associated Maintenance reaction (NGAM) is an ATP-hydrolysis reaction added to metabolic models to represent energy expenses that the cell invests in continuous processes independent of the growth rate. """ ann = test_ngam_presence.annotation ann["data"] = get_ids(basic.find_ngam(read_only_model)) ann["message"] = wrapper.fill( """A total of {} NGAM reactions could be identified: {}""".format(len(ann["data"]), truncate(ann["data"]))) assert len(ann["data"]) == 1, ann["message"]
def test_ngam_presence(read_only_model): """ Expect a single non growth-associated maintenance reaction. The Non-Growth Associated Maintenance reaction (NGAM) is an ATP-hydrolysis reaction added to metabolic models to represent energy expenses that the cell invests in continuous processes independent of the growth rate. Memote tries to infer this reaction from a list of buzzwords, and the stoichiometry and components of a simple ATP-hydrolysis reaction. Please see the API documentation for ``basic.find_ngam`` for a more detailed explanation. """ ann = test_ngam_presence.annotation ann["data"] = get_ids(basic.find_ngam(read_only_model)) ann["message"] = wrapper.fill( """A total of {} NGAM reactions could be identified: {}""".format(len(ann["data"]), truncate(ann["data"]))) assert len(ann["data"]) == 1, ann["message"]
def test_ngam_presence(model, num): """Expect a single non growth-associated maintenance reaction.""" ngam_reaction = basic.find_ngam(model) assert len(ngam_reaction) == num