<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -101,11 +101,21 @@ def KGML2Graph(xmlfile, filter_by = ()):
         pathway.add_edge(e1, e2)
         pathway.relations[e1+'_'+e2] = rel
    
+
+    # Add reactions to pathway object
     for reaction in tree.getiterator('reaction'):
+
         id = reaction.get('name')
-        substrate = reaction.find('substrate').get('name')
-        product = reaction.find('product').get('name')
-        pathway.reactions[reaction] = reaction
+        substrates = []
+        products = []
+
+        for sub in reaction.getiterator('substrate'):
+            substrates.append(sub.get('name'))
+
+        for prod in reaction.getiterator('product'):
+            products.append(sub.get('name'))
+
+        pathway.reactions[id] = {'reaction': reaction, 'substrates': substrates, 'products': products}
 
     return tree, pathway, nodes, genes
 </diff>
      <filename>parse_KGML.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2c696d3f6d9587e99e7b46d1a7822a872167ac08</id>
    </parent>
  </parents>
  <author>
    <name>dalloliogm</name>
    <email>dalloliogm@gmail.com</email>
  </author>
  <url>http://github.com/dalloliogm/kegg-kgml-parser--python-/commit/4ef95bedc5a5bbe582346c8c63cc86a9765b8265</url>
  <id>4ef95bedc5a5bbe582346c8c63cc86a9765b8265</id>
  <committed-date>2009-10-20T03:50:46-07:00</committed-date>
  <authored-date>2009-10-20T03:50:46-07:00</authored-date>
  <message>improved how reactions are stored in the pathway object</message>
  <tree>7a3bc6d3b1237b8d35fbf4bef2eb2f06d15a78b2</tree>
  <committer>
    <name>dalloliogm</name>
    <email>dalloliogm@gmail.com</email>
  </committer>
</commit>
