Skip to content

Instantly share code, notes, and snippets.

@kozo2
Created October 6, 2014 13:05
Show Gist options
  • Save kozo2/a1e6a6687115b88b2625 to your computer and use it in GitHub Desktop.
Save kozo2/a1e6a6687115b88b2625 to your computer and use it in GitHub Desktop.
import re
import libsbml
reader = libsbml.SBMLReader()
doc = reader.readSBMLFromFile('BMID000000140222.xml')
model = doc.getModel()
hoge = 0
for i in range(0, model.getNumReactions()):
if len(re.findall(r'REACTOME:', model.getReaction(i).getNotesString())) > 0:
hoge = hoge +1
print hoge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment