Package Bio :: Package KEGG :: Package KGML :: Module KGML_parser :: Class KGMLParser
[hide private]
[frames] | no frames]

Class KGMLParser

source code

object --+
         |
        KGMLParser

Parses a KGML XML Pathway entry into a Pathway object.

Example: Read and parse large metabolism file

>>> from Bio.KEGG.KGML.KGML_parser import read
>>> pathway = read(open('KEGG/ko01100.xml', 'r'))
>>> print(len(pathway.entries))
3628
>>> print(len(pathway.reactions))
1672
>>> print(len(pathway.maps))
149
>>> pathway = read(open('KEGG/ko00010.xml', 'r'))
>>> print(pathway) #doctest: +NORMALIZE_WHITESPACE
Pathway: Glycolysis / Gluconeogenesis
KEGG ID: path:ko00010
Image file: http://www.kegg.jp/kegg/pathway/ko/ko00010.png
Organism: ko
Entries: 99
Entry types:
    ortholog: 61
    compound: 31
    map: 7
Instance Methods [hide private]
 
__init__(self, elem)
Initialize the class.
source code
 
parse(self)
Parse the input elements.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, elem)
(Constructor)

source code 
Initialize the class.
Overrides: object.__init__