[BioC] problems with affy function indexProbes on Mac

Martin Morgan mtmorgan at fhcrc.org
Thu Nov 30 19:59:32 CET 2006


...and indexProbes now handles a missing 'which' correctly. The update
should appear in the repository in the next 24 hours; look for affy
version 1.12.2

"James W. MacDonald" <jmacdon at med.umich.edu> writes:

> Hi Jenny,
>
> drnevich at uiuc.edu wrote:

>>> temp <- indexProbes(rawdata)
>> Error in function (classes, fdef, mtable)  : unable to find an
>> inherited method for function "indexProbes", for signature
>> "AffyBatch", "missing"

> The second error you see is because indexProbes(rawdata) is being called
> without a 'which' argument. The function would set a default of 'pm'in
> previous versions of R

For the technically minded, "indexProbes" is a so-called 'generic'
function. Generic functions have 'methods' associated with them. When
a user invokes a generic function, R looks at the arguments the user
provides, and tries to find a method that matches those
arguments. The methods available for "indexProbes" in the previous version
of affy were

> showMethods("indexProbes")
Function: indexProbes (package affy)
object="AffyBatch", which="character"

i.e., R knew how to deal with a call to indexProbes when the 'object'
argument was an "AffyBatch", and the 'which' argument was a
"character". R did not know how to deal with a call where 'which' was
missing.  I added another method, so the new version of affy has

> showMethods("indexProbes")
Function: indexProbes (package affy)
object="AffyBatch", which="character"
object="AffyBatch", which="missing"

This means that 'which' can be "missing". In the method, I repeat the
call to indexProbes, but supply a default argument for 'which' as the
character vector "pm".

Martin
-- 
Martin T. Morgan
Bioconductor / Computational Biology
http://bioconductor.org



More information about the Bioconductor mailing list