Learn R Programming

pathfindR (version 1.3.0)

cluster_pathways: Cluster Pathways

Description

Cluster Pathways

Usage

cluster_pathways(enrichment_res, method = "hierarchical",
  kappa_threshold = 0.35, plot_clusters_graph = TRUE,
  use_names = FALSE, use_active_snw_genes = FALSE,
  hclu_method = "average", plot_hmap = FALSE, plot_dend = FALSE)

Arguments

enrichment_res

data frame of pathway enrichment results (result of `run_pathfindR`)

method

Either "hierarchical" or "fuzzy". Details of clustering are provided in the corresponding functions.

kappa_threshold

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

plot_clusters_graph

boolean value indicate whether or not to plot the graph diagram of clustering results (default = TRUE)

use_names

boolean to indicate whether to use pathway names instead of IDs (default = FALSE, i.e. use IDs)

use_active_snw_genes

boolean to indicate whether or not to use non-input active subnetwork genes in the calculation of kappa statistics (default = FALSE, i.e. use only affected genes)

hclu_method

the agglomeration method to be used (default = "average", see `?hclust`)

plot_hmap

boolean to indicate whether to plot the kappa statistics heatmap or not (default = FALSE)

plot_dend

boolean to indicate whether to plot the clustering dendrogram partitioned into the optimal number of clusters (default = TRUE)

Value

a data frame of clustering results. For "hierarchical", the cluster assignments (Cluster) and whether the term is representative of its cluster (Status) is added as columns. For "fuzzy", terms that are in multiple clusters are provided for each cluster. The cluster assignments (Cluster) and whether the term is representative of its cluster (Status) is added as columns.

See Also

See hierarchical_pw_clustering for hierarchical clustering of enriched terms. See fuzzy_pw_clustering for fuzzy clustering of enriched terms.

Examples

Run this code
# NOT RUN {
example_clustered <- cluster_pathways(RA_output[1:3,], plot_clusters_graph = FALSE)
example_clustered <- cluster_pathways(RA_output[1:3,],
method = "fuzzy", plot_clusters_graph = FALSE)

# }

Run the code above in your browser using DataLab