This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Exporting cnetplot and emapplot to cytoscape

Hey guys, I'm trying to export the graphical results of cnetplot (clusterProfiler, ReactomePA) to external platforms (such as Cytoscape). Despite I've generated the data, I have no idea how can I straightforward do a similar figure since the results don't present the source and target information to get the network. Thank you for your help!

r clusterprofiler reactomepa

Did you try the recommendation from the package author? While the documentation is often less clear than one would hope for, I think, this is the piece that they were referring to:

library(igraph)
Edata <- as.data.frame(get.edgelist(g))
Edata$edgewidth <- E(g)$width
Vdata <- data.frame(pathway=V(g)$name, color=V(g)$color)
 map_data <- list(edge_data=Edata, vertex_data=Vdata)

That snippet is taken from a legacy github repo for doseplot; I'm not 100% sure how to generate the object named g; my hope would be that enricher() or the other functions (e.g. enrichGO) produce objects that are compatible with this.

Have you managed to find a solution? I am trying to do the same thing but haven't found a reproducible way yet!

0 answers

No answers yet.

Log in to answer this question.