Stan2BASiCS: Convert Stan fits to 'BASiCS_Chain' objects.

View source: R/BASiCStan.R

Stan2BASiCSR Documentation

Convert Stan fits to BASiCS_Chain objects.

Description

Convert Stan fits to BASiCS_Chain objects.

Usage

Stan2BASiCS(
  x,
  gene_names = attr(x, "gene_names"),
  cell_names = attr(x, "cell_names"),
  size_factors = attr(x, "size_factors")
)

Arguments

x

A stan object

gene_names, cell_names

Gene and cell names. The reason this argument exists is that by default, stan fit parameters are not named. NOTE: this must be the same order as the data supplied to BASiCStan.

size_factors

Cell-specific scaling normalisation factors, to be stored as part of the chain object when WithSpikes=FALSE.

Value

A BASiCS_Chain object.

Examples

library("BASiCS")
sce <- BASiCS_MockSCE(NGenes = 10, NCells = 10)

fit_spikes <- BASiCStan(sce, ReturnBASiCS = FALSE, tol_rel_obj = 1)
summary(fit_spikes)

Alanocallaghan/BASiCStan documentation built on Feb. 19, 2024, 10:40 p.m.