Package Bio :: Package KEGG :: Package KGML :: Module KGML_pathway :: Class Pathway
[hide private]
[frames] | no frames]

Class Pathway

source code

object --+
         |
        Pathway

Represents a KGML pathway from KEGG.

Specifies graph information for the pathway map, as described in release KGML v0.7.1 (http://www.kegg.jp/kegg/xml/docs/)

Attributes:

The name attribute has a restricted format, so we make it a property and enforce the formatting.

The Pathway object is the only allowed route for adding/removing Entry, Reaction, or Relation elements.

Entries are held in a dictionary and keyed by the node ID for the pathway graph - this allows for ready access via the Reaction/Relation etc. elements. Entries must be added before reference by any other element.

Reactions are held in a dictionary, keyed by node ID for the path. The elements referred to in the reaction must be added before the reaction itself.

Instance Methods [hide private]
 
__init__(self)
Initialize the class.
source code
 
get_KGML(self)
Return the pathway as a string in prettified KGML format.
source code
 
add_entry(self, entry)
Add an Entry element to the pathway.
source code
 
remove_entry(self, entry)
Remove an Entry element from the pathway.
source code
 
add_reaction(self, reaction)
Add a Reaction element to the pathway.
source code
 
remove_reaction(self, reaction)
Remove a Reaction element from the pathway.
source code
 
add_relation(self, relation)
Add a Relation element to the pathway.
source code
 
remove_relation(self, relation)
Remove a Relation element from the pathway.
source code
 
__str__(self)
Return a readable summary description string.
source code
 
_getname(self) source code
 
_setname(self, value) source code
 
_delname(self) source code
 
_getnumber(self) source code
 
_setnumber(self, value) source code
 
_delnumber(self) source code

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

Properties [hide private]
  name
The KEGGID for the pathway map.
  number
The KEGG map number.
  compounds
Get a list of entries of type compound.
  maps
Get a list of entries of type map.
  orthologs
Get a list of entries of type ortholog.
  genes
Get a list of entries of type gene.
  reactions
Get a list of reactions in the pathway.
  reaction_entries
List of entries corresponding to each reaction in the pathway.
  relations
Get a list of relations in the pathway.
  element
Return the Pathway as a valid KGML element.
  bounds
Coordinate bounds for all Graphics elements in the Pathway.

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Initialize the class.
Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 
Return a readable summary description string.
Overrides: object.__str__

Property Details [hide private]

name

The KEGGID for the pathway map.
Get Method:
_getname(self)
Set Method:
_setname(self, value)
Delete Method:
_delname(self)

number

The KEGG map number.
Get Method:
_getnumber(self)
Set Method:
_setnumber(self, value)
Delete Method:
_delnumber(self)

compounds

Get a list of entries of type compound.
Get Method:
unreachable.compounds(self) - Get a list of entries of type compound.

maps

Get a list of entries of type map.
Get Method:
unreachable.maps(self) - Get a list of entries of type map.

orthologs

Get a list of entries of type ortholog.
Get Method:
unreachable.orthologs(self) - Get a list of entries of type ortholog.

genes

Get a list of entries of type gene.
Get Method:
unreachable.genes(self) - Get a list of entries of type gene.

reactions

Get a list of reactions in the pathway.
Get Method:
unreachable.reactions(self) - Get a list of reactions in the pathway.

reaction_entries

List of entries corresponding to each reaction in the pathway.
Get Method:
unreachable.reaction_entries(self) - List of entries corresponding to each reaction in the pathway.

relations

Get a list of relations in the pathway.
Get Method:
unreachable.relations(self) - Get a list of relations in the pathway.

element

Return the Pathway as a valid KGML element.
Get Method:
unreachable.element(self) - Return the Pathway as a valid KGML element.

bounds

Coordinate bounds for all Graphics elements in the Pathway.

Returns the [(xmin, ymin), (xmax, ymax)] coordinates for all Graphics elements in the Pathway

Get Method:
unreachable.bounds(self) - Coordinate bounds for all Graphics elements in the Pathway.