RCy3 - Displaying barchart graphics on top of the nodes based on values

21 views
Skip to first unread message

Márton Ölbei

unread,
Aug 17, 2018, 7:59:04 AM8/17/18
to cytoscape-helpdesk
Hi,

I'm very new to RCy3, but I'm really enjoying it so far. However, I came across something I cannot find the answer to: is there an RCy3 function that would allow me to set up and cutomize the "Image/Chart 1" visual style? 

I would like to show expression values on top of the nodes as bar charts, for a lot of small subnetworks.

Thanks,
Marton

Alex Pico

unread,
Aug 17, 2018, 2:36:52 PM8/17/18
to cytoscape-helpdesk
Hi Marton,

You found one of the few functions not yet implemented in RCy3. I’ve added your request to the issue tracker to prioritize adding this one next:

 - Alex



--
You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.
To post to this group, send email to cytoscape...@googlegroups.com.
Visit this group at https://groups.google.com/group/cytoscape-helpdesk.
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-helpdesk/3ed67f51-27a7-4f1e-ae7e-3f4cec72214a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alex Pico

unread,
Aug 17, 2018, 10:39:31 PM8/17/18
to cytoscape-helpdesk
Marton,

In the meantime, here’s how you’d do it using setVisualPropertyDefault().  Obviously, I’d like to create a dedicated function to make this easier to use, but this should work in the meantime:


style.name = 'default'
barchart =  list(cyrange = c(-2.426,3.126), cy_colors = c("#FF00FF","#8000FF","#00FF00"),cy_dataColumns = c("gal1RGexp","gal4RGexp","gal80Rexp"))
style.string = list(visualProperty = "NODE_CUSTOMGRAPHICS_1", value = paste("org.cytoscape.BarChart",toJSON(barchart),sep = ":"))
setVisualPropertyDefault(style.string, style.name)

You need to specify the min and max values in ‘cyrange’ and then pair the colors and columns you want in “cy_colors” and “cy_dataColumns”.  Keep everything else the same and it should set the "Image/Chart 1” in the default style. Ah, and you’ll be to install/library the RJSONIO package for toJSON().

Cheers,
 - Alex


Reply all
Reply to author
Forward
0 new messages