Learn R Programming

karyotapR (version 1.0.1)

runClustering: Cluster 2D data

Description

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,
  ...
)

Value

TapestriExperiment object with updated colData containing cluster assignments.

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().

See Also

dbscan::dbscan()

Examples

Run this code
tap.object <- newTapestriExperimentExample() # example TapestriExperiment object
tap.object <- runPCA(tap.object, alt.exp = "alleleFrequency")
tap.object <- runUMAP(tap.object, pca.dims = 1:3)
tap.object <- runClustering(tap.object, dim.reduction = "UMAP", eps = 0.8)

Run the code above in your browser using DataLab