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