In this tutorial, we will cover the fundamental base of the newest release of MeSH packages. The biggest change since BioC 2.14 (Apr. 2014) is that the data will be stored on a cloud server called AnnotationHub. In other words, users will have to download the desired species MeSH database, allowing researches to save different versions of their data, ensuring data reproducibility.

Load required packages

library("meshr")
library("MeSHDbi")
library("AnnotationHub")

ah <- AnnotationHub()  # metadata of all the data stored in the AnnotationHub server

Downloading the database can be easily done by providing the species names. Let’s first download the MeSH annotation database for Cattle.

Cattle - MeSH.Bta.eg.db

dbfile1 <- query(ah, c("MeSHDB", "Bos taurus", "v002"))[[1]]
MeSH.Bta.eg.db <- MeSHDbi::MeSHDb(dbfile1)
MeSH.Bta.eg.db

Let’s now check how many annotated genes are available in the Cattle database in 2021.

listDatabases(MeSH.Bta.eg.db)
key_Bta <- keys(MeSH.Bta.eg.db, keytype = "GENEID")  # 39273
length(unique(key_Bta))  # 39273
Bta <- select(MeSH.Bta.eg.db, keys = key_Bta, columns = c("GENEID", "MESHID"), keytype = "GENEID")
dim(Bta)  # 595268      2
length(unique(Bta[, 1]))  # 39273

Until 2021, MeSH database for Cattle has 39,273 annotated genes.

Note: MeSH database is updated annually to reflect changes in medicine and medical terminology.

Swine - MeSH.Ssc.eg.db

dbfile2 <- query(ah, c("MeSHDB", "Sus scrofa", "v002"))[[1]]
MeSH.Ssc.eg.db <- MeSHDbi::MeSHDb(dbfile2)
MeSH.Ssc.eg.db

Let’s check how many annotated genes are available in the Swine database in 2021.

listDatabases(MeSH.Ssc.eg.db)
key_Ssc <- keys(MeSH.Ssc.eg.db, keytype = "GENEID")  # 23672
length(unique(key_Ssc))  # 23672
Ssc <- select(MeSH.Ssc.eg.db, keys = key_Ssc, columns = c("GENEID", "MESHID"), keytype = "GENEID")
dim(Ssc)  # 381991      2
length(unique(Ssc[, 1]))  # 23672

Until 2021, MeSH database for Swine has 23,672 annotated genes.

Chicken - MeSH.Gga.eg.db

dbfile3 <- query(ah, c("MeSHDB", "Gallus gallus", "v002"))[[1]]
MeSH.Gga.eg.db <- MeSHDbi::MeSHDb(dbfile3)
MeSH.Gga.eg.db

Let’s check how many annotated genes are available in the Chicken database in 2021.

listDatabases(MeSH.Gga.eg.db)
key_Gga <- keys(MeSH.Gga.eg.db, keytype = "GENEID")  # 11133
length(unique(key_Gga))  # 11133
Gga <- select(MeSH.Gga.eg.db, keys = key_Gga, columns = c("GENEID", "MESHID"), keytype = "GENEID")
dim(Gga)  #  250481      2
length(unique(Gga[, 1]))  # 11133

Until 2021, MeSH database for Chicken has 11,133 annotated genes.

Final Considerations

Downloading MeSH annotation database from the cloud is an easy process, allowing users to save different versions of their data, supporting data reproducibility in science. The database is constantly updated, which will improve the power of enrichment analysis for future studies. In this sense, MeSH packages are an useful resource for researches in different field of study, and it shows great potential for animal species.