OH! So happy! Kevin answered this question! I am a newbie and have been concerned about Agilent single channel microarray analysis question for a long time. But I still bothered by some questions. All remarks on Biostar show Kevin you are always kindful and helpful, may I borrow some your precious time for informing me something important but I ignored? Thanks from my heart! I am trying to replicate the Agilent part of this article:https://journals.plos.org/plosgenetics/article?id=10.1371/journal.pgen.1002794. Followed by its referred package Limma and Agi4x44PreProcess, I couldn't reach the article's results. I get a fault probe filter number and also get an error mention in the after analysis, my code as following:
library(limma)
#loading data
targets<-read.delim("E-MTAB-812.sdrf.txt")
dd<-targets[,c("Array.Data.File","Factor.Value.DISEASE_STATE.","Characteristics.RNA.Integrity.Number.")]
raw_data<-read.maimages(targets[,"Array.Data.File"],source = "agilent",green.only = TRUE,other.columns =c("gIsWellAboveBG","gIsSaturated","gIsFeatPopnOL","gIsFeatNonUnifOL") )
#Subtract the background
bg_data<-backgroundCorrect(raw_data,method = "normexp")
#Normalize between the arrays
nm_data<-normalizeBetweenArrays(bg_data,method = "quantile")
nm_data_avg<-avereps(nm_data,ID=nm_data$genes$ProbeName)
dim(nm_data)
#QC report
eSet<-new("ExpressionSet", exprs = nm_data$E,annotation=nm_data$genes$GeneName)
QC_report_nor<-arrayQualityMetrics(eSet)
#probe filter
Control<-nm_data$genes$ControlType==1
IsExpr<- rowSums(nm_data$other$gIsWellAboveBG>0) <=40
fil_data1<-nm_data[!Control&!IsExpr,]
fil_data2<-avereps(fil_data1,ID=fil_data1$genes$ProbeName)
dim(fil_data2)
#gene annotation
library(clusterProfiler)
library(hgug4112a.db)
tr_gene<-fil_data2$genes$ProbeName
Symbol<-bitr(tr_gene,fromType = "PROBEID",toType = "SYMBOL",OrgDb = hgug4112a.db,drop = FALSE)
EntrezID<-bitr(tr_gene,fromType = "PROBEID",toType = "ENTREZID",OrgDb = hgug4112a.db,drop = FALSE)
fil_data2$genes<-cbind(fil_data2$genes,Symbol,EntrezID)
fil_data2$genes<-fil_data2$genes[,c("PROBEID","SYMBOL","ENTREZID")]
##remove NA
no_symbol<-is.na(fil_data2$genes$SYMBOL)
no_entr<-is.na(fil_data2$genes$ENTREZID)
fil_data_rm<-fil_data2[!no_symbol&!no_entr,]
#DEG filter
rownames(fil_data_rm$E)<-fil_data_rm$genes$SYMBOL
fil_data_sy<-fil_data_rm$E
treatment<-targets[,"Factor.Value.DISEASE_STATE."]
TR_levels<-c("neurologically healthy control","Parkinson disease")
Group<-factor(treatment,levels = TR_levels)
design2<- model.matrix(~Group+0)
colnames(design2) <- c("Control","PD")
fita<- lmFit(fil_data_rm$E, design2)
cont.matrix <- makeContrasts(Diff=PD-Control, levels=design2)##!!!colnames could not too long -R can't identify
fitb<- contrasts.fit(fita, cont.matrix)
fitc<- eBayes(fitb)
Result_A<-topTable(fitc,adjust="BH",coef = "Diff",genelist =fil_data_rm$genes$SYMBOL ,number = Inf,p.value = 0.05)
summary(decideTests(fitc),lfc = 1.5)
de_gen<-decideTests(fitc,lfc =1.5)
Thanks for your precious time again!
Hi Rohit,
Please, how you did do to filter, I ask the same question?
Thanks for help,
Hi Rohit, Please, how you did do to filter, I ask the same question? Thanks for help,
sad, nothing improvement?