View source: R/pathway-clustering-functions.R
cluster_jaccard | R Documentation |
This function performs hierarchical clustering on gene sets (pathways) based on the Jaccard similarity of their gene members.
It subsets pathways from the supplied pathway_table
using the specified contrast, computes the similarity matrix,
performs hierarchical clustering, and generates a dendrogram saved as a PDF. The function then annotates the pathways with cluster information
(using annotate_clusters()
) and writes the result to a specified worksheet in an openxlsx
workbook via add_table_to_workbook()
.
cluster_jaccard(contrast, contrast_color, wb, pathway_table)
contrast |
A character string specifying the contrast (e.g., |
contrast_color |
A character string representing the tab color (as a hex code, e.g., |
wb |
A workbook object created by |
pathway_table |
A |
The dendrogram is saved as a PDF in the "Results/GSEA_preranked/pathways"
directory relative to the project root.
A data.table
containing the pathways annotated with cluster information.
compute_jaccard_similarity
, annotate_clusters
, add_table_to_workbook
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.