Question: Single-color Agilent array analyzing in R
gravatar for Leite
16 months ago by
Leite340 wrote:

Hello everyone,

I'm working with data that was performed using Agilent-014850 Whole Human Genome Microarray 4x44K G4112F arrays and the One Color Quick Amp Labeling Kit (Agilent Technologies, Santa Clara, USA).

I'm trying to set up a code in R:

#Load limma

targetinfo <- readTargets("Targets.txt",row.names="FileName",sep="")

#Read files
project <- read.maimages(targetinfo,source="agilent", green.only=TRUE)

#Background correction
project.bgc <- backgroundCorrect(project, method="normexp", offset=16)

#Normalize the data with the 'quantile' method for 1-color
project.NormData <-normalizeBetweenArrays(project.bgc,method="quantile")

#Create the study design and comparison model
design <- paste(targetinfo$Target, sep="")
design <- factor(design)
comparisonmodel <- model.matrix(~0+design)
colnames(comparisonmodel) <- levels(design)
#Checking the experimental design
comparisonmodel <- lmFit(project.NormData, comparisonmodel)
#When I used > <- lmFit(project.NormData$M, comparisonmodel)
Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x),  : 
'data' must be of a vector type, was 'NULL'

#So, I used without a $M <- lmFit(project.NormData,comparisonmodel)
#Applying the empirical Bayes method <- eBayes(

#Make individual contrasts and fit the new model
CaseControl <- makeContrasts(CaseControl="D0A-Control", levels=comparisonmodel)
CaseControl.fitmodel <-, CaseControl)
CaseControl.fitmodel.eBayes <- eBayes(CaseControl.fitmodel)

#Filtering Results
 nrow(topTable(CaseControl.fitmodel.eBayes, coef="CaseControl", number=99999, lfc=2))
 probeset.list <- topTable(CaseControl.fitmodel.eBayes, "CaseControl", number=99999, adjust.method="BH","P", lfc=2)

#To save results
write.table(probeset.list, "results.txt", sep="\t", quote=FALSE)

Well, now it seems correct, and you guys what do you think?

Best regards,


ADD COMMENTlink modified 15 months ago • written 16 months ago by Leite340
gravatar for Kevin Blighe
16 months ago by
Kevin Blighe39k
Republic of Ireland
Kevin Blighe39k wrote:

You have to pass a comparison model to lmFit(). Also, for Agilent processing, the expression values are eventually stored in the 'M' variable of your object, not via the exprs() function. This is common for both the 1- and 2-colour Agilent arrays.

comparisonmodel <- model.matrix(~0+design)
colnames(comparisonmodel) <- levels(design)

fit <- lmFit(project.NormData$M, comparisonmodel)
ADD COMMENTlink written 16 months ago by Kevin Blighe39k

Hi Kevin,

You are always willing to help!

I'll try it and post de full code later.

ADD REPLYlink written 16 months ago by Leite340

I edited the code in the question, now I think it's ok, what you think about?

ADD REPLYlink written 15 months ago by Leite340

Looks okay!

ADD REPLYlink written 15 months ago by Kevin Blighe39k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1876 users visited in the last hour