Authors: Koki Tsuyuzaki [aut, cre], Manabu Ishii [aut], Itoshi Nikaido [aut]
Last modified: 2022-10-19 10:01:16
Compiled: Wed Oct 19 10:02:06 2022

1 Installation

To install this package, start R (>= 4.1.0) and enter:

if(!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install("AHMeSHDbs")

2 Fetch MeSHDb databases from AnnotationHub

The AHMeSHDbs package provides the metadata for all MeSHDb SQLite databases in AnnotationHub. First we load/update the AnnotationHub resource.

library(AnnotationHub)
ah <- AnnotationHub()

Next we list all MeSHDb entries from AnnotationHub.

query(ah, "MeSHDb")
## AnnotationHub with 421 records
## # snapshotDate(): 2022-10-18
## # $dataprovider: NCBI,DBCLS, FANTOM5,DLRP,IUPHAR,HPRD,STRING,SWISSPROT,TREMB...
## # $species: Xenopus tropicalis, Taeniopygia guttata, Sus scrofa, Strongyloce...
## # $rdataclass: SQLiteFile
## # additional mcols(): taxonomyid, genome, description,
## #   coordinate_1_based, maintainer, rdatadateadded, preparerclass, tags,
## #   rdatapath, sourceurl, sourcetype 
## # retrieve records with, e.g., 'object[["AH91572"]]' 
## 
##             
##   AH91572  |
##   AH91573  |
##   AH91574  |
##   AH91575  |
##   AH91576  |
##   ...       
##   AH107138 |
##   AH107139 |
##   AH107140 |
##   AH107141 |
##   AH107142 |
##            title                                                              
##   AH91572  MeSHDb for Anolis carolinensis (Anole lizard, v001)                
##   AH91573  MeSHDb for Anopheles gambiae str. PEST (Anopheline, v001)          
##   AH91574  MeSHDb for Ailuropoda melanoleuca (Panda, v001)                    
##   AH91575  MeSHDb for Apis mellifera (Honey bee, v001)                        
##   AH91576  MeSHDb for Aspergillus nidulans FGSC A4 (Filamentous ascomycete,...
##   ...      ...                                                                
##   AH107138 MeSHDb for Xenopus tropicalis (Tropical clawed frog, v004)         
##   AH107139 MeSHDb for Zea mays (Corn, v004)                                   
##   AH107140 MeSHDb for MeSH.db (v004)                                          
##   AH107141 MeSHDb for MeSH.AOR.db (v004)                                      
##   AH107142 MeSHDb for MeSH.PCR.db (v004)

We can confirm the metadata in AnnotationHub in Bioconductor S3 bucket with mcols().

mcols(query(ah, "MeSHDb"))
## DataFrame with 421 rows and 15 columns
##                           title dataprovider                species taxonomyid
##                     <character>  <character>            <character>  <integer>
## AH91572  MeSHDb for Anolis ca..   NCBI,DBCLS    Anolis carolinensis      28377
## AH91573  MeSHDb for Anopheles..   NCBI,DBCLS Anopheles gambiae st..     180454
## AH91574  MeSHDb for Ailuropod..   NCBI,DBCLS Ailuropoda melanoleuca       9646
## AH91575  MeSHDb for Apis mell..   NCBI,DBCLS         Apis mellifera       7460
## AH91576  MeSHDb for Aspergill..   NCBI,DBCLS Aspergillus nidulans..     227321
## ...                         ...          ...                    ...        ...
## AH107138 MeSHDb for Xenopus t..   NCBI,DBCLS     Xenopus tropicalis       8364
## AH107139 MeSHDb for Zea mays ..   NCBI,DBCLS               Zea mays       4577
## AH107140 MeSHDb for MeSH.db (..   NCBI,DBCLS                     NA         NA
## AH107141 MeSHDb for MeSH.AOR...   NCBI,DBCLS                     NA         NA
## AH107142 MeSHDb for MeSH.PCR...   NCBI,DBCLS                     NA         NA
##               genome            description coordinate_1_based
##          <character>            <character>          <integer>
## AH91572           NA Correspondence table..                  1
## AH91573           NA Correspondence table..                  1
## AH91574           NA Correspondence table..                  1
## AH91575           NA Correspondence table..                  1
## AH91576           NA Correspondence table..                  1
## ...              ...                    ...                ...
## AH107138          NA Correspondence table..                  1
## AH107139          NA Correspondence table..                  1
## AH107140          NA Correspondence table..                  1
## AH107141          NA MeSH Hierarchical st..                  1
## AH107142          NA MeSH Hierarchical st..                  1
##                      maintainer rdatadateadded preparerclass
##                     <character>    <character>   <character>
## AH91572  Koki Tsuyuzaki <k.t...     2021-04-19     AHMeSHDbs
## AH91573  Koki Tsuyuzaki <k.t...     2021-04-19     AHMeSHDbs
## AH91574  Koki Tsuyuzaki <k.t...     2021-04-19     AHMeSHDbs
## AH91575  Koki Tsuyuzaki <k.t...     2021-04-19     AHMeSHDbs
## AH91576  Koki Tsuyuzaki <k.t...     2021-04-19     AHMeSHDbs
## ...                         ...            ...           ...
## AH107138 Koki Tsuyuzaki <k.t...     2022-09-30     AHMeSHDbs
## AH107139 Koki Tsuyuzaki <k.t...     2022-09-30     AHMeSHDbs
## AH107140 Koki Tsuyuzaki <k.t...     2022-09-30     AHMeSHDbs
## AH107141 Koki Tsuyuzaki <k.t...     2022-09-30     AHMeSHDbs
## AH107142 Koki Tsuyuzaki <k.t...     2022-09-30     AHMeSHDbs
##                                                      tags  rdataclass
##                                                    <AsIs> <character>
## AH91572   Annotation,Anole lizard,Anolis carolinensis,...  SQLiteFile
## AH91573  Annotation,Anopheles gambiae st..,Anopheline,...  SQLiteFile
## AH91574       Ailuropoda melanoleuca,Annotation,DBCLS,...  SQLiteFile
## AH91575               Annotation,Apis mellifera,DBCLS,...  SQLiteFile
## AH91576       Annotation,Aspergillus nidulans..,DBCLS,...  SQLiteFile
## ...                                                   ...         ...
## AH107138        Annotation,DBCLS,FunctionalAnnotation,...  SQLiteFile
## AH107139                        Annotation,Corn,DBCLS,...  SQLiteFile
## AH107140        Annotation,DBCLS,FunctionalAnnotation,...  SQLiteFile
## AH107141        Annotation,DBCLS,FunctionalAnnotation,...  SQLiteFile
## AH107142        Annotation,DBCLS,FunctionalAnnotation,...  SQLiteFile
##                       rdatapath              sourceurl  sourcetype
##                     <character>            <character> <character>
## AH91572  AHMeSHDbs/v001/MeSH... https://github.com/r..         TSV
## AH91573  AHMeSHDbs/v001/MeSH... https://github.com/r..         TSV
## AH91574  AHMeSHDbs/v001/MeSH... https://github.com/r..         TSV
## AH91575  AHMeSHDbs/v001/MeSH... https://github.com/r..         TSV
## AH91576  AHMeSHDbs/v001/MeSH... https://github.com/r..         TSV
## ...                         ...                    ...         ...
## AH107138 AHMeSHDbs/v004/MeSH... https://github.com/r..         TSV
## AH107139 AHMeSHDbs/v004/MeSH... https://github.com/r..         TSV
## AH107140 AHMeSHDbs/v004/MeSH... https://github.com/r..         TSV
## AH107141 AHMeSHDbs/v004/MeSH... https://github.com/r..         TSV
## AH107142 AHMeSHDbs/v004/MeSH... https://github.com/r..         TSV

We can query only the MeSHDb SQLite files for species Mus musculus.

qr <- query(ah, c("MeSHDb", "Mus musculus"))
# filepath_mmu <- qr[[1]]

This filepath is can be specified with the argument of RSQLite::dbConnect and MeSHDbi::MeSHDb and also used as the argument of meshr, which is an R/Bioconductor package for MeSH enrichment analysis.

For the details, check the vignettes of RSQLite, MeSHDbi, and meshr.

Session information

## R version 4.2.0 Patched (2022-05-05 r82321)
## Platform: x86_64-apple-darwin19.6.0 (64-bit)
## Running under: macOS Catalina 10.15.7
## 
## Matrix products: default
## BLAS:   /Users/ka36530_ca/R-stuff/bin/R-4-2/lib/libRblas.dylib
## LAPACK: /Users/ka36530_ca/R-stuff/bin/R-4-2/lib/libRlapack.dylib
## 
## locale:
## [1] C/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] AnnotationHub_3.5.2 BiocFileCache_2.5.0 dbplyr_2.2.1       
## [4] BiocGenerics_0.43.4 BiocStyle_2.25.0   
## 
## loaded via a namespace (and not attached):
##  [1] Rcpp_1.0.9                    png_0.1-7                    
##  [3] Biostrings_2.65.6             assertthat_0.2.1             
##  [5] digest_0.6.29                 utf8_1.2.2                   
##  [7] mime_0.12                     R6_2.5.1                     
##  [9] GenomeInfoDb_1.33.7           stats4_4.2.0                 
## [11] RSQLite_2.2.17                evaluate_0.16                
## [13] httr_1.4.4                    pillar_1.8.1                 
## [15] zlibbioc_1.43.0               rlang_1.0.6                  
## [17] curl_4.3.3                    jquerylib_0.1.4              
## [19] blob_1.2.3                    S4Vectors_0.35.4             
## [21] rmarkdown_2.16                stringr_1.4.1                
## [23] RCurl_1.98-1.8                bit_4.0.4                    
## [25] shiny_1.7.2                   compiler_4.2.0               
## [27] httpuv_1.6.6                  xfun_0.33                    
## [29] pkgconfig_2.0.3               htmltools_0.5.3              
## [31] tidyselect_1.2.0              KEGGREST_1.37.3              
## [33] GenomeInfoDbData_1.2.9        tibble_3.1.8                 
## [35] interactiveDisplayBase_1.35.0 bookdown_0.29                
## [37] IRanges_2.31.2                fansi_1.0.3                  
## [39] withr_2.5.0                   crayon_1.5.2                 
## [41] dplyr_1.0.10                  later_1.3.0                  
## [43] bitops_1.0-7                  rappdirs_0.3.3               
## [45] jsonlite_1.8.2                xtable_1.8-4                 
## [47] lifecycle_1.0.3               DBI_1.1.3                    
## [49] magrittr_2.0.3                cli_3.4.1                    
## [51] stringi_1.7.8                 cachem_1.0.6                 
## [53] XVector_0.37.1                promises_1.2.0.1             
## [55] bslib_0.4.0                   ellipsis_0.3.2               
## [57] filelock_1.0.2                generics_0.1.3               
## [59] vctrs_0.4.2                   tools_4.2.0                  
## [61] bit64_4.0.5                   Biobase_2.57.1               
## [63] glue_1.6.2                    purrr_0.3.5                  
## [65] BiocVersion_3.16.0            fastmap_1.1.0                
## [67] yaml_2.3.5                    AnnotationDbi_1.59.1         
## [69] BiocManager_1.30.18           memoise_2.0.1                
## [71] knitr_1.40                    sass_0.4.2