Bio.KEGG.Gene package

Module contents

Code to work with the KEGG Gene database.

Functions: - parse - Returns an iterator giving Record objects.

Classes: - Record - A representation of a KEGG Gene.

class Bio.KEGG.Gene.Record

Bases: object

Holds info from a KEGG Gene record.

Attributes:
  • entry The entry identifier.

  • name A list of the gene names.

  • definition The definition for the gene.

  • orthology A list of 2-tuples: (orthology id, role)

  • organism A tuple: (organism id, organism)

  • position The position for the gene

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

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

__init__(self)

Initialize new record.

__str__(self)

Return a string representation of this Record.

Bio.KEGG.Gene.parse(handle)

Parse a KEGG Gene 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/gene.sample") as handle:
...     for record in parse(handle):
...         print("%s %s" % (record.entry, record.name[0]))
...
b1174 minE
b1175 minD