# Bio.KEGG.Compound package

## Module contents

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.

class Bio.KEGG.Compound.Record

  Bases: `object`

  Holds info from a KEGG Ligand/Compound record.

  Attributes:

    - entry The entry identifier.

    - name A list of the compound names.

    - formula The chemical formula for the compound

    - mass The molecular weight for the compound

    - pathway A list of 3-tuples: (‘PATH’, pathway id, pathway)

    - enzyme A list of the EC numbers.

    - structures A list of 2-tuples: (database, list of struct ids)

    - dblinks A list of 2-tuples: (database, list of link ids)

  __init__()

    Initialize as new record.

  __str__()

    Return a string representation of this Record.

  __annotate_func__ = None
  __annotations_cache__ = {}
  __firstlineno__ = 29
  __static_attributes__ = ('dblinks', 'entry', 'enzyme', 'formula', 'mass', 'name', 'pathway', 'structures')

Bio.KEGG.Compound.parse(handle)

  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 all-trans-Undecaprenyl phosphate
      C00349 2-Methyl-3-oxopropanoate
      C01386 NH2Mec

Biopython v: 1.86

Versions
  Previous
  Latest
  Develop

Biopython Project
  Homepage
  On GitHub