
Database Introduction



MSigDB (Molecular Signatures Database) is a widely used gene set database developed and maintained by the Broad Institute.
MSigDB contains several carefully curated collections of gene sets, primarily divided into the following categories:
-
Hallmark Gene Sets
-
50 selected, well-defined biological states and processes
-
Reduces redundancy and overlap, providing clearer analytical results
Positional Gene Sets
-
Genes grouped by chromosomal location
Canonical Pathways
-
Knowledge bases from known biological pathways such as KEGG, BioCarta, etc.
Regulatory Target Gene Sets
-
Target gene collections of transcription factors and microRNAs
Computational Gene Sets
-
Gene features identified through computational methods
Gene Ontology Gene Sets
-
Biological processes, molecular functions, and cellular components based on Gene Ontology
Oncogenic Signatures
-
Gene expression features associated with cancer
Immunologic Signatures
-
Gene sets related to the immune system
Application Areas
-
Gene Set Enrichment Analysis (GSEA): MSigDB was originally developed to support GSEA analysis
-
Functional Annotation: Interpreting results from high-throughput experiments (e.g., RNA-seq, microarrays)
-
Biomarker Discovery: Identifying gene features associated with specific phenotypes
-
Drug Target Identification: Discovering potential therapeutic targets
-
Disease Mechanism Research: Exploring the molecular basis of diseases


Usage Instructions



