Skip to contents

Utilities

General utility functions.

hc_initialize()
Initialize AnnDatR object for gene clustering (genes as samples)

Workflows

Functions for complete, one-call workflows.

hc_auto_cluster()
One-call clustering pipeline

Clustering Pipeline

Functions for gene clustering.

hc_pca()
Perform PCA on AnnDatR object
hc_kaisers_rule()
Determine number of components using Kaiser's rule
hc_distance()
Compute distance matrix from PCA scores
hc_snn()
Compute Shared Nearest Neighbors (SNN) Graph
hc_cluster_consensus()
Consensus clustering of genes
hc_umap()
Create UMAP embeddings from SNN graph
hc_cluster_hulls()
Calculate UMAP cluster hulls

Clustering Evaluation

Functions for evaluating clustering results.

hc_cluster_stability()
Calculate ARI scores for multiple clustering seeds
hc_cluster_compare()
Compare clusters using hypergeometric test

Cluster Annotation

Functions for annotating clusters with functional databases.

hc_annotate()
Master annotation pipeline: download, load, and run all enrichments
hc_classify()
Perform sample category gene classification (HPA logic, sample-agnostic)

Visualization

Functions for visualizing clustering results.

hc_plot_umap()
Plot UMAP with clusters and hulls
hc_plot_expression()
Plot per-cluster heatmaps for scaled and z-score expression
theme_hc()
A simple theme for visualizations

Built in datasets

Datasets included with the package for demonstration and testing purposes.

example_adata
Human Protein Atlas Tissue Data (transposed and subsampled)