Authors: Koki Tsuyuzaki [aut, cre], Manabu Ishii [aut], Itoshi Nikaido [aut]
Last modified: 2023-03-28 14:09:01.045889
Compiled: Tue Mar 28 14:11:09 2023

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 494 records
## # snapshotDate(): 2023-03-28
## # $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  |
##   ...       
##   AH111527 |
##   AH111528 |
##   AH111529 |
##   AH111530 |
##   AH111531 |
##            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,...
##   ...      ...                                                                
##   AH111527 MeSHDb for Xenopus tropicalis (Tropical clawed frog, v005)         
##   AH111528 MeSHDb for Zea mays (Corn, v005)                                   
##   AH111529 MeSHDb for MeSH.db (v005)                                          
##   AH111530 MeSHDb for MeSH.AOR.db (v005)                                      
##   AH111531 MeSHDb for MeSH.PCR.db (v005)

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

mcols(query(ah, "MeSHDb"))
## DataFrame with 494 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
## ...                         ...          ...                    ...        ...
## AH111527 MeSHDb for Xenopus t..   NCBI,DBCLS     Xenopus tropicalis       8364
## AH111528 MeSHDb for Zea mays ..   NCBI,DBCLS               Zea mays       4577
## AH111529 MeSHDb for MeSH.db (..   NCBI,DBCLS                     NA         NA
## AH111530 MeSHDb for MeSH.AOR...   NCBI,DBCLS                     NA         NA
## AH111531 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
## ...              ...                    ...                ...
## AH111527          NA Correspondence table..                  1
## AH111528          NA Correspondence table..                  1
## AH111529          NA Correspondence table..                  1
## AH111530          NA MeSH Hierarchical st..                  1
## AH111531          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
## ...                         ...            ...           ...
## AH111527 Koki Tsuyuzaki <k.t...     2023-03-28     AHMeSHDbs
## AH111528 Koki Tsuyuzaki <k.t...     2023-03-28     AHMeSHDbs
## AH111529 Koki Tsuyuzaki <k.t...     2023-03-28     AHMeSHDbs
## AH111530 Koki Tsuyuzaki <k.t...     2023-03-28     AHMeSHDbs
## AH111531 Koki Tsuyuzaki <k.t...     2023-03-28     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
## ...                                                   ...         ...
## AH111527        Annotation,DBCLS,FunctionalAnnotation,...  SQLiteFile
## AH111528                        Annotation,Corn,DBCLS,...  SQLiteFile
## AH111529        Annotation,DBCLS,FunctionalAnnotation,...  SQLiteFile
## AH111530        Annotation,DBCLS,FunctionalAnnotation,...  SQLiteFile
## AH111531        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
## ...                         ...                    ...         ...
## AH111527 AHMeSHDbs/v005/MeSH... https://github.com/r..         TSV
## AH111528 AHMeSHDbs/v005/MeSH... https://github.com/r..         TSV
## AH111529 AHMeSHDbs/v005/MeSH... https://github.com/r..         TSV
## AH111530 AHMeSHDbs/v005/MeSH... https://github.com/r..         TSV
## AH111531 AHMeSHDbs/v005/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 Under development (unstable) (2023-01-05 r83566)
## Platform: x86_64-apple-darwin21.6.0 (64-bit)
## Running under: macOS Monterey 12.6.2
## 
## Matrix products: default
## BLAS:   /Users/ka36530/R-stuff/bin/R-devel/lib/libRblas.dylib 
## LAPACK: /Users/ka36530/R-stuff/bin/R-devel/lib/libRlapack.dylib;  LAPACK version 3.11.0
## 
## locale:
## [1] C/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## time zone: America/New_York
## tzcode source: system (macOS)
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] AnnotationHub_3.7.1 BiocFileCache_2.7.1 dbplyr_2.3.0       
## [4] BiocGenerics_0.45.0 BiocStyle_2.27.1   
## 
## loaded via a namespace (and not attached):
##  [1] KEGGREST_1.39.0               xfun_0.37                    
##  [3] bslib_0.4.2                   Biobase_2.59.0               
##  [5] bitops_1.0-7                  vctrs_0.5.2                  
##  [7] tools_4.3.0                   generics_0.1.3               
##  [9] stats4_4.3.0                  curl_5.0.0                   
## [11] tibble_3.1.8                  fansi_1.0.4                  
## [13] AnnotationDbi_1.61.0          RSQLite_2.2.20               
## [15] blob_1.2.3                    pkgconfig_2.0.3              
## [17] S4Vectors_0.37.3              assertthat_0.2.1             
## [19] GenomeInfoDbData_1.2.9        lifecycle_1.0.3              
## [21] compiler_4.3.0                Biostrings_2.67.0            
## [23] GenomeInfoDb_1.35.15          httpuv_1.6.9                 
## [25] htmltools_0.5.4               sass_0.4.5                   
## [27] RCurl_1.98-1.10               yaml_2.3.7                   
## [29] interactiveDisplayBase_1.37.0 pillar_1.8.1                 
## [31] later_1.3.0                   crayon_1.5.2                 
## [33] jquerylib_0.1.4               ellipsis_0.3.2               
## [35] cachem_1.0.6                  mime_0.12                    
## [37] tidyselect_1.2.0              digest_0.6.31                
## [39] purrr_1.0.1                   dplyr_1.1.0                  
## [41] bookdown_0.32                 BiocVersion_3.17.1           
## [43] fastmap_1.1.0                 cli_3.6.0                    
## [45] magrittr_2.0.3                utf8_1.2.3                   
## [47] withr_2.5.0                   filelock_1.0.2               
## [49] promises_1.2.0.1              rappdirs_0.3.3               
## [51] bit64_4.0.5                   rmarkdown_2.20               
## [53] XVector_0.39.0                httr_1.4.4                   
## [55] bit_4.0.5                     png_0.1-8                    
## [57] memoise_2.0.1                 shiny_1.7.4                  
## [59] evaluate_0.20                 knitr_1.42                   
## [61] IRanges_2.33.0                rlang_1.0.6                  
## [63] Rcpp_1.0.10                   xtable_1.8-4                 
## [65] glue_1.6.2                    DBI_1.1.3                    
## [67] BiocManager_1.30.19           jsonlite_1.8.4               
## [69] R6_2.5.1                      zlibbioc_1.45.0