EnsDb.Rnorvegicus for Rnor6
1
0
Entering edit mode
keremwai • 0
@keremwai-23766
Last seen 3.7 years ago

Is there a package version of EnsDb.Rnorvegicus that is based on the newer version of Rattus Norvegicus reference Rnor6? All I could find is v79 which is based on older reference Rnor5. Thanks Kerem

annotation db reference rnor6 • 1.8k views
ADD COMMENT
2
Entering edit mode
Guido Hooiveld ★ 3.9k
@guido-hooiveld-2020
Last seen 4 hours ago
Wageningen University, Wageningen, the …

Yes, please have a look at the excellent ENSEMBL-based annotation packages Johannes Rainer provides through the AnnotationHub!

See below for some code to get you started. Note that I am using ENSEMBL v100, but if needed you can easily create a EnsDb for another ENSEMBL version!

> # if needed, install required libraries.
> BiocManager::install(c("AnnotationHub", "ensembldb", "AnnotationForge")
> 
> library(AnnotationHub)
> library(ensembldb)
> library(AnnotationForge)
>
> # start an AnnotationHub instance/connection.
> ah <- AnnotationHub()
snapshotDate(): 2020-04-27
> 
> # query for availabel Rat Ensembl databases
> EnsDb.rat <- query(ah, c("EnsDb", "Rattus norvegicus"))
> EnsDb.rat
AnnotationHub with 14 records
# snapshotDate(): 2020-04-27
# $dataprovider: Ensembl
# $species: Rattus norvegicus
# $rdataclass: EnsDb
# additional mcols(): taxonomyid, genome, description,
#   coordinate_1_based, maintainer, rdatadateadded, preparerclass, tags,
#   rdatapath, sourceurl, sourcetype 
# retrieve records with, e.g., 'object[["AH53239"]]' 

            title                                  
  AH53239 | Ensembl 87 EnsDb for Rattus Norvegicus 
  AH53743 | Ensembl 88 EnsDb for Rattus Norvegicus 
  AH56709 | Ensembl 89 EnsDb for Rattus Norvegicus 
  AH57792 | Ensembl 90 EnsDb for Rattus Norvegicus 
  AH60814 | Ensembl 91 EnsDb for Rattus Norvegicus 
  ...       ...                                    
  AH69261 | Ensembl 96 EnsDb for Rattus norvegicus 
  AH73956 | Ensembl 97 EnsDb for Rattus norvegicus 
  AH75088 | Ensembl 98 EnsDb for Rattus norvegicus 
  AH78871 | Ensembl 99 EnsDb for Rattus norvegicus 
  AH79776 | Ensembl 100 EnsDb for Rattus norvegicus
>
> # Fetch the v100 EnsDb and put it in the cache.
> EnsDb.rat <- EnsDb.rat[["AH79776"]]
>
> #check
> columns(EnsDb.rat)
 [1] "DESCRIPTION"         "ENTREZID"            "EXONID"             
 [4] "EXONIDX"             "EXONSEQEND"          "EXONSEQSTART"       
 [7] "GCCONTENT"           "GENEBIOTYPE"         "GENEID"             
   <<snip>>
> 
> 
> # Now copy, and install the database locally.
> # By doing so, you can just quickly load the library next time.
> # see: ?makeEnsembldbPackage
> 
> #set working dir to store the relaively large files.
> setwd("E:\\myDir")
>
> #copy databse from the cache to working dir
> file.copy(AnnotationHub::cache(ah["AH79776"]), "./EnsDb.rat.sqlite")
 [1] TRUE
>
> # now make it a package. Change name and email accordingly
> makeEnsembldbPackage("EnsDb.rat.sqlite", version="0.0.1",
+     maintainer = "First Name <first.last@mydomain.com>",
+     author = "First Name <first.last@mydomain.com>",
+     destDir=".", license="Artistic-2.0")
Creating package in ./EnsDb.Rnorvegicus.v100 
[1] TRUE
>
>
> # install package in R.  
> # note modifed name of created directory (not EnsDb.rat... but EnsDb.Rnorvegicus.v100)
> install.packages("./EnsDb.Rnorvegicus.v100", type = "source", repos = NULL)
* installing *source* package 'EnsDb.Rnorvegicus.v100' ...
** using staged installation
* DONE (EnsDb.Rnorvegicus.v100)
> 
> #check: 
> library(EnsDb.Rnorvegicus.v100)
> EnsDb.Rnorvegicus.v100
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.5
|Creation time: Sat May  2 05:29:36 2020
|ensembl_version: 100
|ensembl_host: localhost
|Organism: Rattus norvegicus
|taxonomy_id: 10116
|genome_build: Rnor_6.0
|DBSCHEMAVERSION: 2.1
| No. of genes: 32883.
| No. of transcripts: 41078.
|Protein data available.
>
> columns(EnsDb.Rnorvegicus.v100)
 [1] "DESCRIPTION"         "ENTREZID"            "EXONID"             
  <<snip>>      
[37] "UNIPROTID"           "UNIPROTMAPPINGTYPE" 
>
ADD COMMENT
0
Entering edit mode

Below some code to create 'an-easy-to-transport' package from it (didn't fit in answer above).

> # If needed, create packages for offline installation
> # in other R installations.
> # Use library devtools for this!
>
> library(devtools)
> 
> # To create a binary (ZIP) 
Loading required package: usethis
> build("EnsDb.Rnorvegicus.v100", binary = TRUE)

-  installing to library 'C:/TMP_R/RtmpGSRmpU/temp_libpath3ec4539149f1' (555ms)
  packaged installation of 'EnsDb.Rnorvegicus.v100' as EnsDb.Rnorvegicus.v100_0.0.1.zip
-  DONE (EnsDb.Rnorvegicus.v100)

[1] "E:/xxxx/EnsDb/EnsDb.Rnorvegicus.v100_0.0.1.zip"
> 
> # To create a source package (TAR.GZ)
> build("EnsDb.Rnorvegicus.v100", binary = FALSE)
    -  building 'EnsDb.Rnorvegicus.v100_0.0.1.tar.gz'
 [1] "E:/xxxx/EnsDb/EnsDb.Rnorvegicus.v100_0.0.1.tar.gz"
> 
> 
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)

Matrix products: default

Random number generation:
 RNG:     Mersenne-Twister 
 Normal:  Inversion 
 Sample:  Rounding 

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
 [1] devtools_2.3.0               usethis_1.6.1               
 [3] EnsDb.Rnorvegicus.v100_0.0.1 AnnotationForge_1.30.1      
 [5] ensembldb_2.12.1             AnnotationFilter_1.12.0     
 [7] GenomicFeatures_1.40.0       AnnotationDbi_1.50.0        
 [9] Biobase_2.48.0               GenomicRanges_1.40.0        
[11] GenomeInfoDb_1.24.2          IRanges_2.22.2              
[13] S4Vectors_0.26.1             AnnotationHub_2.20.0        
[15] BiocFileCache_1.12.0         dbplyr_1.4.4                
[17] BiocGenerics_0.34

You can then install the packages (see remarks James below). :-)

ADD REPLY
1
Entering edit mode

Don't forget the installation!

install.packages("E:/xxxx/EnsDb/EnsDb.Rnorvegicus.v100_0.0.1.tar.gz", repos = NULL)
## on Windows do
install.packages("E:/xxxx/EnsDb/EnsDb.Rnorvegicus.v100_0.0.1.tar.gz", repos = NULL, type = "source")

And now you can load like any package.

ADD REPLY

Login before adding your answer.

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