Graph Visualization of Clustered Enriched Terms

cluster_graph_vis(
  clu_obj,
  kappa_mat,
  enrichment_res,
  kappa_threshold = 0.35,
  use_description = FALSE
)

Arguments

clu_obj

clustering result (either a matrix obtained via hierarchical_term_clustering or fuzzy_term_clustering `fuzzy_term_clustering` or a vector obtained via `hierarchical_term_clustering`)

kappa_mat

matrix of kappa statistics (output of create_kappa_matrix)

enrichment_res

data frame of pathfindR enrichment results. Must-have columns are "Term_Description" (if use_description = TRUE) or "ID" (if use_description = FALSE), "Down_regulated", and "Up_regulated". If use_active_snw_genes = TRUE, "non_Signif_Snw_Genes" must also be provided.

kappa_threshold

threshold for kappa statistics, defining strong relation (default = 0.35)

use_description

Boolean argument to indicate whether term descriptions (in the "Term_Description" column) should be used. (default = FALSE)

Value

Plots a graph diagram of clustering results. Each node is an enriched term from `enrichment_res`. Size of node corresponds to -log(lowest_p). Thickness of the edges between nodes correspond to the kappa statistic between the two terms. Color of each node corresponds to distinct clusters. For fuzzy clustering, if a term is in multiple clusters, multiple colors are utilized.

Examples

if (FALSE) {
cluster_graph_vis(clu_obj, kappa_mat, enrichment_res)
}