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

lunEstimate(counts, params = newLunParams())

# S3 method for SingleCellExperiment
lunEstimate(counts,
  params = newLunParams())

# S3 method for matrix
lunEstimate(counts, params = newLunParams())

Arguments

counts

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

params

LunParams object to store estimated values in.

Value

LunParams object containing the estimated parameters.

Details

The nGenes and nCells parameters are taken from the size of the input data. No other parameters are estimated. See LunParams for more details on the parameters.

Examples

# Load example data library(scater)
#> Loading required package: ggplot2
#> #> Attaching package: ‘scater’
#> The following object is masked from ‘package:S4Vectors’: #> #> rename
#> The following object is masked from ‘package:stats’: #> #> filter
data("sc_example_counts") params <- lunEstimate(sc_example_counts) params
#> A Params object of class LunParams #> Parameters can be (estimable) or [not estimable], 'Default' or 'NOT DEFAULT' #> #> Global: #> (GENES) (CELLS) [Seed] #> 2000 40 74391 #> #> 9 additional parameters #> #> Mean: #> [Rate] [Shape] #> 2 2 #> #> Counts: #> [Dispersion] #> 0.1 #> #> Groups: #> [GROUPS] [GROUP CELLS] #> 1 40 #> #> Diff expr: #> [Genes] [Up Prop] [Up FC] [Down FC] #> 1000 0.5 5 0 #>