bridge.2samples: Bayesian Robust Inference for Differential Gene Expression...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Test for differentially expressed genes in a two sample set-up. This code can be used with both cDNA microarrays or Affymetrix chips.

Usage

1
bridge.2samples(sample1,sample2,B=1000,min.iter=0,batch=10,mcmc.obj=NULL,all.out=TRUE,affy=FALSE,verbose=FALSE,log=FALSE,robust=TRUE)

Arguments

sample1

The matrix of intensity from the sample 1. Each row corresponds to a different gene.

sample2

The matrix of intensity from the sample 2. Each row corresponds to a different gene.

B

The number of iteration used in the MCMC algorithm.

min.iter

The length of the burn-in period in the MCMC algorithm.min.iter should be less than B.

batch

The thinning value to be used in the MCMC. Only every batch-th iteration will be stored.

mcmc.obj

An object of type bridge2, as returned by bridge.2samples. mcmc.obj is used to initialized the MCMC. If no mcmc.obj, the MCMC is initialized to the least squares estimates.

all.out

A logical value indicating if all the parameters should be output. If all.out is FALSE, only the posterior mean is output. This could be used to save memory.

affy

A logical value indicating if the data correspond to affy data or cDNA microarray data. If affy=FALSE, a bivariate distribution is used.

verbose

A logical value indicating if the current MCMC iteration number should be printed out.

log

A logical value indicating if the data are log transformed.

robust

A logical value indicating if a t model (robust==TRUE) or a Gaussian model (robust==TRUE) should be used. In the case of the t-model, the degrees of freedoms are estimated.

Details

This code fits a robust Bayesian hierarchical model for testing for differential expression. Outliers are modeled explicitly using a $t$-distribution. The model includes an exchangeable prior for the variances which allow different variances for the genes but still shrink extreme empirical variances. More details can be found in the references below.

Value

An object of type bridge2 containing the sampled values from the posterior distribution.

gamma1

A matrix, each row contains the sampled values from the corresponding gene effect in sample 1.

gamma2

A matrix, each row contains the sampled values from the corresponding gene effect in sample 2.

lambda.gamma1

A vector containing the sampled values for the precision of the gene effect prior in sample 1.

lambda.gamma2

A vector containing the sampled values for the precision of the gene effect prior in sample 2.

rho

A vector containing the sampled values from between sample correlation coefficient rho. If affy=TRUE, rho is identically zero.

lambda_eps1

A matrix, each row contains the sampled values from the corresponding gene specific error precision in sample 1.

lambda_eps2

A matrix, each row contains the sampled values from the corresponding gene specific error precision in sample 2.

a.eps1

A vector containing the sampled values for the mean of the prior of the error precisions in sample 1.

b.eps1

A vector containing the sampled values for the variance of the prior of the error precisions in sample 1.

a.eps2

A vector containing the sampled values for the mean of the prior of the error precisions in sample 2.

b.eps2

A vector containing the sampled values for the variance of the prior of the error precisions in sample 2.

w1

A matrix, each element (i,j) correspond to the posterior mean of the sampled weights of replicate j in gene i and sample 1. To save memory, we only store the posterior mean of the weigths.

nu1

A matrix containing the sampled degrees of freedom in sample 1.

w2

A matrix, each element (i,j) correspond to the posterior mean of the sampled weights of replicate j in gene i and sample 2. To save memory, we only store the posterior means of the weigths. If affy=FALSE, this is identically equal to w2 as we have a bivariate t-distribution.

nu2

A matrix containing the sampled degrees of freedom in sample 2. If affy=FALSE, this is identically equal to nu2 as we have a bivariate t-distribution.

p

The mixing proportion in the two component mixture.

post.p

The posterior probabilities of differential expression.

move

The proportion of moves between components. This should be used as a diagnostic tool.

Author(s)

Raphael Gottardo

References

Robust Estimation of cDNA Microarray Intensities with Replicates Raphael Gottardo, Adrian E. Raftery, Ka Yee Yeung, and Roger Bumgarner Department of Statistics, University of Washington, Box 354322, Seattle, WA 98195-4322

See Also

bridge.3samples

Examples

1
2
3
data(hiv)

bridge.hiv<-bridge.2samples(hiv[1:10,c(1:4)],hiv[1:10,c(5:8)],B=2000,min.iter=0,batch=1,mcmc.obj=NULL,verbose=FALSE,robust=TRUE)

Example output

Loading required package: rama

bridge documentation built on Nov. 8, 2020, 5:53 p.m.