This function uses sketching methods to downsample high-dimensional single-cell RNA expression data, which can help with scalability for large datasets.
SketchData(
object,
assay = NULL,
ncells = 5000L,
sketched.assay = "sketch",
method = c("LeverageScore", "Uniform"),
var.name = "leverage.score",
over.write = FALSE,
seed = 123L,
cast = "dgCMatrix",
verbose = TRUE,
...
)
A Seurat object with the sketched data added as a new assay.
A Seurat object.
Assay name. Default is NULL, in which case the default assay of the object is used.
A positive integer indicating the number of cells to sample for the sketching. Default is 5000.
Sketched assay name. A sketch assay is created or overwrite with the sketch data. Default is 'sketch'.
Sketching method to use. Can be 'LeverageScore' or 'Uniform'. Default is 'LeverageScore'.
A metadata column name to store the leverage scores. Default is 'leverage.score'.
whether to overwrite existing column in the metadata. Default is FALSE.
A positive integer for the seed of the random number generator. Default is 123.
The type to cast the resulting assay to. Default is 'dgCMatrix'.
Print progress and diagnostic messages
Arguments passed to other methods