Description Usage Arguments Value Author(s) Examples
This function estimates the posterior distribution of various parameters regarding RNA Sequencing data. The most interesting parameter is the probability of differential expression (DE) between two groups A and B. But also estimates for the log mean and the log dispersion parameter of the underlying poisson - log-normal model can be returned.
1 |
x |
m x n matrix: Every column should contain count data for a subject with m genes or tags. |
design |
Factor specifying the samples' treatment groups. The first level of 'design' corresponds to the treatment group A, the second level to treatment group B |
sizeFactors |
boolean: Whether size factors should be estimated (TRUE) or all set to 1 (FALSE) |
start |
list containing start values for MCMC sampler |
burn |
Number of burning in steps |
reps |
Number of repetions |
printEvery |
After every |
saveEvery |
Every |
t0 |
Warming up time for Metropolis-Hastings |
mode |
How much data should be returned? Returning all posterior distributions requires large memory.
|
A list with posterior distributions / posterior means
Andreas Neudecker
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | set.seed(21)
## log mean expression
muA <- rnorm(100,4,1)
gam <- c(rnorm(10,0,2),rep(0,90))
muB <- muA + gam
## log dispersion
alphaA <- alphaB <- rnorm(100,-2,1)
## count tables for treatment group a and b
kA <- t(matrix(rnbinom(300,mu=exp(muA),size=exp(-alphaA)),nrow=3,byrow=TRUE))
kB <- t(matrix(rnbinom(300,mu=exp(muB),size=exp(-alphaB)),nrow=3,byrow=TRUE))
x <- cbind(kA,kB)
design <- factor(c("A","A","A","B","B","B"))
results <- BADER(x,design,burn=1000,reps=2000)
## Not run:
plot(results$diffProb,xlab="Index",ylab="posterior DE prob.")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.