Ejemplo n.º 1
0
def load_network(net_file,name):
    server = connect_server("http://localhost:9000")
    cytoscape = server.Cytoscape
    title = name
    if cytoscape.hasCurrentNetwork() == True:
        old_id = cytoscape.getNetworkID()
        cytoscape.destroyNetwork(old_id)
        cytoscape.createNetwork(title)
    else:
        cytoscape.createNetwork(title)
    network = Cyto()
    network.load(net_file)
    return network, cytoscape
def load_network(file,name):
    network = Cyto()
    network.load(file)
    network.name = name
    return network
Ejemplo n.º 3
0
def load_network(file, name):
    network = Cyto()
    network.load(file)
    network.name = name
    return network
Ejemplo n.º 4
0
        elif connections == 2:
            cytoscape.setNodeFillColor(id, [node], 0, 255, 0)
        elif connections > 2:
            cytoscape.setNodeFillColor(id, [node], 0, 0, 255)


server = connect_server("http://localhost:9000")
cytoscape = server.Cytoscape
title = "bHLH"

if cytoscape.hasCurrentNetwork() == True:
    old_id = cytoscape.getNetworkID()
    cytoscape.destroyNetwork(old_id)
    cytoscape.createNetwork(title)
else:
    cytoscape.createNetwork(title)

network = Cyto()
network.load(options.net_in)
nodes = network.nodes.keys()
from_nodes, to_nodes = network.edges()
cytoscape.createNodes(nodes)
cytoscape.createEdges(from_nodes, to_nodes)
#cytoscape.performDefaultLayout()
cytoscape.performLayout("force-directed")
id = cytoscape.getNetworkID()
scale_nodesize(range(1, 50, 2), id)
set_color(id)

#cytoscape.setLayoutPropertyValues("kamada-kawai-noweight")
Ejemplo n.º 5
0
        elif connections == 2:
            cytoscape.setNodeFillColor(id,[node], 0,255,0)
        elif connections > 2:
            cytoscape.setNodeFillColor(id,[node],0,0,255)

server = connect_server("http://localhost:9000")
cytoscape = server.Cytoscape
title = "bHLH"

if cytoscape.hasCurrentNetwork() == True:
    old_id = cytoscape.getNetworkID()
    cytoscape.destroyNetwork(old_id)
    cytoscape.createNetwork(title)
else:
    cytoscape.createNetwork(title)

network = Cyto()
network.load(options.net_in)
nodes = network.nodes.keys()
from_nodes, to_nodes = network.edges()
cytoscape.createNodes(nodes)
cytoscape.createEdges(from_nodes, to_nodes)
#cytoscape.performDefaultLayout()
cytoscape.performLayout("force-directed")
id = cytoscape.getNetworkID()
scale_nodesize(range(1,50,2),id)
set_color(id)


#cytoscape.setLayoutPropertyValues("kamada-kawai-noweight")