BASiCS_DivideAndConquer: Run divide and conquer MCMC with BASiCS

Description Usage Arguments Details Value References Examples

View source: R/BASiCS_DivideAndConquer.R

Description

Performs MCMC inference on batches of data. Data is divided into NSubsets batches, and BASiCS_MCMC is run on each batch separately.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
BASiCS_DivideAndConquer(
  Data,
  NSubsets = 5,
  SubsetBy = c("cell", "gene"),
  Alpha = 0.05,
  WithSpikes,
  Regression,
  BPPARAM = BiocParallel::bpparam(),
  PriorParam = BASiCS_PriorParam(Data, PriorMu = "EmpiricalBayes"),
  ...
)

Arguments

Data

SingleCellExperiemnt object

NSubsets

The number of batches to create and perform MCMC inference with.

SubsetBy

A character value specifying whether batches should consist of a subset of the cells in Data (when SubsetBy="cell") or a subset of the genes in Data (when SubsetBy="gene").

Alpha

A numeric value specifying the statistical significance level used to determine whether the average library size or average count are significantly different between batches.

WithSpikes, Regression, PriorParam

See BASiCS_MCMC.

BPPARAM

A BiocParallelParam instance.

...

Passed to BASiCS_MCMC. All arguments required by BASiCS_MCMC must be supplied here, for example N, Thin, Burn.

Details

Subsets are chosen such that the average library size (when partitioning by cells) or average count (when partitioning by genes) is not significantly different between batches, at a significance level Alpha.

Value

A list of BASiCS_Chain objects.

References

Simple, Scalable and Accurate Posterior Interval Estimation Cheng Li and Sanvesh Srivastava and David B. Dunson arXiv (2016)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 bp <- BiocParallel::SnowParam()
 Data <- BASiCS_MockSCE()
 BASiCS_DivideAndConquer(
   Data, 
   NSubsets = 2,
   SubsetBy = "gene",
   N = 8,
   Thin = 2,
   Burn = 4,
   WithSpikes = TRUE,
   Regression = TRUE,
   BPPARAM = bp
 )

BASiCS documentation built on April 16, 2021, 6 p.m.