Estimate simulation parameters for the Lun2 simulation from a real dataset.

lun2Estimate(
  counts,
  plates,
  params = newLun2Params(),
  min.size = 200,
  verbose = TRUE,
  BPPARAM = SerialParam()
)

# S3 method for SingleCellExperiment
lun2Estimate(
  counts,
  plates,
  params = newLun2Params(),
  min.size = 200,
  verbose = TRUE,
  BPPARAM = SerialParam()
)

# S3 method for matrix
lun2Estimate(
  counts,
  plates,
  params = newLun2Params(),
  min.size = 200,
  verbose = TRUE,
  BPPARAM = SerialParam()
)

Arguments

counts

either a counts matrix or a SingleCellExperiment object containing count data to estimate parameters from.

plates

integer vector giving the plate that each cell originated from.

params

Lun2Params object to store estimated values in.

min.size

minimum size of clusters when identifying group of cells in the data.

verbose

logical. Whether to show progress messages.

BPPARAM

A BiocParallelParam instance giving the parallel back-end to be used. Default is SerialParam which uses a single core.

Value

LunParams object containing the estimated parameters.

Details

See Lun2Params for more details on the parameters.

Examples

if (FALSE) { # Load example data library(scater) set.seed(1) sce <- mockSCE() plates <- as.numeric(factor(colData(sce)$Mutation_Status)) params <- lun2Estimate(sce, plates, min.size = 20) params }