obtain graphNEL from ontology_plot instance of ontologyPlot
Source:R/graphNEL.R
make_graphNEL_from_ontology_plot.Rdobtain graphNEL from ontology_plot instance of ontologyPlot
Examples
requireNamespace("Rgraphviz")
requireNamespace("graph")
clcon <- retrieve_semsql_conn("cl")
cl <- semsql_to_oi(clcon)
#> Warning: Some parent terms not found: BFO:0000002, BFO:0000004, SO:0000704 (15 more)
cl3k <- c(
"CL:0000492", "CL:0001054", "CL:0000236", "CL:0000625",
"CL:0000576", "CL:0000623", "CL:0000451", "CL:0000556"
)
p3k <- ontologyPlot::onto_plot(cl, cl3k)
gnel <- make_graphNEL_from_ontology_plot(p3k)
gnel <- improve_nodes(gnel, cl)
graph::graph.par(list(nodes = list(shape = "plaintext", cex = .8)))
gnel <- Rgraphviz::layoutGraph(gnel)
Rgraphviz::renderGraph(gnel)