[Bioc-devel] graph package conflict with rtracklayer

Martin Morgan mtmorgan at fhcrc.org
Sat Oct 8 00:14:39 CEST 2011


On 10/06/2011 10:32 AM, John Chambers wrote:
> Mainly for Martin:
>
> Have you tried this with the current version(s)? I installed your pkgA
> with the current trunk (well, plus a couple of my fixes but these are
> asserted to only relate to reference classes ;-))
>
> And:
>
>  > setOldClass(c("file", "connection"))
>  > options(error=recover)
>  > require(pkgA)
> Loading required package: pkgA
>  > foo()
> [1] "OK"
>
> which AFAICS is the version of the bug you reported to me:
>
> mtmorgan at linux-ibmc:/tmp> R
>  > setOldClass(c("file", "connection"))
>  > library(pkgA)
>  > foo()
> Error in function (classes, fdef, mtable) :
> unable to find an inherited method for function "fun", for signature
> "file"

Hi John et al.,

For a reproducible example of Malcom's problem under R-2-12.2 I get

 > library(graph); library(rtracklayer)
Loading required package: RCurl
Loading required package: bitops
 > fl = system.file("tests", "test.bed", package="rtracklayer")
 > import.bed(fl)
Error in function (classes, fdef, mtable)  :
   unable to find an inherited method for function "import.ucsc", for 
signature "file"

but under R-2.14.0 alpha I get

 > library(graph); library(rtracklayer)
Loading required package: RCurl
Loading required package: bitops
 > fl = system.file("tests", "test.bed", package="rtracklayer")
 > res = import.bed(fl)
 >

so I think the symptom has been resolved.

As previously and for what it's worth pkgA contains

   setOldClass(c("file", "connection")
   setClassUnion("characterORconnection", c("character", "connection"))

and does not export any class. Nonetheless the class definition leaks to 
the global name space (likewise with setOldClass alone).

 > library(pkgA); getClassDef("file")
Virtual Class "file" [package "pkgA"]

Slots:

Name:   .S3Class
Class: character

Extends:
Class "connection", directly
Class "oldClass", by class "connection", distance 2
Class "characterORconnection", by class "connection", distance 2


 >
>
>
> John
>
>
> On 10/6/11 10:04 AM, Cook, Malcolm wrote:
>> Hi Michael& Martin,
>>
>> Michael replied to my problem (stated below) that:
>>
>> "This issue has been reported before. The resolution was that there
>> are odd things going on in the methods package. Pretty sure we
>> reported this to John."
>>
>> Ah, yes, now I see it has been reported, with Martin replying (on
>> 12/2010 in
>> https://stat.ethz.ch/pipermail/bioconductor/2010-December/036755.html)
>>
>> " I forwarded an example to John Chambers, and will report back ..."
>>
>> Pending a resolution, is there any advice for a best workaround aside
>> from not loading both `graph` and `rtracklayer` libraries.
>>
>> Also, off topic, but, is there any advice on tracking status of issues
>> with bioconductor packages other than emailing to the list and package
>> authors? The CPAN (for perl) offers an 'rt bug tracker' which forwards
>> posted issues to developers. Something like that might be a grand
>> addition!
>>
>> Thanks!
>>
>> ~Malcolm
>>
>> -----Original Message-----
>> From: bioc-devel-bounces at r-project.org
>> [mailto:bioc-devel-bounces at r-project.org] On Behalf Of Cook, Malcolm
>> Sent: Friday, June 10, 2011 2:57 PM
>> To: 'Michael Lawrence'
>> Cc: 'bioc-devel at r-project.org'; 'bioc-sig-sequencing at r-project.org'
>> Subject: [Bioc-devel] graph package conflict with rtracklayer
>>
>> Michael& Robert,
>>
>> If I load the graph package prior to rtracklayer, import.bed generates
>> an error and fails. It otherwise succeeds if I don't load the graph
>> package.
>>
>> It happens both with rtracklayer from svn and production.
>>
>> Look:
>>
>> In a fresh session:
>>
>>> library(graph)
>>> library(rtracklayer)
>> Loading required package: RCurl
>> Loading required package: bitops
>>> b<- import.bed('my.bed')
>> Error in function (classes, fdef, mtable) :
>> unable to find an inherited method for function "import.ucsc", for
>> signature "file"
>>> sessionInfo()
>> R version 2.13.0 (2011-04-13)
>> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
>>
>> locale:
>> [1] C
>>
>> attached base packages:
>> [1] stats graphics grDevices utils datasets methods base
>>
>> other attached packages:
>> [1] rtracklayer_1.13.3 RCurl_1.5-0 bitops_1.0-4.1 graph_1.30.0
>>
>> loaded via a namespace (and not attached):
>> [1] BSgenome_1.20.0 Biostrings_2.20.1 GenomicRanges_1.4.6
>> [4] IRanges_1.10.4 XML_3.4-0 tools_2.13.0
>>>
>>
>> _______________________________________________
>> Bioc-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>


-- 
Computational Biology
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109

Location: M1-B861
Telephone: 206 667-2793



More information about the Bioc-devel mailing list