Package Bio :: Package KEGG :: Package Compound
[hide private]
[frames] | no frames]

Package Compound

source code

Code to work with the KEGG Ligand/Compound database.

Functions:
parse - Returns an iterator giving Record objects.

Classes:
Record - A representation of a KEGG Ligand/Compound.

Classes [hide private]
  Record
Holds info from a KEGG Ligand/Compound record.
Functions [hide private]
 
id_wrap(indent) source code
 
struct_wrap(indent) source code
 
parse(handle)
Parse a KEGG Ligan/Compound file, returning Record objects.
source code
Variables [hide private]
  name_wrap = [0, '', (' ', '$', 1, 1), ('-', '$', 1, 1)]
  __package__ = 'Bio.KEGG.Compound'
Function Details [hide private]

parse(handle)

source code 
Parse a KEGG Ligan/Compound file, returning Record objects.

This is an iterator function, typically used in a for loop.  For
example, using one of the example KEGG files in the Biopython
test suite,

>>> with open("KEGG/compound.sample") as handle:
...     for record in parse(handle):
...         print("%s %s" % (record.entry, record.name[0]))
... 
C00023 Iron
C00017 Protein
C00099 beta-Alanine
C00294 Inosine
C00298 Trypsin
C00348 Undecaprenyl phosphate
C00349 2-Methyl-3-oxopropanoate
C01386 NH2Mec