Error while loading a big file with Cytoscape I installed Cytoscape 3.7.1 with java 1.8.0_191 in windows server 2012. I have a 7.4 GB csv file (about 1,500,000 reords) and when I tried to load it into the Cytoscape it throws an error java.lang.OutOfMemoryErroe:Java heap space.

My system has 500GB ram and then I changed Cytoscape.vmoptions file according to -Xms102400M but when I load my file, in task manager, the memory increased until 50GB and then Cytoscape crashed and again it threw the same error: java.lang.OutOfMemoryErroe:Java heap space.

My data is like this sample:

45677888,test1,3453453453,test2,3534523453,235412352,3453452345,test3,235423452,test4,1980/09/02,14:13,23523525,test5
45234288,test11,34234553453,test12,353434534553,23453452352,342422345,test13,23456543452,test14,1980/04/01,14:12,2323423425,test15
4243424888,test12,3235253453,test22,3533456343453,233534532352,2343452345,test33,23345342,test44,1980/03/4,14:11,23674575,test55


My file is in CSV format. col2 is source node, col1 and col3 are attributes for source node,col 4 is destination node, col5,col6,col7 are attributes for destination node, col8 until end are attributes for edge. I have about 200,000 nodes and 230000 edges.

How can I read this file in Cytoscape?
The first thing you can try is to separate the network from the meta information. Assuming you have access to a *nix machine, you can run:

awk -F"," '{print $2,$4}' file.csv &gt; network.csv


That will produce a file like this (based on your example data):

test1 test2
test11 test12
test12 test22


That should radically decrease the file size and will give you the best chance of loading it in Cytoscape. You can then similarly extract the attributes:

awk -F"," '{print $2,$1}' file.csv &gt; source.column1.attributes
awk -F"," '{print $2,$3}' file.csv &gt; source.column3.attributes
awk -F"," '{print $4,$5}' file.csv &gt; target.column5.attributes
awk -F"," '{print $4,$6}' file.csv &gt; target.column6.attributes
awk -F"," '{print $4,$7}' file.csv &gt; target.column7.attributes
awk -F',' '{print $2,$4,$8}' file.csv &gt; edge.column8.attributes
awk -F',' '{print $2,$4,$9}' file.csv &gt; edge.column9.attributes
awk -F',' '{print $2,$4,$10}' file.csv &gt; edge.column10.attributes
awk -F',' '{print $2,$4,$11}' file.csv &gt; edge.column11.attributes
awk -F',' '{print $2,$4,$12}' file.csv &gt; edge.column12.attributes
awk -F',' '{print $2,$4,$13}' file.csv &gt; edge.column13.attributes
awk -F',' '{print $2,$4,$14}' file.csv &gt; edge.column14.attributes


Now, try loading network.csv into Cytoscape and then load each of the node and edge attributes separately. 



However, a network with 200,000 nodes and 230,000 edges is just too large to be able to manipulate in any useful way in a GUI. It will just look like a horrible hairball. I really urge you to do some preprocessing and pare the network down to something more manageable. I used to work with a human PPI network of ~13000 nodes and ~15000 edges. While I could load that into Cytoscape, that was already far too big to be able to do anything useful with. I could use the data analysis aspects of Cytoscape, but not really the visualization.