Skip to contents

Clusters data using dbscan method and saves cluster assignments for each cell barcode to colData. Generally used to assign clusters to UMAP projection after PCA and UMAP dimensional reduction.

Usage

runClustering(
  TapestriExperiment,
  alt.exp = "alleleFrequency",
  dim.reduction = "UMAP",
  eps = 0.8,
  dim.1 = 1,
  dim.2 = 2,
  ...
)

Arguments

TapestriExperiment

TapestriExperiment object

alt.exp

Character, altExp slot to use. NULL uses top-level/main experiment. Default "alleleFrequency".

dim.reduction

Character, reduced dimension data to use. Default "UMAP".

eps

Numeric, dbscan eps parameter. Lower to increase cluster granularity. See dbscan::dbscan(). Default 0.8.

dim.1

Numeric, index of data dimension to use. Default 1.

dim.2

Numeric, index of data dimension to use. Default 2.

...

Additional parameters to pass to dbscan::dbscan().

Value

TapestriExperiment object with updated colData containing cluster assignments.

See also

Examples

tap.object <- newTapestriExperimentExample() # example TapestriExperiment object
#>  Moving gRNA probe  to `altExp` slot "grnaCounts".
#>  Moving barcode probe  to `altExp` slot "barcodeCounts".
#>  Moving chrY probe(s) probe_231, probe_232, probe_233, probe_234, probe_235, probe_236, probe_237, probe_238, probe_239, and probe_240 to `altExp` slot "chrYCounts".
tap.object <- runPCA(tap.object, alt.exp = "alleleFrequency")
tap.object <- runUMAP(tap.object, pca.dims = 1:3)
#>  Running UMAP on: alleleFrequency.
tap.object <- runClustering(tap.object, dim.reduction = "UMAP", eps = 0.8)
#>  Finding clusters in: alleleFrequency UMAP