OBO file parser implemented with pyparsing.
from oboparse import obo_parser, parse_result_to_networkx
from urllib.request import urlopen
from io import TextIOWrapper
with urlopen('http://purl.obolibrary.org/obo/go.obo') as f:
parse_result = obo_parser.parseFile(TextIOWrapper(f), parseAll=True)
parse_result.pprint()
graph = parse_result_to_networkx(parse_result)
- https://owlcollab.github.io/oboformat/doc/obo-syntax.html
- https://owlcollab.github.io/oboformat/doc/GO.format.obo-1_4.html
MIT