[BioC] custom affy chip, mm values with NA (affy, makecdfenv)

James Bullard bullard at berkeley.edu
Tue May 3 19:43:15 CEST 2005


I have a custom affy chip (dont know what more information would be 
relevant here (I am new to this)). I am attempting to perform background 
correction using the bg.correct.mas function and am running into 
problems because of na values in a very small (5 or so) number of the mm 
values (At least, I think this is why I am running into problems).

First, I noticed that none of the bg.correct.*, normalize.* methods have 
an na.rm parameter - this seems to indicate to me that having NA values 
in pm, mm matrices is not expected and therefore I am reading in the 
data incorrectly. Is this true? I took it for granted that it was not 
true, and have been trying to exclude them after the fact.

First, to get the data into R i do:

 > cdf.env     <- make.cdf.env("Mar_12_2004.cdf")
 > affybatch <- read.affybatch(filenames = c("T1.CEL"))
 > affybatch at cdfName <- "cdf.env"

This occurs without incident (save the warning: Incompatible phenoData 
object. Created a new one.)

So then I want to do the following:

 > bg.correct.mas(affybatch)
Error in as.vector(data) : NA/NaN/Inf in foreign function call (arg 1)

So... My first thought was to find all probesets with NA values, and 
then remove them from the AffyBatch object (please excuse the codes 
ugliness, just trying to make it work for now):

remove.na.vals <- function(affybatch) {
  na.probesets <- NULL
 
  for (ps in probeset(affybatch)) {
    if (is.na(sum(pm(ps))) || is.na(sum(mm(ps)))) {
      na.probesets <- c(na.probesets, ps at id)
    }
  }
  na.probesets
}

So using the above function I do the following:

ab.probes <-  probeset(affybatch, setdiff(geneNames(affybatch), 
remove.na.vals(affybatch)))

This gives me a list of probeset objects which have no NA values in 
either pm or  mm column. I then want create/modify the AffyBatch object 
to use just this probeset. I cannot set the pm, mm values because they 
have different dimensions. I am sure there are alternate/superior 
solutions to this problem. As I said before I am new to bioconductor and 
so potentially I am on the wrong track entirely. Some information which 
might be important
is below, Thanks in advance. Jim

R 2.0.1
bioconductor 1.5
affy_1.5.8-1
makecdfenv_1.4.8
debian 2.6 (sarge)



More information about the Bioconductor mailing list