Authors: Koki Tsuyuzaki [aut, cre], Manabu Ishii [aut], Itoshi Nikaido [aut]
Last modified: 2021-10-26 08:47:41
Compiled: Tue Oct 26 08:50:12 2021

1 Installation

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

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

2 Fetch PubMed tibble datasets from AnnotationHub

The AHPubMedDbs package provides the metadata for all PubMed datasets , which is preprocessed as tibble format and saved in AnnotationHub. First we load/update the AnnotationHub resource.

library(AnnotationHub)
ah <- AnnotationHub()

Next we list all PubMed entries from AnnotationHub.

query(ah, "PubMed")
## AnnotationHub with 42 records
## # snapshotDate(): 2021-10-20
## # $dataprovider: NCBI
## # $species: NA
## # $rdataclass: data.table, Tibble, SQLiteFile
## # additional mcols(): taxonomyid, genome, description,
## #   coordinate_1_based, maintainer, rdatadateadded, preparerclass, tags,
## #   rdatapath, sourceurl, sourcetype 
## # retrieve records with, e.g., 'object[["AH91771"]]' 
## 
##             title                                   
##   AH91771 | SQLite for PubMed ID                    
##   AH91772 | SQLite for PubMed Abstract              
##   AH91773 | SQLite for PubMed Author Information    
##   AH91774 | SQLite for PMC                          
##   AH91775 | SQLite for MeSH (Descriptor)            
##   ...       ...                                     
##   AH97929 | Data.table for PubMed Author Information
##   AH97930 | Data.table for PMC                      
##   AH97931 | Data.table for MeSH (Descriptor)        
##   AH97932 | Data.table for MeSH (Qualifier)         
##   AH97933 | Data.table for MeSH (SCR)

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

mcols(query(ah, "PubMed"))
## DataFrame with 42 rows and 15 columns
##                          title dataprovider     species taxonomyid      genome
##                    <character>  <character> <character>  <integer> <character>
## AH91771   SQLite for PubMed ID         NCBI          NA         NA          NA
## AH91772 SQLite for PubMed Ab..         NCBI          NA         NA          NA
## AH91773 SQLite for PubMed Au..         NCBI          NA         NA          NA
## AH91774         SQLite for PMC         NCBI          NA         NA          NA
## AH91775 SQLite for MeSH (Des..         NCBI          NA         NA          NA
## ...                        ...          ...         ...        ...         ...
## AH97929 Data.table for PubMe..         NCBI          NA         NA          NA
## AH97930     Data.table for PMC         NCBI          NA         NA          NA
## AH97931 Data.table for MeSH ..         NCBI          NA         NA          NA
## AH97932 Data.table for MeSH ..         NCBI          NA         NA          NA
## AH97933 Data.table for MeSH ..         NCBI          NA         NA          NA
##                    description coordinate_1_based             maintainer
##                    <character>          <integer>            <character>
## AH91771                   PMID                  1 Koki Tsuyuzaki <k.t...
## AH91772 Correspondence table..                  1 Koki Tsuyuzaki <k.t...
## AH91773 Correspondence table..                  1 Koki Tsuyuzaki <k.t...
## AH91774 Correspondence table..                  1 Koki Tsuyuzaki <k.t...
## AH91775 Correspondence table..                  1 Koki Tsuyuzaki <k.t...
## ...                        ...                ...                    ...
## AH97929 Correspondence table..                  1 Koki Tsuyuzaki <k.t...
## AH97930 Correspondence table..                  1 Koki Tsuyuzaki <k.t...
## AH97931 Correspondence table..                  1 Koki Tsuyuzaki <k.t...
## AH97932 Correspondence table..                  1 Koki Tsuyuzaki <k.t...
## AH97933 Correspondence table..                  1 Koki Tsuyuzaki <k.t...
##         rdatadateadded preparerclass                           tags  rdataclass
##            <character>   <character>                         <list> <character>
## AH91771     2021-04-19   AHPubMedDbs         NCBI,PubMed,SQLite,...  SQLiteFile
## AH91772     2021-04-19   AHPubMedDbs         NCBI,PubMed,SQLite,...  SQLiteFile
## AH91773     2021-04-19   AHPubMedDbs         NCBI,PubMed,SQLite,...  SQLiteFile
## AH91774     2021-04-19   AHPubMedDbs            NCBI,PMC,SQLite,...  SQLiteFile
## AH91775     2021-04-19   AHPubMedDbs       Descriptor,MeSH,NCBI,...  SQLiteFile
## ...                ...           ...                            ...         ...
## AH97929     2021-10-15   AHPubMedDbs     data.table,NCBI,PubMed,...  data.table
## AH97930     2021-10-15   AHPubMedDbs        data.table,NCBI,PMC,...  data.table
## AH97931     2021-10-15   AHPubMedDbs data.table,Descriptor,MeSH,...  data.table
## AH97932     2021-10-15   AHPubMedDbs       data.table,MeSH,NCBI,...  data.table
## AH97933     2021-10-15   AHPubMedDbs       data.table,MeSH,NCBI,...  data.table
##                      rdatapath              sourceurl  sourcetype
##                    <character>            <character> <character>
## AH91771 AHPubMedDbs/v001/pub.. https://github.com/r..         XML
## AH91772 AHPubMedDbs/v001/abs.. https://github.com/r..         XML
## AH91773 AHPubMedDbs/v001/aut.. https://github.com/r..         XML
## AH91774 AHPubMedDbs/v001/pmc.. https://github.com/r..         XML
## AH91775 AHPubMedDbs/v001/des.. https://github.com/r..         XML
## ...                        ...                    ...         ...
## AH97929 AHPubMedDbs/v002/aut.. https://github.com/r..         XML
## AH97930 AHPubMedDbs/v002/pmc.. https://github.com/r..         XML
## AH97931 AHPubMedDbs/v002/des.. https://github.com/r..         XML
## AH97932 AHPubMedDbs/v002/qua.. https://github.com/r..         XML
## AH97933 AHPubMedDbs/v002/scr.. https://github.com/r..         XML

