[Bioc-devel] Hsapiens in bioconductor

Hervé Pagès hpages at fredhutch.org
Thu Sep 14 16:17:40 CEST 2017


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: hpages at fredhutch.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319



More information about the Bioc-devel mailing list