View source: R/network_visualization.R
detect_communities | R Documentation |
Detect communities in a network
detect_communities(edgelist, method = igraph::cluster_infomap, directed = TRUE)
edgelist |
Data frame containing the network as an edge list. First column must be node 1 and second column must be node 2. Additional columns will be interpreted as edge attributes and will be modified by this function. |
method |
igraph function to be used for community detection. Available functions are cluster_infomap, cluster_edge_betweenness, cluster_fast_greedy, cluster_walktrap, cluster_spinglass, cluster_leading_eigen, cluster_louvain, and cluster_label_prop. Default is cluster_infomap. |
directed |
Logical indicating whether the network is directed (GRN only) or not (GCN and PPI networks). Default: TRUE. |
A data frame containing node names in the first column, and communities to which nodes belong in the second column.
Fabricio Almeida-Silva
cluster_infomap
,
cluster_edge_betweenness
,
cluster_fast_greedy
,
cluster_walktrap
,
cluster_spinglass
,
cluster_leading_eigen
,
cluster_louvain
,
cluster_label_prop
data(filt.se)
tfs <- sample(rownames(filt.se), size=50, replace=FALSE)
grn_edges <- grn_infer(filt.se, method = "clr", regulators = tfs)
com <- detect_communities(grn_edges, directed=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.