newBASiCS_Chain: Creates a BASiCS_Chain object from pre-computed MCMC chains

Description Usage Arguments Value Author(s) See Also Examples

View source: R/newBASiCS_Chain.R

Description

BASiCS_Chain creates a BASiCS_Chain object from pre-computed MCMC chains.

Usage

1
newBASiCS_Chain(parameters)

Arguments

parameters

List of matrices containing MCMC chains for each model parameter.

mu

MCMC chain for gene-specific mean expression parameters μ_i, biological genes only (matrix with q.bio columns, all elements must be positive numbers)

delta

MCMC chain for gene-specific biological over-dispersion parameters δ_i, biological genes only (matrix with q.bio columns, all elements must be positive numbers)

phi

MCMC chain for cell-specific mRNA content normalisation parameters φ_j (matrix with n columns, all elements must be positive numbers and the sum of its elements must be equal to n)

. This parameter is only used when spike-in genes are available.

s

MCMC chain for cell-specific technical normalisation parameters s_j (matrix with n columns, all elements must be positive numbers)

nu

MCMC chain for cell-specific random effects ν_j (matrix with n columns, all elements must be positive numbers)

theta

MCMC chain for technical over-dispersion parameter(s) θ (matrix, all elements must be positive, each colum represents 1 batch)

beta

Only used for regression model. MCMC chain for regression coefficients (matrix with k columns, where k represent the number of chosen basis functions + 2)

sigma2

Only used for regression model. MCMC chain for the residual variance (matrix with one column, sigma2 represents a global parameter)

epsilon

Only used for regression model. MCMC chain for the gene specific residual over-dispersion parameter (mean corrected vraribility) (matrix with q columns)

Value

An object of class BASiCS_Chain.

Author(s)

Catalina A. Vallejos cnvallej@uc.cl

Nils Eling eling@ebi.ac.uk

See Also

BASiCS_Chain

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Data <- makeExampleBASiCS_Data()

# No regression model
Chain <- BASiCS_MCMC(Data, N = 50, Thin = 5, Burn = 5, Regression = FALSE)

ChainMu <- displayChainBASiCS(Chain, 'mu')
ChainDelta <- displayChainBASiCS(Chain, 'delta')
ChainPhi <- displayChainBASiCS(Chain, 'phi')
ChainS <- displayChainBASiCS(Chain, 's')
ChainNu <- displayChainBASiCS(Chain, 'nu')
ChainTheta <- displayChainBASiCS(Chain, 'theta')

ChainNew <- newBASiCS_Chain(parameters = list(mu = ChainMu, 
                                              delta = ChainDelta,
                                              phi = ChainPhi, 
                                              s = ChainS, 
                                              nu = ChainNu, 
                                              theta = ChainTheta))
                            

# No regression model
Chain <- BASiCS_MCMC(Data, N = 50, Thin = 5, Burn = 5, Regression = TRUE)

ChainMu <- displayChainBASiCS(Chain, 'mu')
ChainDelta <- displayChainBASiCS(Chain, 'delta')
ChainPhi <- displayChainBASiCS(Chain, 'phi')
ChainS <- displayChainBASiCS(Chain, 's')
ChainNu <- displayChainBASiCS(Chain, 'nu')
ChainTheta <- displayChainBASiCS(Chain, 'theta')
ChainBeta <- displayChainBASiCS(Chain, 'beta')
ChainSigma2 <- displayChainBASiCS(Chain, 'sigma2')
ChainEpsilon <- displayChainBASiCS(Chain, 'epsilon')

ChainNew <- newBASiCS_Chain(parameters = list(mu = ChainMu, 
                                              delta = ChainDelta,
                                              phi = ChainPhi, 
                                              s = ChainS, 
                                              nu = ChainNu, 
                                              theta = ChainTheta,
                                              beta = ChainBeta, 
                                              sigma2 = ChainSigma2,
                                              epsilon = ChainEpsilon))

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