Entering edit mode
6.8 years ago
kalyanimeha
▴
40
I had generated volcano plot by using limma package, but how to get a list of a gene that is upregulated or downregulated separately.
This is the command I am using to generate volcano plot so now which command should i use to get down and up-regulated gene.
Differential expression analysis with limma
library(Biobase)
library(GEOquery)
library(limma)
load series and platform data from GEO
gset <- getGEO("GSE34747", GSEMatrix =TRUE, AnnotGPL=FALSE)
if (length(gset) > 1) idx <- grep("GPL15069", attr(gset, "names")) else idx <- 1
gset <- gset[[idx]]
make proper column names to match toptable
fvarLabels(gset) <- make.names(fvarLabels(gset))
group names for all samples
gsms <- "000111"
sml <- c()
for (i in 1:nchar(gsms)) { sml[i] <- substr(gsms,i,i) }
log2 transform
ex <- exprs(gset) qx <- as.numeric(quantile(ex, c(0., 0.25, 0.5, 0.75, 0.99, 1.0), na.rm=T))
LogC <- (qx[5] > 100) ||
if (LogC) { ex[which(ex <= 0)] <- NaN
exprs(gset) <- log2(ex) }
set up the data and proceed with analysis
sml <- paste("G", sml, sep="") # set group names
fl <- as.factor(sml)
gset$description <- fl
design <- model.matrix(~ description + 0, gset)
colnames(design) <- levels(fl)
fit <- lmFit(gset, design)
cont.matrix <- makeContrasts(G1-G0, levels=design)
fit2 <- contrasts.fit(fit, cont.matrix)
fit2 <- eBayes(fit2, 0.01)
volcanoplot(fit2)