Sample code doesn't seem to be working on fresh install of regioneR
1
1
Entering edit mode
rcavalca ▴ 140
@rcavalca-7718
Last seen 5.8 years ago
United States

Hello,

I just installed regioneR and tried to run some of the examples in the vignette but they failed. After a fresh install from Bioconductor I did:

library(regioneR)
A <- toGRanges(data.frame(chr=c("chr1", "chr1", "chr1"), start=c(20000, 50000, 100000), end=c(22000, 70000, 400000)))
randomizeRegions(A, genome="hg19")

Error in which(genome == inst_pkgs[, "provider_version"]) : error in evaluating the argument 'x' in selecting a method for function 'which': Error in `[.data.frame`(inst_pkgs, , "provider_version") : undefined columns selected

Here is my sessionInfo():

> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-apple-darwin14.5.0 (64-bit)
Running under: OS X 10.11.4 (El Capitan)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
 [1] regioneR_1.2.3       BSgenome_1.38.0      rtracklayer_1.30.4  
 [4] Biostrings_2.38.4    XVector_0.10.0       GenomicRanges_1.22.4
 [7] GenomeInfoDb_1.6.3   IRanges_2.4.8        S4Vectors_0.8.11    
[10] BiocGenerics_0.16.1  memoise_1.0.0       

loaded via a namespace (and not attached):
 [1] zlibbioc_1.16.0            GenomicAlignments_1.6.3   
 [3] BiocParallel_1.4.3         tools_3.2.2               
 [5] SummarizedExperiment_1.0.2 Biobase_2.30.0            
 [7] lambda.r_1.1.7             futile.logger_1.4.1       
 [9] digest_0.6.9               futile.options_1.0.0      
[11] bitops_1.0-6               RCurl_1.95-4.8            
[13] Rsamtools_1.22.0           XML_3.98-1.4   
regioner • 1.5k views
ADD COMMENT
0
Entering edit mode

As a quick update, I installed regioneR fresh on another system and tried the same code from the vignette and received the same error.

ADD REPLY
1
Entering edit mode
@martin-morgan-1513
Last seen 3 months ago
United States

After I run the command above, my sessionInfo() includes the BSgenome.Hsapiens.UCSC.hg19 package; I think code (in BSgenome) is assuming that at least one BSgenome package is already installed. Try installing the BSgenome*hg19 package.

ADD COMMENT
0
Entering edit mode

Thanks, that was the problem. I suppose this means that BSgenome.Hsapiens.UCSC.hg19 should be a dependency. Unfortunately it's a huge dependency.

ADD REPLY
0
Entering edit mode

Hi rcavalca,

Actually BSgenome.Hsapiens.UCSC.hg19.masked is not a dependency but a suggested package.  The idea is that you need at least the BSgenome for the organism you want to work with. If you want to use the mask (so no regions ends up in the centromere, for example) then you should use the ".masked" version of the package.

You are right that it's a huge dependency. We are in the process of creating a small cache of the needed data for the most frequently used genomes and include it with regioneR, so no big download is needed.

ADD REPLY
0
Entering edit mode

It's only needed if you're working on humans and a particular genome build, so it is not a dependency per se but rather a suggested package. It (or the genome for the model or semi-model organism you work on) will be used in many Bioconductor work flows, not just regioneR, so the cost is not so bad.

ADD REPLY

Login before adding your answer.

Traffic: 449 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6