can i specify x,y coordinates for nodes to layout my network?

150 views
Skip to first unread message

Dashun

unread,
Oct 24, 2009, 10:21:17 PM10/24/09
to cytoscape-helpdesk
Hello,

I'm new to cytoscape and wonder if I can specify all the x,y
coordinates for the nodes to layout the network. like load a node
attribute table that contains three columns: node x y ?

thanks

Dashun

jdime

unread,
Oct 26, 2009, 12:08:45 PM10/26/09
to cytoscape-helpdesk
One way is use the *.gml format. You need to know where the nodes
should be drawn and load it into Cytocape instead the regular *.sif
file:
=>Load network from multiple formats.

The *.gml looks like:
++++++++++++++
Creator "Cytoscape"
Version 1.0
graph [
node [
root_index -270
id -270
graphics [
x -1038.4063720703125
y 320.9196472167969
w 30.0
h 30.0
fill "#cccccc"
type "ellipse"
outline "#ffffff"
outline_width 0.10000000149011612
]
label "fabA__b0954__JW0937"
]
node [
root_index -269
id -269
graphics [
x -1044.76318359375
y 361.4869384765625
w 30.0
h 30.0
fill "#cccccc"
type "ellipse"
outline "#ffffff"
outline_width 0.10000000149011612
]
label "birA__b3973__JW3941"
]
... ETCETERA
And then edges are defined like:

edge [
root_index -4576
target -282
source -301
graphics [
width 1.0
fill "#ffcccc"
type "line"
Line [
]
source_arrow 0
target_arrow 0
]
label "combined_score_string"
]
]
++++++++++++++

Best,

Javier.
Reply all
Reply to author
Forward
0 new messages