Skip to contents

This function applies HDBSCAN, a density-based clustering algorithm, to the corrected dimension reduction of a Seurat object.

Usage

hdbscan.seurat(
  seu,
  batch.var = "Batch",
  reduction = "pca",
  dims = seq_len(15),
  minPts = 25
)

Arguments

seu

A Seurat object containing integrated or batch-corrected data (e.g. PCA results).

batch.var

Character string specifying the metadata column that contains batch information. Default is "Batch".

reduction

Character string specifying the name of the dimension reduction to use (e.g. "PCA"). Default is "PCA".

dims

Numeric vector indicating the dimensions to be used for initial clustering. Default is 1:15.

minPts

Integer specifying the minimum number of points required to form a cluster. This value is passed to the hdbscan function. Default is 25.

Value

A Seurat object with two additional columns in its meta.data: dbscan_cluster and initial_cluster.

See also