Description Usage Arguments Details Value Author(s) References See Also Examples
Calculates the predictive log fold change for a particular coefficient from a fit object.
1 |
fit |
an |
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" |
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.
predFCm
produces a numeric vector corresponding to the predictive or posterior log fold changes of the specified contrast
Belinda Phipson and Gordon Smyth
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
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])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.