[Bioc-devel] Import BSgenome class without attaching BiocGenerics (and others)?
|@wrence@m|ch@e| @end|ng |rom gene@com
Fri Sep 6 13:09:11 CEST 2019
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 way to define method signatures using
anything other than simple class names.
It would be interesting to explore alternative ways of specifying
method signatures. One way would be if every package exported a "class
reference" (class name with package attribute, at least) for each of
its classes. Those could be treated like any other exported object,
and referenced via namespace qualification. It would require major
changes to the methods package but that should probably happen anyway
to support disambiguation when two packages define a class of the same
name. It would be nice to get away from the exportClasses() and
importClasses() stuff. File that under the "rainy year" category.
On Fri, Sep 6, 2019 at 3:39 AM Bhagwat, Aditya
<Aditya.Bhagwat using mpi-bn.mpg.de> wrote:
> Dear Bioc devel,
> Is it possible to import the BSgenome class without attaching BiocGenerics (to keep a clean namespace during the development of multicrispr<https://gitlab.gwdg.de/loosolab/software/multicrispr>).
> BSgenome <- methods::getClassDef('BSgenome', package = 'BSgenome')
> (Posted earlier on BioC support<https://support.bioconductor.org/p/124442/> and redirected here following Martin's suggestion)
> Thankyou :-)
> [[alternative HTML version deleted]]
> Bioc-devel using r-project.org mailing list
Scientist, Bioinformatics and Computational Biology
Genentech, A Member of the Roche Group
Office +1 (650) 225-7760
michafla using gene.com
Join Genentech on LinkedIn | Twitter | Facebook | Instagram | YouTube
More information about the Bioc-devel