Re: [Bioc-devel] Import BSgenome class without attaching BiocGenerics (and others)?

2019-09-06 Thread Bhagwat, Aditya
Waaw, thanks Michael, that is really clarifying. From: Michael Lawrence [lawrence.mich...@gene.com] Sent: Friday, September 06, 2019 7:32 PM To: Bhagwat, Aditya Cc: Kasper Daniel Hansen; Michael Lawrence; bioc-devel@r-project.org Subject: Re: [Bioc-devel]

Re: [Bioc-devel] Import BSgenome class without attaching BiocGenerics (and others)?

2019-09-06 Thread Michael Lawrence via Bioc-devel
There's never a need to attach a package to satisfy the dependencies of another package. That would defeat the purpose of namespaces. The three coercion functions gets at the heart of the S3/S4 mess. setAs() provides a dynamic coercion mechanism, so is useful for as(x, class) when class can be

Re: [Bioc-devel] Import BSgenome class without attaching BiocGenerics (and others)?

2019-09-06 Thread Bhagwat, Aditya
Thanks Kasper and Michael. The importClassesFrom sounds like something that would allow an attachment-free S4 class import, will check them out. Michael, the current auto-attach is causing 66 namespace clashes – not feeling very comfortable about

Re: [Bioc-devel] Import BSgenome class without attaching BiocGenerics (and others)?

2019-09-06 Thread Kasper Daniel Hansen
There are importMethodsFrom(PACKAGE, NAME_OF_METHODS) importClassesFrom(PACKAGE, NAME_OF_METHODS) to help with selective importing S4 methods/classes. See section 1.5.6 of WRE. On Fri, Sep 6, 2019 at 9:24 AM Michael Lawrence via Bioc-devel < bioc-devel@r-project.org> wrote: > It sounds like

[Bioc-devel] List of Deprecated Packages Bioc 3.10

2019-09-06 Thread Shepherd, Lori
The Bioconductor Team is continuing to identify packages that will be deprecated in the next release to allow for the Bioconductor community to respond accordingly. The list will be updated monthly. The current list of deprecated packages for Bioc 3.10 is as follows: Maintainer requested

Re: [Bioc-devel] Import BSgenome class without attaching BiocGenerics (and others)?

2019-09-06 Thread Michael Lawrence via Bioc-devel
It sounds like you are trying to defer loading of namespaces in order to save time when they are unnecessary? That's probably going to end up a losing battle. On Fri, Sep 6, 2019 at 5:47 AM Bhagwat, Aditya wrote: > > Thank you Michael, > > Appreciate your time for helping me fill the gaps in my

Re: [Bioc-devel] Import BSgenome class without attaching BiocGenerics (and others)?

2019-09-06 Thread Bhagwat, Aditya
I noticed the unfriendly indentation and formatting of my response , so I updated my original question on BioC support (with a much more eye-friendly formatting): https://support.bioconductor.org/p/124442 From: Bhagwat, Aditya Sent: Friday, September 06, 2019

Re: [Bioc-devel] Import BSgenome class without attaching BiocGenerics (and others)?

2019-09-06 Thread Bhagwat, Aditya
Thank you Michael, Appreciate your time for helping me fill the gaps in my understanding of the S4 flow :-). It all started when I defined (in my multicrispr package) the S4 coercer : methods::setAs( "BSgenome", "GRanges", function(from) as(GenomeInfoDb::seqinfo(from), "GRanges") When

Re: [Bioc-devel] Import BSgenome class without attaching BiocGenerics (and others)?

2019-09-06 Thread Michael Lawrence via Bioc-devel
The way to keep a "clean namespace" is to selectively import symbols into your namespace, not to import _nothing_ into your namespace. Otherwise, your code will fill with namespace qualifications that distract from what is more important to communicate: the intent of the code. And no, there's no

[Bioc-devel] Import BSgenome class without attaching BiocGenerics (and others)?

2019-09-06 Thread Bhagwat, Aditya
Dear Bioc devel, Is it possible to import the BSgenome class without attaching BiocGenerics (to keep a clean namespace during the development of multicrispr). BSgenome <- methods::getClassDef('BSgenome', package = 'BSgenome') (Posted