-
Official Website: https://www.gsea-msigdb.org/gsea/msigdb
-
Direct usage through GSEA software
-
Access via R/Bioconductor package such as msigdbr
1. Official Website You can download the latest database from the official website for subsequent use with R packages for in-depth GSEA analysis. For those unfamiliar with R, you can directly use the GSEA software, which can be downloaded and installed for analysis.
For those proficient in R, you can download the database, which mainly includes species such as humans and mice.
2. Using GSEA SoftwareDownload the GSVA version 4.4.0 with Java, import the data, and perform analysis.
Data import reference: https://docs.gsea-msigdb.org/#GSEA/Data_Formats/. (PS: A dedicated tutorial on using the software for GSEA analysis will be released later; this tutorial introduces the MSigDB database.)3. Accessing the R Package msigdbr
install.packages("msigdbr")
library(msigdbr)
#######1.1 Check available species
msigdbr_species()
species_name species_common_name
<chr> <chr>
1 Anolis carolinensis Carolina anole, green anole
2 Bos taurus bovine, cattle, cow, dairy cow, domestic cattle, domestic cow, ox, oxen
3 Caenorhabditis elegans NA
4 Canis lupus familiaris dog, dogs
5 Danio rerio leopard danio, zebra danio, zebra fish, zebrafish
6 Drosophila melanogaster fruit fly
7 Equus caballus domestic horse, equine, horse
8 Felis catus cat, cats, domestic cat
9 Gallus gallus bantam, chicken, chickens, Gallus domesticus
10 Homo sapiens human
11 Macaca mulatta rhesus macaque, rhesus macaques, Rhesus monkey, rhesus monkeys
12 Monodelphis domestica gray short-tailed opossum
13 Mus musculus house mouse, mouse
14 Ornithorhynchus anatinus duck-billed platypus, duckbill platypus, platypus
15 Pan troglodytes chimpanzee
16 Rattus norvegicus brown rat, Norway rat, rat, rats
17 Saccharomyces cerevisiae baker's yeast, brewer's yeast, S. cerevisiae
18 Schizosaccharomyces pombe 972h- NA
19 Sus scrofa pig, pigs, swine, wild boar
20 Xenopus tropicalis tropical clawed frog, western clawed frog
</chr></chr>
####1.2 View all gene sets
all_gene_sets <- msigdbr()
head(all_gene_sets)
# A tibble: 6 × 20
# gene_symbol ncbi_gene ensembl_gene db_gene_symbol db_ncbi_gene db_ensembl_gene
# <chr> <chr> <chr> <chr> <chr> <chr>
# 1 ABCC4 10257 ENSG0000012… ABCC4 10257 ENSG00000125257
# 2 ABRAXAS2 23172 ENSG0000016… ABRAXAS2 23172 ENSG00000165660
# 3 ACTN4 81 ENSG0000013… ACTN4 81 ENSG00000130402
# 4 ACVR1 90 ENSG0000011… ACVR1 90 ENSG00000115170
# 5 ADAM9 8754 ENSG0000016… ADAM9 8754 ENSG00000168615
# 6 ADAMTS5 11096 ENSG0000015… ADAMTS5 11096 ENSG00000154736
</chr></chr></chr></chr></chr></chr>
##### 1.3 Specify the required species
all_mm_gene_sets <- msigdbr(db_species = "MM", species = "Mus musculus")
head(all_mm_gene_sets)
# A tibble: 6 × 20
# gene_symbol ncbi_gene ensembl_gene db_gene_symbol db_ncbi_gene db_ensembl_gene
# <chr> <chr> <chr> <chr> <chr> <chr>
# 1 AU021092 239691 ENSMUSG0000… AU021092 239691 ENSMUSG0000005…
# 2 Ahnak 66395 ENSMUSG0000… Ahnak 66395 ENSMUSG0000006…
# 3 Alcam 11658 ENSMUSG0000… Alcam 11658 ENSMUSG0000002…
# 4 Ankrd40 71452 ENSMUSG0000… Ankrd40 71452 ENSMUSG0000002…
# 5 Arid1a 93760 ENSMUSG0000… Arid1a 93760 ENSMUSG0000000…
# 6 Bckdhb 12040 ENSMUSG0000… Bckdhb 12040 ENSMUSG0000003…
# ℹ 14 more variables: source_gene <chr>, gs_id <chr>, gs_name <chr>,
# gs_collection <chr>, gs_subcollection <chr>, gs_collection_name <chr>,
# gs_description <chr>, gs_source_species <chr>, gs_pmid <chr>,
# gs_geoid <chr>, gs_exact_source <chr>, gs_url <chr>, db_version <chr>,
# db_target_species <chr>
</chr></chr></chr></chr></chr></chr></chr></chr></chr></chr></chr></chr></chr></chr></chr></chr></chr></chr></chr></chr>
##### 1.4 Database Source
msigdbr_collections()
# A tibble: 25 × 4
# gs_collection gs_subcollection gs_collection_name num_genesets
# <chr> <chr> <chr> <int>
# 1 C1 "" "Positional" 302
# 2 C2 "CGP" "Chemical and Genetic Perturbat… 3538
# 3 C2 "CP" "Canonical Pathways" 19
# 4 C2 "CP:BIOCARTA" "BioCarta Pathways" 292
# 5 C2 "CP:KEGG_LEGACY" "KEGG Legacy Pathways" 186
# 6 C2 "CP:KEGG_MEDICUS" "KEGG Medicus Pathways" 658
# 7 C2 "CP:PID" "PID Pathways" 196
# 8 C2 "CP:REACTOME" "Reactome Pathways" 1787
# 9 C2 "CP:WIKIPATHWAYS" "WikiPathways" 885
# 10 C3 "MIR:MIRDB" "miRDB" 2377
# 11 C3 "MIR:MIR_LEGACY" "MIR_Legacy" 221
# 12 C3 "TFT:GTRD" "GTRD" 505
# 13 C3 "TFT:TFT_LEGACY" "TFT_Legacy" 610
# 14 C4 "3CA" "Curated Cancer Cell Atlas gene… 148
# 15 C4 "CGN" "Cancer Gene Neighborhoods" 427
# 16 C4 "CM" "Cancer Modules" 431
# 17 C5 "GO:BP" "GO Biological Process" 7583
# 18 C5 "GO:CC" "GO Cellular Component" 1042
# 19 C5 "GO:MF" "GO Molecular Function" 1855
# 20 C5 "HPO" "Human Phenotype Ontology" 5748
# 21 C6 "" "Oncogenic Signature" 189
# 22 C7 "IMMUNESIGDB" "ImmuneSigDB" 4872
# 23 C7 "VAX" "HIPC Vaccine Response" 347
# 24 C8 "" "Cell Type Signature" 866
# 25 H "" "Hallmark" 50
</int></chr></chr></chr>
Using msigdbr for Pathway Enrichment Analysis
##### 1. Using clusterProfiler package for analysis, using NCBI/Entrez IDs
msigdbr_t2g <- dplyr::distinct(msigdbr_df, gs_name, ncbi_gene)
enricher(gene = gene_ids_vector, TERM2GENE = msigdbr_t2g, ...)
##### 2. Using clusterProfiler package for analysis, using gene symbols
msigdbr_t2g <- dplyr::distinct(msigdbr_df, gs_name, gene_symbol)
enricher(gene = gene_symbols_vector, TERM2GENE = msigdbr_t2g, ...)
##### 3. Using fgsea package for analysis, using gene symbols
msigdbr_list <- split(x = msigdbr_df$gene_symbol, f = msigdbr_df$gs_name)
fgsea(pathways = msigdbr_list, ...)
##### 4. Using GSVA package for analysis, using gene symbols
msigdbr_list <- split(x = msigdbr_df$gene_symbol, f = msigdbr_df$gs_name)
gsvapar <- gsvaParam(geneSets = msigdbr_list, ...)
gsva(gsvapar)
Research Services

Your Feedback Matters (Your attention, likes, views, and comments are very important!!!)We welcome everyone to leave comments for discussion. If you have questions about the results or methods, please contact the administrator for resolution: kriswcyYQ.The platform’s purpose: to provide personalized solutions for omics, offering data analysis, R and Python plotting optimization, code reproduction, and other research services. Everyone is welcome to consult. (You can get a free data analysis consultation once!!!).