[BioC] How to show the definition of readFastq

Peng Yu pengyu.ut at gmail.com
Mon May 24 00:59:32 CEST 2010


On Sun, May 23, 2010 at 5:25 PM, Martin Morgan <mtmorgan at fhcrc.org> wrote:
> On 05/22/2010 03:46 PM, Peng Yu wrote:
>> On Sat, May 22, 2010 at 4:40 PM, Vincent Carey
>> <stvjc at channing.harvard.edu> wrote:
>>> getMethods(mname) will retrieve definitions for all methods named
>>> mname getMethod(mname, sig) will retrieve definition for specified
>>> signature
>>>
>>> for your query
>>>
>>>> getMethod("readFastq", "character")
>>
>> Why the following command doesn't work for 'quality'?
>>
>>> getMethod('quality', 'ShortReadQ')
>> Error in getMethod("quality", "ShortReadQ") : No method found for
>> function "quality" and signature ShortReadQ
>>> showMethods('quality')
>> Function: quality (package Biostrings) x="ANY" x="FastqQuality"
>> (inherited from: x="ANY") x="ShortReadQ" (inherited from: x="ANY")
>
> see ?getMethod and the difference between selectMethod and getMethod,
> conveniently documented on the same page.
>
>     A call to ‘getMethod’ ... makes no use of inheritance.
>
>     The function ‘selectMethod’ ... makes full use of the method
>     dispatch mechanism;

Let me explain what I understand. Would you please let me know if my
understanding is correct?

quality is defined for signature 'ANY'. 'ShortReadQ' is inherited from
'ANY'. Since getMethod doesn't use inheritance, "getMethod('quality',
'ShortReadQ')" will not show retrieve the correct the function, right?


I also see the class 'derivedDefaultMethod', where is it defined?

> selectMethod(quality, 'ShortReadQ')
Method Definition (Class "derivedDefaultMethod"):

function (x)
x at quality
<environment: namespace:Biostrings>

Signatures:
        x
target  "ShortReadQ"
defined "ANY"

-- 
Regards,
Peng



More information about the Bioconductor mailing list