IMP
2.0.1
The Integrative Modeling Platform
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
_interaction_graph.py
1
import
networkx
as
NX
2
from
xml.dom
import
minidom , Node
3
#import xml.dom.ext as domExt
4
import
sys
5
(NO_EDGE,EDGE_TYPE_SOLID) = range(2)
6
class
InteractionGraph
(NX.Graph):
7
def
init_graph(self,pairs):
8
self.load_dependencies(pairs)
9
10
def
load_dependencies(self,pairs):
11
for
p
in
pairs:
12
compA = p[0]
13
compB = p[1]
14
self.add_edge(compA,compB)