BADER: Bayesian Analysis of RNA Sequencing Data

Description Usage Arguments Value Author(s) Examples

Description

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.

Usage

1
BADER(x, design, sizeFactors = TRUE, start = NULL, burn = 1000, reps = 10000, printEvery = 100, saveEvery = 1, t0 = 10, mode = "minimal")

Arguments

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 printEvery iteration the current step is being printed

saveEvery

Every saveEvery-th step is saved for inference

t0

Warming up time for Metropolis-Hastings

mode

How much data should be returned? Returning all posterior distributions requires large memory.

  • mode = 0: Only posterior means are returned for every parameter

  • mode = 1: Full posterior distribution for log fold change parameter is returned

  • mode = 2: Posterior distibutions for the following parameters are returned: log fold change log mean and log dispersion

Value

A list with posterior distributions / posterior means

Author(s)

Andreas Neudecker

Examples

 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)

BADER documentation built on Nov. 8, 2020, 8:20 p.m.