We can retrieve only the PubMedDb tibble files as follows.

qr <- query(ah, c("PubMedDb"))
# pubmed_tibble <- qr[[1]]

Session information

## R version 4.1.1 Patched (2021-10-13 r81052)
## Platform: x86_64-apple-darwin17.7.0 (64-bit)
## Running under: macOS Catalina 10.15.7
## 
## Matrix products: default
## BLAS:   /Users/ka36530_ca/R-stuff/bin/R-4-1/lib/libRblas.dylib
## LAPACK: /Users/ka36530_ca/R-stuff/bin/R-4-1/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.1.6 BiocFileCache_2.1.1 dbplyr_2.1.1       
## [4] BiocGenerics_0.39.2 BiocStyle_2.21.4   
## 
## loaded via a namespace (and not attached):
##  [1] Rcpp_1.0.7                    png_0.1-7                    
##  [3] Biostrings_2.61.2             assertthat_0.2.1             
##  [5] digest_0.6.28                 utf8_1.2.2                   
##  [7] mime_0.12                     R6_2.5.1                     
##  [9] GenomeInfoDb_1.29.10          stats4_4.1.1                 
## [11] RSQLite_2.2.8                 evaluate_0.14                
## [13] httr_1.4.2                    pillar_1.6.4                 
## [15] zlibbioc_1.39.0               rlang_0.4.12                 
## [17] curl_4.3.2                    jquerylib_0.1.4              
## [19] blob_1.2.2                    S4Vectors_0.31.5             
## [21] rmarkdown_2.11                stringr_1.4.0                
## [23] RCurl_1.98-1.5                bit_4.0.4                    
## [25] shiny_1.7.1                   compiler_4.1.1               
## [27] httpuv_1.6.3                  xfun_0.27                    
## [29] pkgconfig_2.0.3               htmltools_0.5.2              
## [31] tidyselect_1.1.1              KEGGREST_1.33.0              
## [33] GenomeInfoDbData_1.2.7        tibble_3.1.5                 
## [35] interactiveDisplayBase_1.31.2 bookdown_0.24                
## [37] IRanges_2.27.2                fansi_0.5.0                  
## [39] withr_2.4.2                   crayon_1.4.1                 
## [41] dplyr_1.0.7                   later_1.3.0                  
## [43] bitops_1.0-7                  rappdirs_0.3.3               
## [45] jsonlite_1.7.2                xtable_1.8-4                 
## [47] lifecycle_1.0.1               DBI_1.1.1                    
## [49] magrittr_2.0.1                stringi_1.7.5                
## [51] cachem_1.0.6                  XVector_0.33.0               
## [53] promises_1.2.0.1              bslib_0.3.1                  
## [55] ellipsis_0.3.2                filelock_1.0.2               
## [57] generics_0.1.0                vctrs_0.3.8                  
## [59] tools_4.1.1                   bit64_4.0.5                  
## [61] Biobase_2.53.0                glue_1.4.2                   
## [63] purrr_0.3.4                   BiocVersion_3.14.0           
## [65] fastmap_1.1.0                 yaml_2.2.1                   
## [67] AnnotationDbi_1.55.2          BiocManager_1.30.16          
## [69] memoise_2.0.0                 knitr_1.36                   
## [71] sass_0.4.0