Estimate simulation parameters for the SparseDC simulation from a real dataset.
sparseDCEstimate(counts, conditions, nclusters, norm = TRUE, params = newSparseDCParams()) # S3 method for SingleCellExperiment sparseDCEstimate(counts, conditions, nclusters, norm = TRUE, params = newSparseDCParams()) # S3 method for matrix sparseDCEstimate(counts, conditions, nclusters, norm = TRUE, params = newSparseDCParams())
counts | either a counts matrix or an SingleCellExperiment object containing count data to estimate parameters from. |
---|---|
conditions | numeric vector giving the condition each cell belongs to. |
nclusters | number of cluster present in the dataset. |
norm | logical, whether to library size normalise counts before estimation. Set this to FALSE if counts is already normalised. |
params | PhenoParams object to store estimated values in. |
SparseParams object containing the estimated parameters.
The nGenes
and nCells
parameters are taken from the size of the
input data. The counts are preprocessed using
pre_proc_data
and then parameters are estimated using
sparsedc_cluster
using lambda values calculated using
lambda1_calculator
and
lambda2_calculator
.
See SparseDCParams
for more details on the parameters.
# Load example data library(scater) data("sc_example_counts") set.seed(1) conditions <- sample(1:2, ncol(sc_example_counts), replace = TRUE) params <- sparseDCEstimate(sc_example_counts[1:500, ], conditions, nclusters = 3) params#> A Params object of class SparseDCParams #> Parameters can be (estimable) or [not estimable], 'Default' or 'NOT DEFAULT' #> #> Global: #> (GENES) (CELLS) [Seed] #> 500 20 74391 #> #> 7 additional parameters #> #> Markers: #> (NUMBER) (SHARED) [Same] #> 1 1 FALSE #> #> Clusters: #> (CONDITION 1) (CONDITION 2) #> 1, 2, 3 1, 2, 3 #> #> Means: #> [Lower] [Upper] #> 1 2 #>