[BioC] Creating a substet of probe intensities from AffyBatch object

Laurent Gautier lgautier at altern.org
Thu Sep 16 21:43:29 CEST 2004


Larry La Pointe wrote:
> Howdy,
> 
> I am trying to create a subset of probe intensities from an AffyBatch
> object.  As a new user to the affy package (and Bioconductor, in
> general) I was pleased to find an article presenting the package by
> Gautier et al. in Bioinformatics (2004) 20:307-315.  I was *especially*
> pleased to find the R code in Fig 4. which seems to do exactly what I'd
> like:
> 
> ## celdata is an AffyBatch of 75 arrays...
> controls.gni<-grep("AFFX.+", geneNames(celdata))
> controls.names<-geneNames(celdata)[controls.gni]
> controls.indices<- indexProbes(celdata, which="pm", controls.names)
> 
> ## so far so good....but:


arg.... there is a 'but'...

> controls.intensities<-intensity(celdata)[controls.indices, ]
> 
> gives:
> Error: invalid subscript  ## ????
 >
> Am I missing something obvious?

Since they the time the paper was written, the API of the package 
changed slightly...

do:
controls.indices <- unlist(control.indices)
right after the line
controls.indices<- indexProbes(celdata, which="pm", controls.names)


> 
> BTW: Inspection of control.intensities show that this is a list object. 
> By unlisting, such as:
> x<-unlist(controls.indices)

Yes (see above)


> I can recover the data but they are in a (rather nasty) vector.

"recover" ?? "nasty" ??? what do yo mean ?

> thanks in advance,
> LL
> 
> 

L.



More information about the Bioconductor mailing list