[python-libsbml]how to get reactant/product from a reaction?
16 Apr '12 02:03
I have a human SBML files(Recon 1) from BiGG database, and I want to extract reactant and product id in reactions.I tried the following code, but it didn't work:----- reader = SBMLReader() doc = reader.readSBML([filename]) model = doc.getModel() Reactions = model.getListOfReactions() for reaction in Reactions: products=reaction.getListOfProducts() for product in products: print product.getId()----There is no result for all reactions. When I tried 'reaction.getId()', I could get the id of a reaction, but it doesnot work in species. I think get product and reactant from a reaction mast be a simple task in libSBML. Anyone knows how to do this in python-libsbml? Thank you for your help.