Learn R Programming

richCluster (version 1.0.2)

cluster: Cluster Terms from Enrichment Results

Description

This function performs clustering on enrichment results by integrating gene similarity scores and various clustering strategies.

Usage

cluster(
  enrichment_results,
  df_names = NULL,
  min_terms = 5,
  min_value = 0.1,
  distance_metric = "kappa",
  distance_cutoff = 0.5,
  linkage_method = "average",
  linkage_cutoff = 0.5
)

Value

A named list containing: - `distance_matrix`: The distance matrix used in clustering. - `clusters`: The final clusters. - `df_list`: The original list of enrichment result dataframes. - `merged_df`: The merged dataframe containing combined results. - `cluster_options`: A list of clustering parameters used in the analysis. - `df_names` (optional): The names of the input dataframes if provided.

Arguments

enrichment_results

A list of dataframes, each containing enrichment results. Each dataframe should include at least the columns 'Term', 'GeneID', and 'Padj'.

df_names

Optional, a character vector of names for the enrichment result dataframes. Must match the length of `enrichment_results`. Default is `NULL`.

min_terms

Minimum number of terms each final cluster must include

min_value

Minimum 'Pvalue' a term must have in order to be counted in final clustering

distance_metric

A string specifying the distance metric to use (e.g., "kappa").

distance_cutoff

A numeric value for the distance cutoff (0 < cutoff <= 1).

linkage_method

A string specifying the linkage method to use (e.g., "average"). Supported options are "single", "complete", "average", and "ward".

linkage_cutoff

A numeric value between 0 and 1 for the membership cutoff.