Limma peptide binding array independent color analysis EList instead of MAList
2
0
Entering edit mode
jjotto • 0
@jjotto-8389
Last seen 8.8 years ago
United States

1.  I am new to R and limma.

2.  Experimental overview:  Patient samples containing antibodies against many, many targets are incubated on high-density peptide arrays.  The arrays are composed of approximately 330,000 11-mer sequences.  I am trying to distinguish case from control based on differential binding.  The two colors are different antibody classes, and I would like to handle them independently of each other.  Final comparison would be control 635 vs case 635 and control 532 vs case 532.  

3.  Issue:  I am not sure how to import only the red color so I imported green only and replaced those values with the red values in 'R635' (below).  The 'normalizeBetweenArrays' resulted in an EList data class which is not accepted by the 'lmFit' function.  Please see below for error message.  I believe the normalization should result in a MAList object.  Please let me know where I'm wrong.

Mycode starts below (I realize I could have imported my files once and duplicated)

library(limma)
targets = readTargets("targets.txt")
RG = read.maimages(targets,source='genepix')

#RG532 and 635 are EListRaw class
RG532 = read.maimages(targets, green.only=TRUE, source='genepix')
RG635 = read.maimages(targets, green.only=TRUE, source='genepix')

#replacing the green (E) with the Red (R) from the full RG
RG635$E = RG$R

#this resulted in EList class data
MAr=normalizeBetweenArrays(RG635,method="scale")
MAg=normalizeBetweenArrays(RG532,method="scale")

design=model.matrix(~0+factor(c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2)))
colnames(design) <-c("case","control")

#MAr at this stage is an EList
rfit=lmFit(MAr, design)
Error in lm.fit(design, t(M)) : NA/NaN/Inf in 'y'
#lm.fit Needs MAList class to work

sessionInfo()

R version 3.1.3 (2015-03-09)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252 
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                        
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods
[7] base     

other attached packages:
[1] limma_3.22.7

loaded via a namespace (and not attached):
[1] tools_3.1.3
limma • 1.2k views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 9 hours ago
United States

Where did you get the idea that lmFit() needs a MAList? From ?lmFit, I see this:

Usage:

     lmFit(object, design=NULL, ndups=1, spacing=1, block=NULL, correlation, weights=NULL,
           method="ls", ...)
     
Arguments:

  object: A matrix-like data object containing log-ratios or
          log-expression values for a series of arrays, with rows
          corresponding to genes and columns to samples.  Any type of
          data object that can be processed by getEAWP is acceptable.

And from ?getEAWP I get this:

Usage:

     getEAWP(object)
     
Arguments:

  object: a microarray data object.  An object of class MAList,
          EList, marrayNorm, PLMset, vsn, or any class
          inheriting from ExpressionSet, or any object that can be
          coerced to a numeric matrix.

Anyway, the error specifically says

Error in lm.fit(design, t(M)) : NA/NaN/Inf in 'y'

Which is to say that you are passing in some Inf values in your EList 'E' slot, probably because you are taking logs of zeros along the way (NA and NaN values pose no problems, and will be dropped silently for any peptide that has them).

> example(lmFit)
<snip>
> y[1,1] <- Inf
> lmFit(y, design)
Error in lm.fit(design, t(M)) : NA/NaN/Inf in 'y'

 

 

 

ADD COMMENT
1
Entering edit mode
@gordon-smyth
Last seen 5 minutes ago
WEHI, Melbourne, Australia

As James has diagnosed, the error message is because the peptide arrays are returning values exactly zero for some probes, and this is producing -Inf after taking logs.

The error is a symptom of the fact that you've skipped the background correction and filtering steps that are normally done in an analysis. The error would go away if you background corrected first, say:

RG635 <- backgroundCorrect(RG635, method="normexp", offset=16)

But surely you also want to filter out some of those 330,000 probes. For example, there may be probes that are identically zero for all samples. More generally, probes that are very low levels in half or more of the samples should be filtered out.

Have you made any diagnostic plots of the data?

To read the red channel only:

R <- read.maimages(targets, source="genepix", columns=list(G="F635 Mean",Gb="B635 Median"), green.only=TRUE)

Then:

Rb <- backgroundCorrect(R, method="normexp", offset=16)
plotMD(Rb, array=1)
y <- normalizeBetweenArrays(Rb, method="quantile")

etc.

ADD COMMENT

Login before adding your answer.

Traffic: 642 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6