[Bioc-devel] GenomicFeatures TranscriptDb no applicable method for 'metadata' applied to an object of class "c('TranscriptDb', 'GenomicFeatures')"

Steve Lianoglou mailinglist.honeypot at gmail.com
Thu Jul 21 18:33:19 CEST 2011


Howdy,

Glad to see we got to the cause of the problem.

I've been like test_that for unit testing if you're looking for an
alternative to svUnit.

-steve


On Thu, Jul 21, 2011 at 11:54 AM, Cook, Malcolm <MEC at stowers.org> wrote:
>
>
> ~Malcolm
>
>
>> -----Original Message-----
>> From: Steve Lianoglou [mailto:mailinglist.honeypot at gmail.com]
>> Sent: Thursday, July 21, 2011 10:36 AM
>> To: Cook, Malcolm
>> Cc: bioc-devel at r-project.org
>> Subject: Re: [Bioc-devel] GenomicFeatures TranscriptDb no applicable
>> method for 'metadata' applied to an object of class "c('TranscriptDb',
>> 'GenomicFeatures')"
>>
>> Hi Malcolm,
>>
>> On Wed, Jul 20, 2011 at 9:40 AM, Cook, Malcolm <MEC at stowers.org> wrote:
>> > Can anyone advise me as to which is wrong: the library, the
>> documentation, or my understanding, in the following:
>> >
>> > in ?GenomicFeatures I read:
>> >
>> > 'metadata(x)': Returns 'x''s metadata in a data frame.
>> >
>> > But I find:
>> >
>> >> metadata(txdb)
>> > Error in UseMethod("metadata") :
>> >  no applicable method for 'metadata' applied to an object of class
>> "c('TranscriptDb', 'GenomicFeatures')"
>>
>> Are you still having this problem?
>
> yes but I've not refreshed my session/state since it first occurred
>
>> This a strange error -- it looks like 'metadata' might have been
>> trampled on by something (another package?), as this error indicates
>> that `metadata` is registered as an S3 type of
>> function/dispatch/mojo/thing.
>>
>> What does `showMethods('metadata')` show?
>
>> showMethods('metadata')
> Function: metadata (package IRanges)
> x="Annotated"
> x="CompressedIRangesList"
>    (inherited from: x="Annotated")
> x="FeatureDb"
> x="GRanges"
>    (inherited from: x="Annotated")
> x="TranscriptDb"
>
>>
>> I'm guessing you won't have problems if you fire up a new / clean R
>> environment, just load GenomicFeatures and then call `metadata` on
>> your object.
>
> Testing....
>
> ... yes.... you are right.
>
>>
>> If I'm correct, and another package is "trampling" on `metadata`,
>> perhaps you can it like so:
>>
>> R> IRanges::metadata(txdb)
>
> Of course.  Thanks.  That works.
>
>> If you're curious you can look for the offending package that
>> redefines metadata -- it most likely won't be any of the other
>> bioconductor packages that were listed in your session info, nor plyr
>> or ggplot2 for that matter (since I use those lots to, and I don't
>> have this problem).
>
> Aha - the culprit is svUnit which I've been using for unit testing.
>
> DANG!
>
>>
>> -steve
>>
>> --
>> Steve Lianoglou
>> Graduate Student: Computational Systems Biology
>>  | Memorial Sloan-Kettering Cancer Center
>>  | Weill Medical College of Cornell University
>> Contact Info: http://cbio.mskcc.org/~lianos/contact
>



-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact



More information about the Bioc-devel mailing list