Skip to content
Back to formatted view

Raw Message

Message-ID: <20170611005650.GC7685@falafel.plessy.net>
Date: 2017-06-11T00:56:50Z
From: Charles Plessy
Subject: [Bioc-devel] Passing packages as variables?
In-Reply-To: <d206643e-a96d-e79c-3b64-04f8576d6c1e@wustl.edu>

Le Sat, Jun 10, 2017 at 03:11:37PM -0400, Zach Skidmore a ?crit :
> 
> genome <- findCorrectGenome()
> library(genome, character.only=T)
> refBases <- getSeq(genome, Granges)
> detach(genome, unload = T, character.only = T)
> 
> It feels wrong to have library calls like this within the package though. As
> an alternative I suppose I could put in the suggests field all BSgenome
> packages, but I don't really want to do that either. does any one have a
> better idea? I think the ideal solution would be to just do something like
> this:
> 
> refBases <- getSeq(geome::genome, Granges)

Hello Zach,

recently, I did something like this:

requireNamespace(genome)
genome <- getExportedValue(genome, genome)

I am not sure if it is the best solution, but for the moment, it works.

Have a nice week-end,

Charles

-- 
Charles Plessy, Ph.D. ? RIKEN Center for Life Science Technologies
Division of Genomic Technologies ? Genomics Miniaturization Technology Unit
1-7-22 Suehiro-cho, Tsurumi-ku, Yokohama, Kanagawa 230-0045 Japan
????????????? http://population-transcriptomics.org ?????????????