Title: | Bayesian Analysis of Differential Expression in RNA Sequencing Data |
---|---|
Description: | For RNA sequencing count data, BADER fits a Bayesian hierarchical model. The algorithm returns the posterior probability of differential expression for each gene between two groups A and B. The joint posterior distribution of the variables in the model can be returned in the form of posterior samples, which can be used for further down-stream analyses such as gene set enrichment. |
Authors: | Andreas Neudecker, Matthias Katzfuss |
Maintainer: | Andreas Neudecker <[email protected]> |
License: | GPL-2 |
Version: | 1.45.0 |
Built: | 2024-10-30 03:34:31 UTC |
Source: | https://github.com/bioc/BADER |
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.
BADER(x, design, sizeFactors = TRUE, start = NULL, burn = 1000, reps = 10000, printEvery = 100, saveEvery = 1, t0 = 10, mode = "minimal")
BADER(x, design, sizeFactors = TRUE, start = NULL, burn = 1000, reps = 10000, printEvery = 100, saveEvery = 1, t0 = 10, mode = "minimal")
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
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)
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)