[Bioc-devel] graph package conflict with rtracklayer

Cook, Malcolm MEC at stowers.org
Tue Oct 11 21:03:34 CEST 2011


John,

I'm sorry for getting you looking at an issue that was apparently already addressed between my original email report and my recent resurrecting the topic. 

But do please note that my first report did include version numbers (below).

What I had not done was re-tested in the latest development version after four months of changes to it.

It was this passage of time, and the risk that I might have overlooked a resource that documented a fix, that had me wondering about issue tracking for R and its libraries.

Thanks for your consideration and patience.

Cheers,

~Malcolm Cook - Stowers Institute


> -----Original Message-----
> From: John Chambers [mailto:jmc at r-project.org]
> Sent: Tuesday, October 11, 2011 11:24 AM
> To: Martin Morgan
> Cc: Cook, Malcolm; 'Michael Lawrence'; 'bioc-devel at r-project.org'
> Subject: Re: graph package conflict with rtracklayer
> 
> Thanks, Martin.
> 
> Two comments:
> 
> 1.  As certain other members of R-core would remind you, please specify
> the version of R and check against a current version before reporting
> "bugs".
> 
> 2.  Re "leaks".  There is a global cache of known classes stored (in
> principle) by class#package.  This and other metadata from a package are
> updated when the namespace is loaded.  Exports are irrelevant, these
> control which objects appear in the package environment.
> 
> A class definition for a given name must be unique with a given package
> slot, regardless of exports.  The bug fixes over the last few versions
> try to ensure that multiple classes with the same name and different
> packages are handled correctly.  Still work in progress.  We might want
> to rethink how setOldClass deals with package slots, although given that
> there are no formal definitions for S3 classes, we can't hope for a
> universal solution.
> 
> John
> 
> On 10/7/11 3:14 PM, Martin Morgan wrote:
> > 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
> >>>
> >
> >



More information about the Bioc-devel mailing list