predFCm: Predictive log fold change for microarrays

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

Description

Calculates the predictive log fold change for a particular coefficient from a fit object.

Usage

1
predFCm(fit,coef=2,prob=TRUE,VarRel=NULL)

Arguments

fit

an MArrayLM fitted model object produced by lmFit or contrasts.fit and followed by eBayes

coef

integer indicating which contrasts/columns in the fit object are to be used

prob

logical, whether the probability that the gene is differentially expressed should be taken into account

VarRel

string, options are "Independent" or "Increasing"

Details

The predictive log fold changes are calculated as the posterior log fold changes in the empirical Bayes hierarchical model. The log fold changes are shrunk towards zero depending on how variable they are. The VarRel argument specifies whether the prior belief is that the log fold changes are independent of the variability of the genes (option "Independent"), or whether the log fold changes increase with increasing variability of the genes (option "Increasing"). The prob argument is a logical argument indicating whether the probability that a particular gene is differentially expressed should be taken into account.

Value

predFCm produces a numeric vector corresponding to the predictive or posterior log fold changes of the specified contrast

Author(s)

Belinda Phipson and Gordon Smyth

References

Phipson, B. (2013). Empirical Bayes modelling of expression profiles and their associations. PhD Thesis. University of Melbourne, Australia. http://repository.unimelb.edu.au/10187/17614

See Also

lmFit, eBayes, contrasts.fit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
library(limma)
#  Simulate gene expression data,
#  6 microarrays with 1000 genes on each array 
set.seed(2004)
y<-matrix(rnorm(6000),ncol=6)

# two experimental groups and one control group with two replicates each
group<-factor(c("A","A","B","B","control","control"))
design<-model.matrix(~0+group)
colnames(design)<-c("A","B","control")

# fit a linear model
fit<-lmFit(y,design)
contrasts<-makeContrasts(A-control,B-control,levels=design)
fit2<-contrasts.fit(fit,contrasts)
fit2<-eBayes(fit2)

# output predictive log fold changes for first contrast for first 5 genes
pfc<-predFCm(fit2,coef=1,prob=FALSE)
cbind(pfc[1:5],fit2$coeff[1:5,1])

richierocks/limma2 documentation built on May 27, 2019, 8:47 a.m.