R failing to load genome files from EnsDb.Hsapiens.v86
0
2
Entering edit mode
@michaelschoeber-18398
Last seen 6.1 years ago
Austria/Vienna/CCRI

Hi, 

I would like to construct a tx2gene data frame for summarizing transcript expression to gene level expression via tximport. 

I did not get any errors when installing the "ensembldb" or the "EnsDb.Hsapiens.v86" packages as far as I noticed, I can also load them normally via the library function, however when i try to assign EnsDb.Hsapiens.v86 to some variable R tells me "Error: object 'EnsDb.Hsapiens.v86' not found".

I tried to install the packages in different ways, also tried "EnsDb.Hsapiens.v75", as well as "TxDb.Hsapiens.UCSC.hg19.knownGene", with the same outcome. Might there be something going on with the library?

Either way I am pretty much stuck on this and would really appreciate some help. Thanks in advance!

Best,

Michael

tximport ensembldb EnsDB.hsapiens.v86 • 4.4k views
ADD COMMENT
1
Entering edit mode

Could you please provide the code you are using and any output. Also please provide sessionInfo() so we know which version of R/Bioc and OS you are using.

I currently can do the following with no error:

> library(EnsDb.Hsapiens.v86) 
> db = EnsDb.Hsapiens.v86 
> db
EnsDb for Ensembl:
|Backend: SQLite
|Db type: EnsDb
|Type of Gene ID: Ensembl Gene ID
|Supporting package: ensembldb
|Db created by: ensembldb package from Bioconductor
|script_version: 0.3.0
|Creation time: Thu May 18 16:32:27 2017
|ensembl_version: 86
|ensembl_host: localhost
|Organism: homo_sapiens
|taxonomy_id: 9606
|genome_build: GRCh38
|DBSCHEMAVERSION: 2.0
| No. of genes: 63970.
| No. of transcripts: 216741.
|Protein data available.

> sessionInfo()
R Under development (unstable) (2018-11-18 r75627)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS

Matrix products: default
BLAS: /home/lori/bin/R-devel/lib/libRblas.so
LAPACK: /home/lori/bin/R-devel/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] EnsDb.Hsapiens.v86_2.99.0 ensembldb_2.7.2          
 [3] AnnotationFilter_1.7.0    GenomicFeatures_1.35.3   
 [5] AnnotationDbi_1.45.0      Biobase_2.43.0           
 [7] GenomicRanges_1.35.1      GenomeInfoDb_1.19.1      
 [9] IRanges_2.17.1            S4Vectors_0.21.5         
[11] BiocGenerics_0.29.1       BiocManager_1.30.4
ADD REPLY
0
Entering edit mode

I tried 

library(EnsDb.Hsapiens.v86)

edb <- EnsDb.Hsapiens.v86
Tx <- transcripts(edb)

sessionInfo()
 

The console output is as following:

> library(EnsDb.Hsapiens.v86)
> 
> edb <- EnsDb.Hsapiens.v86
Error: object 'EnsDb.Hsapiens.v86' not found
> Tx <- transcripts(edb)
Error in transcripts(edb) : object 'edb' not found
> 
> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=German_Austria.1252  LC_CTYPE=German_Austria.1252    LC_MONETARY=German_Austria.1252
[4] LC_NUMERIC=C                    LC_TIME=German_Austria.1252    

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

other attached packages:
 [1] EnsDb.Hsapiens.v75_2.99.0               TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2
 [3] BiocManager_1.30.4                      rhdf5_2.26.0                           
 [5] DESeq2_1.22.1                           SummarizedExperiment_1.12.0            
 [7] DelayedArray_0.8.0                      BiocParallel_1.16.0                    
 [9] matrixStats_0.54.0                      forcats_0.3.0                          
[11] stringr_1.3.1                           dplyr_0.7.8                            
[13] purrr_0.2.5                             tidyr_0.8.2                            
[15] tibble_1.4.2                            ggplot2_3.1.0                          
[17] tidyverse_1.2.1                         readr_1.1.1                            
[19] tximport_1.10.0                         EnsDb.Hsapiens.v86_2.99.0              
[21] ensembldb_2.6.2                         AnnotationFilter_1.6.0                 
[23] GenomicFeatures_1.34.1                  AnnotationDbi_1.44.0                   
[25] Biobase_2.42.0                          GenomicRanges_1.34.0                   
[27] GenomeInfoDb_1.18.1                     IRanges_2.16.0                         
[29] S4Vectors_0.20.1                        BiocGenerics_0.28.0                    

