BASiCS_DivideAndConquer {BASiCS} | R Documentation

## Run divide and conquer MCMC with BASiCS

### Description

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

### Usage

    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

     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
     )

[Package BASiCS version 2.2.4 Index]