BASiCS_Draw: Generate a draw from the posterior of BASiCS using the...

View source: R/BASiCS_Draw.R

BASiCS_DrawR Documentation

Generate a draw from the posterior of BASiCS using the generative model.

Description

BASiCS_Draw creates a simulated dataset from the posterior of a fitted model implemented in BASiCS.

Usage

BASiCS_Draw(
  Chain,
  BatchInfo = gsub(".*_Batch([0-9a-zA-Z])", "\\1", colnames(Chain@parameters[["nu"]])),
  N = sample(nrow(Chain@parameters[["nu"]]), 1)
)

Arguments

Chain

An object of class BASiCS_Chain.

BatchInfo

Vector of batch information from the SingleCellExperiment object used as input to BASiCS_MCMC.

N

The integer index for the draw to be used to sample from the posterior predictive distribution. If not supplied, a random value is chosen.

Value

An object of class SingleCellExperiment, including synthetic data generated by the model implemented in BASiCS.

Author(s)

Alan O'Callaghan

References

Vallejos, Marioni and Richardson (2015). PLoS Computational Biology.

Examples

data(ChainSC)
BASiCS_Draw(ChainSC)

data(ChainSC)
BASiCS_Draw(ChainSC)


catavallejos/BASiCS documentation built on March 27, 2024, 12:49 a.m.