Network image from Cytoscape to R

32 views Asked by At

I've made several netweorks using Cytoscape and want to combine them into one labeled plot grid (A, B, C, D) to use for publication later. Is there a way to do this with RCy3?

I tried to save the documentation's createNetworkFromDataFrames example as a variable as follows:

d1 <- createNetworkFromDataFrames(nodes,edges, title="my first network", collection="DataFrame Example")

But d1 wasn't saved as a plot but as this instead:

networkSUID 31915

Edit: I managed to import the images with magick package and got what I wanted. Still, any answers on this particular point would be appreciated for future reference.

1

There are 1 answers

1
Scooter Morris On

Right, you created the network in Cytoscape and you got back the SUID of the created network. What you now want to do is to export the image of the network. Take a look at the exportPNG method, which will allow you to write the image to a file and then you can bring it in to R.