Entering edit mode
3.8 years ago
DareDevil
★
4.3k
Hi I am analyzing microarray under agilent platform. I used following codes
library(limma)
workDir<- "home/dare_devil/arrays/data1"
annotation <- read.table(file.path(workDir, "annotation.txt"),
header = TRUE, sep = '\t', quote = "",
stringsAsFactors = FALSE)
if (length(unique(annotation$Name)) != nrow(annotation)) {stop("The names in the annotation file must be unique!")}
rawData <- read.maimages(unique(file.path(workDir, annotation$File)),
source = "agilent", green.only = TRUE,
names = annotation$Name, annotation = c("ProbeName"))
# correct, normalize, and extract
bgData <- backgroundCorrect(rawData)
normData <- normalizeBetweenArrays(bgData, method = "quantile")
normEset <- normData$E; rownames(normEset) <- normData$genes$ProbeName
#create design
conditions<- paste(annotation$Group)
conditions <- factor(conditions, levels=unique(conditions))
design <- model.matrix(~0+ conditions)
colnames(design) <- levels(conditions)
#fit the design
fit <- lmFit(normEset, design)
#Make contrast
contrast.matrix <- makeContrasts(Grp1 - Grp2, levels=design)
#Fit contrast
fit.cont<- contrasts.fit(fit, contrast.matrix)
#ebayes Fit
fit.cont<- eBayes(fit.cont)
#check the results
results<-decideTests(fit.cont,adjust.method="fdr",p=0.05)
summary(results)
I got following results
Grp1 - Grp2
Down 0
NotSig 62948
Up 0
But after running the code I did not get any significant genes. Am I doing anything wrong?
Hi Kevin,
After above step I can perform directly ebayes, right?
I get:
This is mentioned in the manual limma
page 41-43
Yes,
eBayes()
can be used in different waysCan you look at this link. it gives different results
Grp1
is treated group andGrp2
is control group and each group has 2 replicatestopTable(fit.cont, adjust.method = 'fdr', p = 1)
I see. The problem is the sample size. With 2 versus 2, you are limiting yourself to what you can actually discover. There was a recent related thread, here: A: RNA-seq power estimation using ssizeRNA program
If this work is just for training purposes, then I would not worry about it too much.
If you want, you could try some very strict / rigorous filtering steps, like I do in the other thread - this will lessen the 'harshness' of the FDR and may give you something in return.