def find_compound(name, location): """ FInd all reactions with a compound :param name: The name of the compound :type name: str :param location: The location of the compound :type location: str :return: :rtype: """ cpds, rcts, enz = parse.compounds_reactions_enzymes() test = Compound(name, location) for rid in rcts: # :type rcts[r]: PyFBA.metabolism.Reaction if test in rcts[rid].all_compounds(): print("{}\t{}".format(rid, rcts[rid].equation))
from PyFBA import parse __author__ = "Rob Edwards" cmpds, reactions, enzs = parse.compounds_reactions_enzymes() for c in cmpds: # :type cmpds[c]: PyFBA.metabolism.compound.Compound print("{}\t{}\t{}".format(cmpds[c].name, cmpds[c].location, cmpds[c].model_seed_id))