Back to index

python-biopython  1.60
Public Member Functions | Private Attributes
Bio.Pathway.Network Class Reference

List of all members.

Public Member Functions

def __init__
def __repr__
def __str__
def add_species
def add_interaction
def source
def source_interactions
def sink
def sink_interactions
def species
def interactions

Private Attributes

 __graph

Detailed Description

A set of species that are explicitly linked by interactions.

The network is a directed multigraph with labeled edges. The nodes in the graph
are the biochemical species involved. The edges represent an interaction between
two species, and the edge label is a reference to the associated Interaction
object.

Attributes:

None

Definition at line 248 of file __init__.py.


Constructor & Destructor Documentation

def Bio.Pathway.Network.__init__ (   self,
  species = [] 
)
Initializes a new Network object.

Definition at line 262 of file __init__.py.

00262 
00263     def __init__(self, species = []):
00264         """Initializes a new Network object."""
00265         self.__graph = MultiGraph(species)


Member Function Documentation

Returns a debugging string representation of this network.

Definition at line 266 of file __init__.py.

00266 
00267     def __repr__(self):
00268         """Returns a debugging string representation of this network."""
00269         return "<Network: __graph: " + repr(self.__graph) + ">"

Returns a string representation of this network.

Definition at line 270 of file __init__.py.

00270 
00271     def __str__(self):
00272         """Returns a string representation of this network."""
00273         return "Network of " + str(len(self.species())) + " species and " + \
00274                str(len(self.interactions())) + " interactions."

Here is the call graph for this function:

def Bio.Pathway.Network.add_interaction (   self,
  source,
  sink,
  interaction 
)
Adds interaction to this network.

Definition at line 279 of file __init__.py.

00279 
00280     def add_interaction(self, source, sink, interaction):
00281         """Adds interaction to this network."""
00282         self.__graph.add_edge(source, sink, interaction)

def Bio.Pathway.Network.add_species (   self,
  species 
)
Adds species to this network.

Definition at line 275 of file __init__.py.

00275 
00276     def add_species(self, species):
00277         """Adds species to this network."""
00278         self.__graph.add_node(species)

Returns list of the unique interactions in this network.

Definition at line 303 of file __init__.py.

00303 
00304     def interactions(self):
00305         """Returns list of the unique interactions in this network."""
00306         return self.__graph.labels()
00307 
00308 
00309 
00310 
00311 

Here is the caller graph for this function:

def Bio.Pathway.Network.sink (   self,
  species 
)
Returns list of unique sinks for species.

Definition at line 291 of file __init__.py.

00291 
00292     def sink(self, species):
00293         """Returns list of unique sinks for species."""
00294         return self.__graph.children(species)

def Bio.Pathway.Network.sink_interactions (   self,
  species 
)
Returns list of (sink, interaction) pairs for species.

Definition at line 295 of file __init__.py.

00295 
00296     def sink_interactions(self, species):
00297         """Returns list of (sink, interaction) pairs for species."""
00298         return self.__graph.child_edges(species)

def Bio.Pathway.Network.source (   self,
  species 
)
Returns list of unique sources for species.

Definition at line 283 of file __init__.py.

00283 
00284     def source(self, species):
00285         """Returns list of unique sources for species."""
00286         return self.__graph.parents(species)

def Bio.Pathway.Network.source_interactions (   self,
  species 
)
Returns list of (source, interaction) pairs for species.

Definition at line 287 of file __init__.py.

00287 
00288     def source_interactions(self, species):
00289         """Returns list of (source, interaction) pairs for species."""
00290         return self.__graph.parent_edges(species)

Returns list of the species in this network.

Definition at line 299 of file __init__.py.

00299 
00300     def species(self):
00301         """Returns list of the species in this network."""
00302         return self.__graph.nodes()

Here is the caller graph for this function:


Member Data Documentation

Definition at line 264 of file __init__.py.


The documentation for this class was generated from the following file: