cnetplot enrichment graph to cytoscape
0
0
Entering edit mode
11 months ago

Hello everyone

I am trying to save graph (network) from cnetplot after enrichment analysis in clusterProfiler package. I want to develop network in cytoscape from saved network file.

> cnt_enrichment <- enrichplot::cnetplot(formula_res, circular = TRUE, colorEdge = TRUE,cex_label_gene = 0.5, cex_label_category =2,fixed=FALSE)

> attributes(cnt_enrichment)
$names
[1] "data"        "layers"      "scales"      "mapping"     "theme"      
[6] "coordinates" "facet"       "plot_env"    "labels"     

$class
[1] "ggraph" "gg"     "ggplot"

Next, tried to export edge information from object.

> library(igraph)
 Edata <- as.data.frame(get.edgelist(cnt_enrichment))
 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)

Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': Not a graph object

I would appreciate all suggestion.

Thanks !!

clusterprofiler cnetplot enrichplot • 407 views
ADD COMMENT

Login before adding your answer.

Traffic: 2658 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6