PianaGraphEdgeAttribute
index
../../../../piana/code/Graph/PianaGraph/PianaGraphEdgeAttribute.py

 File       : PianaGraphEdgeAttribute.py
 Author     : R. Aragues & D. Jaeggi
 Creation   : 2003
 Contents   : class PianaGraphEdgeAttribute (attribute specific to Piana for an Edge)
 Called from: 
 
=======================================================================================================
 
This file implements class PianaGraphEdgeAttribute
 
It describes an interaction of the protein-protein interaction network

 
Modules
       
MySQLdb
PianaGlobals
copy
sys

 
Classes
       
GraphEdgeAttribute.GraphEdgeAttribute
PianaGraphEdgeAttribute

 
class PianaGraphEdgeAttribute(GraphEdgeAttribute.GraphEdgeAttribute)
    Class that implements attributes for Piana Edges: accessing edge values, setting edge values, ...
 
  Methods defined here:
__deepcopy__(self, memo)
__init__(self, interactionPiana_value=None, mem_mode='onDemand', piana_access=None, confidence_interaction_value=0, propagated=None, extended=None, construction_parameters=())
"construction_parameters" is the tuple with the minimum necessary data to generate the PianaGraphEdgeAttribute.
                          This is used when the edges and EdgeAttributes are not stored in memory.
                          The content of the tuple is the generated with the GraphEdgeAttribute method get_creation_information
                          It has prevalence over all the rest of parameters
 
"interactionPiana_value" is the database identifier for this edge
 
"piana_access" is a PianaDBaccess object, used to retrieve information from the database
 
"mem_mode" can be:
--> "onDemand": values are retrieved from DB only when they are needed and stored then in memory
--> "inMemory": values are retrieved from DB at initilisation and stored in memory
--> "inFlight": values are retrieved from DB when needed and never are stored in memory
 
 
"propagated" is an object of class PropagatedEdge
 
"extended" is an object of class ExtendedEdge
 
Attention!!! Right now, not using extended for anything: I do not add edges to the graph by extension (extension meant that
edges from the database where added for nodes that were added to network during an expansion.
 
      --> There will just be propagated edges
 
Attention!!! Currently, not using "confidence_interaction_value"
__str__(self)
implementation of conversion to string for PianaGraphEdgeAttribute
distance(self)
To  do!!! Get distance that makes biological sense
 
Returns a distance like value.
 
Defaults to return 1
get_associated_interactionPiana(self)
get_creation_information(self)
returns the tuple (interaction_id, piana_access)
get_db_edge_id(self)
Overrides method get_db_edge_id() of superclass GraphEdgeAttribute
 
returns the interactionPiana identifier for this interaction
 
It is the same as get_interactionPiana, but in this case it is overridden a method that all XXGraphEdgeAttribute must have
This is the method that is called from Graph, since Graph doesn't know which kind of EdgeAttribute it is processing
get_dic_methodID(self)
returns a list with methods for this interaction
get_dic_pubmedID(self)
returns a dict with pubmeds for this interaction
get_extensions(self)
returns [] if it is not an edge coming from an extension
 
otherwise returns a list of objects ExtendedEdge
get_interactionPiana(self)
returns the interactionPiana identifier for this interaction
get_list_methodID(self)
returns a list with methods for this interaction
get_list_pubmedID(self)
returns a list with methods for this interaction
get_list_sourceDB_names(self)
returns a list with source databases for this interaction
get_propagations(self)
returns [] if it is not a edge coming from an propagation
 
otherwise returns a list of objects PropagatedEdge
get_sourceDB_id(self)
returns the integer that identifies in which sourceDBs this interaction was
merge_attribute(self, new_edge_attribute, ignore_ids=0)
merges the attribute of the object with the new edge attribute passed as argument
 
 
"ignore_ids" is used to avoid conflicts when unifying the network in PianaGraph
    -> set to 1 when unifying the network: it won't check that interactionPiana is the same in both attributes
set_extension(self, expansion_type=None, extended_from_node=None, extended_edge_object=None)
Adds to the edge an object describing an extension ( database interactions added to the graph because one of the nodes involved
                                                     in the interaction was added to the graph as a result of an expansion)
 
 
if extended_edge_object is not None, adds that object (avoiding adding an object that already exists)
if not, creates a new object using expansion_type and extended_from_node
 
edge_extended_object is of class ExtendedEdge
set_propagation(self, expansion_type=None, propagated_from_node=None, propagated_from_db_edge_id=None, propagated_from_edge_id=None, propagated_edge_object=None)
Adds to the edge an object describing a propagation (interactions of another node are added to another node because both nodes share
                                                     a certain characteristic)
 
if propagated_edge_object is not None, adds that object (avoiding adding an object that already exists)
if not, creates a new object using expansion_type, propagated_from_node, propagated_from_db_edge_id and propagated_from_edge_id
 
The propagation is described in the object propagated_edge_object of class PianaNodeExpansion PropagatedEdge

Methods inherited from GraphEdgeAttribute.GraphEdgeAttribute:
__eq__(self, other)
When defining new Attribute classes, the equality operator MUST be overridden.
Otherwise, adding further attributes to existing nodes in the graph may cause
duplicated attributes.
direction(self)
To be overridden. Returns a direction like value.
Defaults to return 0 (i.e. bidirectional)

 
Data
        verbose = 0