Filter some modules as others

Combine or cut modules to module_number

Plot module tree

filter_n_module(go_m, n_node_in_module = 0, keep_id = NULL, delete = FALSE)

combine_n_module(go_m, module_number = 5)

plot_module_tree(go_m, module = "module", community = NULL, label.size = 2)

Arguments

go_m

module metanet

n_node_in_module

transfer the modules less than n_node_in_module to "others"

keep_id

keep modules ids, will not be "others"

delete

logical, delete others modules? default:FALSE, the others module will be "others".

module_number

number of modules

module

which column name is module. default: "module"

community

community object, default: NULL, use the community of go_m

label.size

label.size

Value

metanet with modules

ggplot

Examples

data("c_net")
module_detect(co_net) -> co_net_modu
filter_n_module(co_net_modu, n_node_in_module = 30) -> co_net_modu
if (requireNamespace("ggtree") && requireNamespace("treeio")) plot_module_tree(co_net_modu)
#> Loading required namespace: ggtree
combine_n_module(co_net_modu, 20) -> co_net_modu1
if (requireNamespace("ggtree") && requireNamespace("treeio")) plot_module_tree(co_net_modu1)
#> Loading required namespace: ggtree