balanceSamples.Rd
Subsample cells in seurat object to be balanced (sample-size-wise) across conditions.
balanceSamples(object, group, balance.size = NA)
Seurat Object
Character specifying group (i.e., metadata field) to sub-sample within.
Numeric. Target sub sample size for each condition. If target exceeds number of available cells, only available cells are included. If unspecified, smallest-sized group is set as target (Default).
Seurat object
so.query <- balanceSamples(object = so.query, group = "Barcode")
#> Error in stopifnot(class(object) == "Seurat"): object 'so.query' not found