BASiCSEstimate: Estimate BASiCS simulation parameters

Description Usage Arguments Details Value Examples

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
BASiCSEstimate(counts, spike.info = NULL, batch = NULL, n = 20000,
  thin = 10, burn = 5000, regression = TRUE,
  params = newBASiCSParams(), verbose = TRUE, progress = TRUE, ...)

## S3 method for class 'SingleCellExperiment'
BASiCSEstimate(counts, spike.info = NULL,
  batch = NULL, n = 20000, thin = 10, burn = 5000,
  regression = TRUE, params = newBASiCSParams(), verbose = TRUE,
  progress = TRUE, ...)

## S3 method for class 'matrix'
BASiCSEstimate(counts, spike.info = NULL,
  batch = NULL, n = 20000, thin = 10, burn = 5000,
  regression = TRUE, params = newBASiCSParams(), verbose = TRUE,
  progress = TRUE, ...)

Arguments

counts

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

spike.info

data.frame describing spike-ins with two columns: "Name" giving the names of the spike-in features (must match rownames(counts)) and "Input" giving the number of input molecules.

batch

vector giving the batch that each cell belongs to.

n

total number of MCMC iterations. Must be >= max(4, thin) and a multiple of thin.

thin

thining period for the MCMC sampler. Must be >= 2.

burn

burn-in period for the MCMC sampler. Must be in the range 1 <= burn < n and a multiple of thin.

regression

logical. Whether to use regression to identify over-dispersion. See BASiCS_MCMC for details.

params

BASiCSParams object to store estimated values in.

verbose

logical. Whether to print progress messages.

progress

logical. Whether to print additional BASiCS progress messages.

...

Optional parameters passed to BASiCS_MCMC.

Details

This function is just a wrapper around BASiCS_MCMC that takes the output and converts it to a BASiCSParams object. Either a set of spike-ins or batch information (or both) must be supplied. If only batch information is provided there must be at least two batches. See BASiCS_MCMC for details.

Value

BASiCSParams object containing the estimated parameters.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
# Load example data
library(scater)
data("sc_example_counts")

spike.info <- data.frame(Name = rownames(sc_example_counts)[1:10],
                         Input = rnorm(10, 500, 200),
                         stringsAsFactors = FALSE)
params <- BASiCSEstimate(sc_example_counts[1:100, 1:30],
                         spike.info)
params

## End(Not run)

Granoia/splatter-mod documentation built on May 28, 2019, 12:31 a.m.