loaded via a namespace (and not attached):
 [1] colorspace_1.3-2         htmlTable_1.12           XVector_0.22.0           base64enc_0.1-3         
 [5] rstudioapi_0.8           bit64_0.9-7              lubridate_1.7.4          xml2_1.2.0              
 [9] splines_3.5.1            geneplotter_1.60.0       knitr_1.20               Formula_1.2-3           
[13] jsonlite_1.5             Rsamtools_1.34.0         broom_0.5.0              annotate_1.60.0         
[17] cluster_2.0.7-1          compiler_3.5.1           httr_1.3.1               backports_1.1.2         
[21] assertthat_0.2.0         Matrix_1.2-15            lazyeval_0.2.1           cli_1.0.1               
[25] acepack_1.4.1            htmltools_0.3.6          prettyunits_1.0.2        tools_3.5.1             
[29] bindrcpp_0.2.2           gtable_0.2.0             glue_1.3.0               GenomeInfoDbData_1.2.0  
[33] Rcpp_1.0.0               cellranger_1.1.0         Biostrings_2.50.1        nlme_3.1-137            
[37] rtracklayer_1.42.0       rvest_0.3.2              XML_3.98-1.16            zlibbioc_1.28.0         
[41] scales_1.0.0             hms_0.4.2                ProtGenerics_1.14.0      RColorBrewer_1.1-2      
[45] yaml_2.2.0               curl_3.2                 memoise_1.1.0            gridExtra_2.3           
[49] biomaRt_2.38.0           rpart_4.1-13             latticeExtra_0.6-28      stringi_1.2.4           
[53] RSQLite_2.1.1            genefilter_1.64.0        checkmate_1.8.5          rlang_0.3.0.1           
[57] pkgconfig_2.0.2          bitops_1.0-6             lattice_0.20-38          Rhdf5lib_1.4.0          
[61] bindr_0.1.1              GenomicAlignments_1.18.0 htmlwidgets_1.3          bit_1.1-14              
[65] tidyselect_0.2.5         plyr_1.8.4               magrittr_1.5             R6_2.3.0                
[69] Hmisc_4.1-1              DBI_1.0.0                pillar_1.3.0             haven_1.1.2             
[73] foreign_0.8-71           withr_2.1.2              survival_2.43-1          RCurl_1.95-4.11         
[77] nnet_7.3-12              modelr_0.1.2             crayon_1.3.4             progress_1.2.0          
[81] locfit_1.5-9.1           grid_3.5.1               readxl_1.1.0             data.table_1.11.8       
[85] blob_1.1.1               digest_0.6.18            xtable_1.8-3             munsell_0.5.0           
> 

Thank you for your quick reply!

ADD REPLY
1
Entering edit mode

What is the output when you do

library(EnsDb.Hsapiens.v86)
ls('package:EnsDb.Hsapiens.v86')
ADD REPLY
0
Entering edit mode

In that case the output is 

> library(EnsDb.Hsapiens.v86)
> ls('package:EnsDb.Hsapiens.v86')
character(0)
> 
ADD REPLY
1
Entering edit mode

I'm still unable to reproduce this - Could you try reinstalling with

BiocManager::install("EnsDb.Hsapiens.v86")
ADD REPLY
1
Entering edit mode

This is indeed strange. By default, when loading the EnsDb.Hsapiens.v86 all sqlite files in the package's extdata folder get bound and exported as a variable. Can you verify that your package contains such an sqlite file?

> dir(system.file("extdata", package = "EnsDb.Hsapiens.v86"))
[1] "EnsDb.Hsapiens.v86.sqlite"
ADD REPLY
0
Entering edit mode
> dir(system.file("extdata", package = "EnsDb.Hsapiens.v86"))
character(0)

I think this is more of an installation problem than anything. I will try to reinstall R.

Thank you for your help so far!

ADD REPLY
1
Entering edit mode

Yes, looks like that. You could also specifically look in the package libary directory  (EnsDb.Hsapiens.v86/extdata) in the path where your library is (which you get with .libPaths() in R).

Please let me know if re-installation solved the problem.

ADD REPLY

Login before adding your answer.

Traffic: 542 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