Exporting a Large Graph + Node Coordinates

370 views
Skip to first unread message

JVertrees

unread,
Feb 5, 2009, 9:10:45 PM2/5/09
to cytoscape-helpdesk
Hello,

I'm new to Cytoscape and am amazed by its capabilities. My
application involves very large graphs. My small graph has about
45,000 nodes and 60,000 edges; the large graph has about 1.3 million
nodes and 13 million edges. I would like to export the small graph to
a PNG, or any intermediate format that can end up as a PNG. When I do
this for the small graph, Cytoscape, I guess, runs out of memory
(system specs at the end). Is there some way to convert large graphs
to PNG files? When I can get it to work, by limiting the scaling, the
graph is so large in relation to the outputted file that I cannot read
any node labels.

My second question is, now that I've exported the file to PNG, can I
get the XY coordinates for each entry in the graph? So, if my PNG
file is 35,000 x 35,000 pixels, I'd like to have a list of (NodeName,
X, Y) for each node in the graph such that X,Y is the coordinate on
the exported image.

The system I'm working on is a Dual QuadCore (8 cores) x86-64 with 4
GB RAM, and a Quadro card, running openSuse 11.1.

Thanks,

-- Jason

piet molenaar

unread,
Feb 6, 2009, 6:22:36 AM2/6/09
to cytoscape...@googlegroups.com
Hi Jason,
I don't know by heart whether this is possible; seems quite ambitious to show all details for 45000 nodes, but I've contacted the developer who was involved in this.
Come back to it later,
Cheers,
Piet
--
Piet Molenaar
p.mol...@amc.uva.nl
Department of Human Genetics, M1-131
Academic Medical Center
University of Amsterdam
Meibergdreef 9
1105 AZ Amsterdam
the Netherlands

tel (+31) 20-5666592
fax (+31) 20-6918626

Mike Smoot

unread,
Feb 6, 2009, 4:08:48 PM2/6/09
to cytoscape...@googlegroups.com
Hi Jason,

You should be able to export your small graph as PNG once you give java enough memory to run.  You'll just need to edit the cytoscape.sh file and change:

java -Dswing.aatext=true -Xss5M -Xmx512M -jar cytoscape.jar cytoscape.CyMain -p plugins  "$@"
to
java -Dswing.aatext=true -Xss5M -Xmx3G -jar cytoscape.jar cytoscape.CyMain -p plugins  "$@"

You'll need to experiment with the proper number here.  You might only need 2G and you might need 5G, it's hard to say. 

Unfortunately, I don't think you'll be able to load, let alone render as PNG, your large graph.  Right now I'd put the upper limit of Cytoscape's capability at somewhere around 1 million TOTAL nodes and edges and even that would require nice hardware to run decently.   The only systems I've seen capable of rendering networks that large are specialized programs written in postscript.

As for extracting XY coordinates, your best bet is to export the network as either XGMML or GML.  Both will have XY coordinates in the graphics element of each format.  While not precisely the format you want, it should be pretty easy to parse out the positions.  Then it's up to you to map those coordinates to the PNG, but that shouldn't be too hard.


thanks,
Mike
--
____________________________________________________________
Michael Smoot, Ph.D.               Bioengineering Department
tel: 858-822-4756         University of California San Diego
Reply all
Reply to author
Forward
0 new messages