Learn R Programming

BASiCS (version 0.7.30)

newBASiCS_D_Chain: Creates a BASiCS_D_Chain object from pre-computed MCMC chains

Description

BASiCS_D_Chain creates a BASiCS_D_Chain-class object from pre-computed MCMC chains.

Usage

newBASiCS_D_Chain(muTest, muRef, deltaTest, deltaRef, phi, s, nu, thetaTest,
  thetaRef, offset = 1)

Arguments

muTest

MCMC chain for gene-specific expression levels \(\mu[i]\) (test group), defined as true input molecules in case of technical genes (matrix with q columns, technical genes located at the end of the matrix, all elements must be positive numbers)

muRef

MCMC chain for gene-specific log-fold changes \(\mu[i]\) (reference group), defined as (log) difference in input molecules in case of technical genes (matrix with q columns, technical genes located at the end of the matrix)

deltaTest

MCMC chain for gene-specific biological cell-to-cell heterogeneity hyper-parameters \(\delta[i]\) (test group), biological genes only (matrix with q.bio columns, all elements must be positive numbers)

deltaRef

MCMC chain for gene-specific log-fold change in biological cell-to-cell heterogeneity hyper-parameters \(\delta[i]\) (reference group), biological genes only (matrix with q.bio columns, all elements must be real numbers)

phi

MCMC chain for cell-specific mRNA content normalising constants \(\phi[j]\) (matrix with n columns, all elements must be positive numbers and the sum of its elements must be equal to n)

s

MCMC chain for cell-specific capture efficiency (or amplification biases if not using UMI based counts) normalising constants \(s[j]\) (matrix with n columns, all elements must be positive numbers)

nu

MCMC chain for cell-specific random effects \(\nu[j]\) (matrix with n columns, all elements must be positive numbers)

thetaTest

MCMC chain for technical variability hyper-parameter \(\theta_test\) in the test sample (vector, all elements must be positive)

thetaRef

MCMC chain for technical variability hyper-parameter \(\theta_ref\) in the reference sample (vector, all elements must be positive)

offset

Offset value to be corrected (default = NULL to be internally calculated) #@param offsetCorrect TRUE/FALSE value to indicate if offset correction is required (default value = TRUE)

Value

An object of class BASiCS_D_Chain-class.

See Also

BASiCS_D_Chain-class

Examples

Run this code
# NOT RUN {
# Data = makeExampleBASiCS_D_Data()
# MCMC_Output <- BASiCS_D_MCMC(Data, N = 50, Thin = 5, Burn = 5, 
#                StoreChains = TRUE, StoreDir = getwd(), RunName = "Example")

# ChainMuTest = as.matrix(read.table("chain_muTest_Example.txt"))
# ChainMuRef = as.matrix(read.table("chain_muRef_Example.txt"))
# ChainDeltaTest = as.matrix(read.table("chain_deltaTest_Example.txt"))
# ChainDeltaRef = as.matrix(read.table("chain_deltaRef_Example.txt"))
# ChainPhi = as.matrix(read.table("chain_phi_Example.txt"))
# ChainS = as.matrix(read.table("chain_s_Example.txt"))
# ChainNu = as.matrix(read.table("chain_nu_Example.txt"))
# ChainThetaTest = read.table("chain_thetaTest_Example.txt")[,1]
# ChainThetaRef = read.table("chain_thetaRef_Example.txt")[,1]

# MCMC_Output_Load <- newBASiCS_D_Chain(muTest = ChainMuTest, 
#                                        muRef = ChainMuRef, 
#                                        deltaTest = ChainDeltaTest, 
#                                        deltaRef = ChainDeltaRef, 
#                                        phi = ChainPhi, 
#                                        s = ChainS, 
#                                        nu = ChainNu, 
#                                        thetaTest = ChainThetaTest, 
#                                        thetaRef = ChainThetaRef)

# }

Run the code above in your browser using DataLab