Ejemplo n.º 1
0
 def generateGraph(self,fileName,graphType):
     consoleCommands.generateGraph(fileName,graphType,outputDirectory='/tmp')
     fileName2 = fileName.split('/')[-1]
     fileRoot = '.'.join(fileName2.split('.')[:-1])
     
     inputGraph = '/tmp/{1}_{0}.gml'.format(graphType,fileRoot)
     with open(os.devnull,'r') as f:
         result = call(['gml2gv',inputGraph],stdout=f)
     return result
Ejemplo n.º 2
0
def getGraphMeasures(fileName):
    contactmapName = console.generateGraph(fileName,'contactmap')
    processName = console.generateGraph(fileName,'process')