Question: Single-color Agilent array analyzing in R
3
gravatar for Leite
3.0 years ago by
Leite1.1k
São Paulo - Brazil - Unifesp
Leite1.1k 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
library(limma)

#Set-up
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
design
comparisonmodel

project.fit <- lmFit(project.NormData, comparisonmodel)
#When I used > project.fit <- 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 
project.fit <- lmFit(project.NormData,comparisonmodel)
  
#Applying the empirical Bayes method
project.fit.eBayes <- eBayes(project.fit)
names(project.fit.eBayes)

#Make individual contrasts and fit the new model
CaseControl <- makeContrasts(CaseControl="D0A-Control", levels=comparisonmodel)
CaseControl.fitmodel <- contrasts.fit(project.fit.eBayes, 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", sort.by="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,

Leite

ADD COMMENTlink modified 6 months ago by g.felio.rolo0 • written 3.0 years ago by Leite1.1k

Hi Leite,

When I read the targets.txt file, will the individual files be accessible through R?

Thanks

ADD REPLYlink written 18 months ago by vinayjrao180

Please elaborate on what you want to do.

ADD REPLYlink written 18 months ago by Kevin Blighe68k

I want to be able to see the contents of each file imported using readTargets. Is that possible?

ADD REPLYlink written 18 months ago by vinayjrao180
1

I suppose that you can simply read them into your R session separately. I have not processed Agilent data for a long time, so, perhaps there is another way.

If you execute the str() function on, for example, the project object, you may see how each sample is arranged inside this object.

ADD REPLYlink modified 18 months ago • written 18 months ago by Kevin Blighe68k

Hi, I am very new to microarray data analysis. Can you send me the detailed steps involved in its analysis? And, also what are the things to includes in Targets.txt file?

ADD REPLYlink written 12 months ago by singh.adarsh9310

Hi everyone,

I wonder if this script works too for my microarray one-color. The information of the microarray is the following:

SurePrintG3 Human Gene Expression v2 8x60k microarray (Agilent ref. G4851B) 83 samples (47 primary tumors más 36 metastasis)

Thanks in advance

ADD REPLYlink written 6 months ago by g.felio.rolo0
3
gravatar for Kevin Blighe
3.0 years ago by
Kevin Blighe68k
Republic of Ireland
Kevin Blighe68k wrote:

You have to pass a comparison model to lmFit(). Also, for Agilent processing, the expression values are eventually stored in the 'M' or 'E' variables of your object, and not accessed via the exprs() function. The choice of M or E depends on whether it is 2- or 1-channel / colour array.

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

fit <- lmFit(project.NormData$M, comparisonmodel)
ADD COMMENTlink modified 17 months ago • written 3.0 years ago by Kevin Blighe68k
1

Hi Kevin,

You are always willing to help!

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

ADD REPLYlink written 3.0 years ago by Leite1.1k

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

ADD REPLYlink written 3.0 years ago by Leite1.1k

Looks okay!

ADD REPLYlink written 3.0 years ago by Kevin Blighe68k
Please log in to add an answer.

Help
Access

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