Estimate simulation parameters for the Kersplat simulation from a real dataset. See the individual estimation functions for more details on how this is done.

kersplatEstimate(counts, params = newKersplatParams(), verbose = TRUE)

# S3 method for SingleCellExperiment
kersplatEstimate(counts, params = newKersplatParams(), verbose = TRUE)

# S3 method for matrix
kersplatEstimate(counts, params = newKersplatParams(), verbose = TRUE)

Arguments

counts

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

params

KersplatParams object to store estimated values in.

verbose

logical. Whether to print progress messages.

Value

KersplatParams object containing the estimated parameters.

See also

Examples

if (requireNamespace("igraph", quietly = TRUE)) { # Load example data library(scater) set.seed(1) sce <- mockSCE() params <- kersplatEstimate(sce) params }
#> Loading required package: ggplot2
#> Warning: The Kersplat simulation is still experimental and may produce unreliable results. Please try it and report any issues to https://github.com/Oshlack/splatter/issues. The development version may have improved features.
#> Estimating mean parameters...
#> Selected MGE (CvM) fit
#> Estimating expression outlier parameters...
#> Estimating BCV parameters...
#> Raw: 2.6081737071714 A: 8.12109336156054 B: 1.31905414419672 C: -8.4603750374735 Y: 1.36293824634938
#> Estimating library size parameters...
#> Selected MGE (CvM) fit
#> A Params object of class KersplatParams #> Parameters can be (estimable) or [not estimable], 'Default' or 'NOT DEFAULT' #> Secondary parameters are usually set during simulation #> #> Global: #> (GENES) (CELLS) [Seed] #> 2000 200 121054 #> #> 24 additional parameters #> #> Mean: #> (RATE) (SHAPE) (OUT PROB) #> 0.00272354467142995 0.475100032448728 0 #> (Out Location) (Out Scale) (DENSITY) #> 4 0.5 Object of class density #> [Method] [Values] #> fit Not set #> #> BCV: #> (COMMON DISP) [DoF] #> 1.11818764383749 60 #> #> Network: #> [Graph] [nRegs] [regsSet] #> Not set 100 FALSE #> #> Paths: #> [nPrograms] [Means] #> 10 Not set #> #> [Design] #> data.frame (1 x 3) with columns: Path, From, Steps #> Path From Steps #> 1 1 0 100 #> #> Library size: #> (LOCATION) (SCALE) (DENSITY) #> 12.7854772402738 0.0327578186101294 Object of class density #> [Method] #> fit #> #> Cells: #> #> [Design] #> data.frame (1 x 4) with columns: Path, Probability, Alpha, Beta #> Path Probability Alpha Beta #> 1 1 1 1 0 #> #> Doublets: #> [Prop] #> 0 #> #> Ambient: #> [Scale] [Empty] #> 0.05 0 #>