downsampleListSeuObjsPercent: Downsample a List of Seurat Objects to a Fraction

View source: R/Seurat.Utils.R

downsampleListSeuObjsPercentR Documentation

Downsample a List of Seurat Objects to a Fraction

Description

Downsampling a list of Seurat objects to a specified fraction of their original size. This is useful for reducing dataset size for quicker processing or testing workflows.

Usage

downsampleListSeuObjsPercent(
  ls.obj = ls.Seurat,
  fraction = 0.1,
  seed = 1989,
  save_object = FALSE
)

Arguments

ls.obj

List of Seurat objects to be downsampled. Default: ls.Seurat.

fraction

Fraction of cells to retain in each Seurat object. Default: 0.1.

save_object

Logical indicating whether to save the downsampled Seurat objects using isaveRDS or return them. Default: FALSE.

Examples

## Not run: 
if (interactive()) {
  downsampled_objs <- downsampleListSeuObjsPercent(ls.obj = yourListOfSeuratObjects, fraction = 0.1)
}

## End(Not run)


vertesy/Seurat.utils documentation built on Dec. 4, 2024, 5:20 p.m.