Reorder the Modularity from graph object
Examples
data(ppi_example)
obj <- build_graph_from_df(
df = ppi_example$ppi,
node_annotation = ppi_example$annotation
)
current <- levels(get_graph_nodes(obj)$Modularity)
obj2 <- order_graph(obj, order = rev(current))
levels(get_graph_nodes(obj2)$Modularity)
#> [1] "Others" "22" "21" "20" "2" "19" "18" "17"
#> [9] "16" "15" "14" "13" "12" "11" "10" "1"
