BASiCStan | R Documentation |
The stan programming language enables the use of MAP, VB, and HMC inference. Only the regression mode featuring a joint prior between mean and overdispersion parameters is implemented
BASiCStan(
Data,
Method = c("vb", "sampling", "optimizing"),
WithSpikes = length(altExpNames(Data)) > 0,
Regression = TRUE,
BatchInfo = Data$BatchInfo,
L = 12,
PriorMu = c("EmpiricalBayes", "uninformative"),
NormFactorFun = scran::calculateSumFactors,
ReturnBASiCS = TRUE,
Verbose = TRUE,
...
)
Data |
SingleCellExperiment object |
Method |
Inference method. One of: |
WithSpikes |
Do the data contain spike-in genes? See BASiCS for details.
When |
Regression |
Use joint prior for mean and overdispersion parameters?
Included for compatibility with |
BatchInfo |
Vector describing which batch each cell is from. |
L |
Number of regression terms (including slope and intercept) to use in joint prior for mu and delta. |
PriorMu |
Type of prior to use for mean expression. Default is "EmpiricalBayes", but "uninformative" is the prior used in Eling et al. and previous work. |
NormFactorFun |
Function that returns cell-specific scaling
normalisation factors. See |
ReturnBASiCS |
Should the object be converted into a BASiCS_Chain object? |
Verbose |
Should output of the stan commands be printed to the terminal? |
... |
Passed to vb or sampling. |
An object of class BASiCS_Chain
.
library("BASiCS")
sce <- BASiCS_MockSCE(NGenes = 10, NCells = 10)
fit_spikes <- BASiCStan(sce, tol_rel_obj = 1)
## uses fixed scaling normalisation factors
fit_nospikes <- BASiCStan(sce, WithSpikes = FALSE, tol_rel_obj = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.