[Bioc-devel] Hsapiens in bioconductor
Dear bioc-devel, I would like to import Hsapiens objects from both BSgenome.Hsapiens.UCSC.hg19 and BSgenome.Hsapiens.UCSC.hg38 this is currently handled in the namespace of my package by import(BSgenome.Hsapiens.UCSC.hg19) import(BSgenome.Hsapiens.UCSC.hg38) I get warning (because I assign two different genomes to Hsapiens variable): Warning: replacing previous import ‘BSgenome.Hsapiens.UCSC.hg19::Hsapiens’ by ‘BSgenome.Hsapiens.UCSC.hg38::Hsapiens’ when loading ‘RareVariantVis’ Could you suggest how to avoid this warning? I would like to use both hg19 and hg38 references in my package. Packages are listed in my Description file under Imports:. Furthermore, I use them as BSgenome.Hsapiens.UCSC.hg38::Hsapiens in my code. Kind regards, -- Tomasz Stokowy Phd Senior Engineer Department of Clinical Science University of Bergen, Norway ___ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel
Re: [Bioc-devel] Hsapiens in bioconductor
Hello Tomaszu, On 9/14/17 2:14 PM, Tomasz Stokowy wrote: Could you suggest how to avoid this warning? I would like to use both hg19 and hg38 references in my package. super easy: library(BSgenome.Hsapiens.UCSC.hg19) suppressMessages(library(BSgenome.Hsapiens.UCSC.hg38)) ___ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel
Re: [Bioc-devel] Hsapiens in bioconductor
I think the point is that CMD check will issue a warning for the symbol collision implied by the import statements. I don't know that there is a way to do this. I think the namespace should be made to avoid conflicts and if a given name can have distinct values you will have to use code to sort them out at run time. On Thu, Sep 14, 2017 at 9:32 AM, Piotr Balwierz wrote: > Hello Tomaszu, > > On 9/14/17 2:14 PM, Tomasz Stokowy wrote: > >> >> Could you suggest how to avoid this warning? I would like to use both >> hg19 and hg38 references in my package. >> > super easy: > library(BSgenome.Hsapiens.UCSC.hg19) > suppressMessages(library(BSgenome.Hsapiens.UCSC.hg38)) > > > ___ > Bioc-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/bioc-devel > [[alternative HTML version deleted]] ___ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel
Re: [Bioc-devel] Hsapiens in bioconductor
Hi Tomasz, The name of the BSgenome object defined in a BSgenome data package is the name of the package itself. Hsapiens is just an convenient "alias" for the long name. So you could do: importFrom(BSgenome.Hsapiens.UCSC.hg19, BSgenome.Hsapiens.UCSC.hg19) importFrom(BSgenome.Hsapiens.UCSC.hg38, BSgenome.Hsapiens.UCSC.hg38) and there should be no more 'R CMD check' warning. Then you need to use the long name in your code to refer to the object. Hope this help, H. On 09/14/2017 06:14 AM, Tomasz Stokowy wrote: Dear bioc-devel, I would like to import Hsapiens objects from both BSgenome.Hsapiens.UCSC.hg19 and BSgenome.Hsapiens.UCSC.hg38 this is currently handled in the namespace of my package by import(BSgenome.Hsapiens.UCSC.hg19) import(BSgenome.Hsapiens.UCSC.hg38) I get warning (because I assign two different genomes to Hsapiens variable): Warning: replacing previous import ‘BSgenome.Hsapiens.UCSC.hg19::Hsapiens’ by ‘BSgenome.Hsapiens.UCSC.hg38::Hsapiens’ when loading ‘RareVariantVis’ Could you suggest how to avoid this warning? I would like to use both hg19 and hg38 references in my package. Packages are listed in my Description file under Imports:. Furthermore, I use them as BSgenome.Hsapiens.UCSC.hg38::Hsapiens in my code. Kind regards, -- Hervé Pagès Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M1-B514 P.O. Box 19024 Seattle, WA 98109-1024 h E-mail: hpa...@fredhutch.org Phone: (206) 667-5791 Fax:(206) 667-1319 ___ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel
Re: [Bioc-devel] Hsapiens in bioconductor
Dear Herve, Your solution worked out, no 'R CMD check' warning. -- Tomasz On Thu, 14 Sep 2017 18:09:44 +0200, wrote: Hi Tomasz, The name of the BSgenome object defined in a BSgenome data package is the name of the package itself. Hsapiens is just an convenient "alias" for the long name. So you could do: importFrom(BSgenome.Hsapiens.UCSC.hg19, BSgenome.Hsapiens.UCSC.hg19) importFrom(BSgenome.Hsapiens.UCSC.hg38, BSgenome.Hsapiens.UCSC.hg38) and there should be no more 'R CMD check' warning. Then you need to use the long name in your code to refer to the object. Hope this help, H. ___ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel