GSEABase
Dependencies & Environment
Package-intrinsic requirements from the Bioconductor landing page — reproduce in any R environment.
- Version: 1.74.0 · Bioconductor: 3.23 · R: ≥ 4.6
- Depends: BiocGenerics, Biobase, annotate, graph
- Imports: AnnotationDbi, XML
- System requirements: URL
- Install:
BiocManager::install("GSEABase")
When to Use
- Gene Set Management: Storing and manipulating gene sets and collections using robust S4 classes like
GeneSet() and GeneSetCollection().
- Importing Standard Formats: Reading gene sets encoded in XML following the schema and conventions of the Broad Institute using
getBroadSets().
- Identifier Mapping: Programmatically mapping gene identifiers within gene sets (e.g., Symbol to Entrez) using
mapIdentifiers() and Bioconductor annotation packages.
- Dynamic Collection Building: Building custom gene set collections dynamically from GO or KEGG databases using
GOCollection().
When NOT to Use
- For performing the actual statistical enrichment test (e.g., GSEA, ORA); use the fgsea or limma packages instead because GSEABase is purely for data structure management.
- For fast, tidyverse-compatible data frame manipulation of gene sets; use the msigdbr package instead because GSEABase relies heavily on strict S4 object classes.
Data Requirements
- Input formats: Broad
.xml files, ExpressionSet objects, or standard R vectors of gene identifiers.
- Identifiers: Gene IDs (Entrez, Symbol, Annotation) must be consistent across a single
GeneSet.
- Annotations: Requires corresponding organism-specific annotation packages (e.g.,
hgu95av2.db, org.Hs.eg.db) if identifier mapping or GO extraction is needed.
Key Parameters
- setName: A character string specifying the name of the gene set.
- geneIdType (
NullIdentifier()): Specifies the gene identifier type (e.g., EntrezIdentifier(), SymbolIdentifier(), AnnotationIdentifier()) to ensure safe mapping.
- collectionType (
NullCollection()): Defines the source/metadata of the gene set (e.g., GOCollection(), BroadCollection()).
- urls: The file path, URL, or connection to the
.xml file when importing Broad sets.
- evidenceCode: Used within
GOCollection() to filter pathways satisfying specific GO evidence constraints (e.g., "IMP", "IDA").
- phenotype: A character string describing the phenotype under consideration when creating a
GeneColorSet().
Best Practices
- Always explicitly define the
geneIdType (e.g., EntrezIdentifier()) when creating a GeneSet() to prevent downstream mapping errors.
- Leverage
mapIdentifiers() in conjunction with an annotation package to harmonize gene IDs in the GeneSetCollection() before intersecting with your expression data.
- Use
details() to inspect the metadata, creation date, and source of a GeneSet for careful curation.
- Validate gene sets against your expression matrix by directly subsetting the
ExpressionSet using the GeneSet object.
Common Pitfalls
- Empty intersections during subsetting: Caused by the gene set using Symbols while the expression data uses Annotation IDs. Fix: Use
mapIdentifiers() to convert the GeneSet to match the data's ID type before subsetting.
- Memory bloat with GO collections: Caused by creating sets for every single GO term indiscriminately. Fix: Filter GO terms by providing arguments such as
evidenceCode to GOCollection() to restrict the pathways.
- Loss of directionality in sets: Standard gene sets do not capture whether a gene is upregulated or downregulated. Fix: Use
GeneColorSet() to indicate how features of genes and phenotypes are associated.
Alternatives
- msigdbr: Provides MSigDB gene sets directly as tidy data frames rather than S4 objects, ideal for tidyverse workflows.
- fgsea: Uses simple named lists of character vectors for gene sets, bypassing the need for complex S4 classes entirely.
Citations
- Morgan M, Falcon S, Gentleman R (2023). "GSEABase: Gene set enrichment data structures and methods." Bioconductor.
References
Run this on BioMate
This skill is the knowledge layer — when, why, and how to use gseabase. To run this analysis on your own data with managed compute, automated QC, and reproducible outputs, use BioMate — free to start.
▶ Open gseabase on BioMate →
1---2name: bioconductor-gseabase3description: This package provides classes and methods to support Gene Set Enrichment Analysis (GSEA).4---56# GSEABase78## Dependencies & Environment910> Package-intrinsic requirements from the Bioconductor landing page — reproduce in any R environment.1112- **Version:** 1.74.0 · **Bioconductor:** 3.23 · **R:** ≥ 4.613- **Depends:** BiocGenerics, Biobase, annotate, graph14- **Imports:** AnnotationDbi, XML15- **System requirements:** URL16- **Install:** `BiocManager::install("GSEABase")`1718## When to Use19- **Gene Set Management**: Storing and manipulating gene sets and collections using robust S4 classes like `GeneSet()` and `GeneSetCollection()`.20- **Importing Standard Formats**: Reading gene sets encoded in XML following the schema and conventions of the Broad Institute using `getBroadSets()`.21- **Identifier Mapping**: Programmatically mapping gene identifiers within gene sets (e.g., Symbol to Entrez) using `mapIdentifiers()` and Bioconductor annotation packages.22- **Dynamic Collection Building**: Building custom gene set collections dynamically from GO or KEGG databases using `GOCollection()`.2324## When NOT to Use25- For performing the actual statistical enrichment test (e.g., GSEA, ORA); use the fgsea or limma packages instead because GSEABase is purely for data structure management.26- For fast, tidyverse-compatible data frame manipulation of gene sets; use the msigdbr package instead because GSEABase relies heavily on strict S4 object classes.2728## Data Requirements29- **Input formats**: Broad `.xml` files, `ExpressionSet` objects, or standard R vectors of gene identifiers.30- **Identifiers**: Gene IDs (Entrez, Symbol, Annotation) must be consistent across a single `GeneSet`.31- **Annotations**: Requires corresponding organism-specific annotation packages (e.g., `hgu95av2.db`, `org.Hs.eg.db`) if identifier mapping or GO extraction is needed.3233## Key Parameters34- **setName**: A character string specifying the name of the gene set.35- **geneIdType** (`NullIdentifier()`): Specifies the gene identifier type (e.g., `EntrezIdentifier()`, `SymbolIdentifier()`, `AnnotationIdentifier()`) to ensure safe mapping.36- **collectionType** (`NullCollection()`): Defines the source/metadata of the gene set (e.g., `GOCollection()`, `BroadCollection()`).37- **urls**: The file path, URL, or connection to the `.xml` file when importing Broad sets.38- **evidenceCode**: Used within `GOCollection()` to filter pathways satisfying specific GO evidence constraints (e.g., `"IMP"`, `"IDA"`).39- **phenotype**: A character string describing the phenotype under consideration when creating a `GeneColorSet()`.4041## Best Practices42- Always explicitly define the `geneIdType` (e.g., `EntrezIdentifier()`) when creating a `GeneSet()` to prevent downstream mapping errors.43- Leverage `mapIdentifiers()` in conjunction with an annotation package to harmonize gene IDs in the `GeneSetCollection()` before intersecting with your expression data.44- Use `details()` to inspect the metadata, creation date, and source of a `GeneSet` for careful curation.45- Validate gene sets against your expression matrix by directly subsetting the `ExpressionSet` using the `GeneSet` object.4647## Common Pitfalls48- **Empty intersections during subsetting**: Caused by the gene set using Symbols while the expression data uses Annotation IDs. *Fix*: Use `mapIdentifiers()` to convert the `GeneSet` to match the data's ID type before subsetting.49- **Memory bloat with GO collections**: Caused by creating sets for every single GO term indiscriminately. *Fix*: Filter GO terms by providing arguments such as `evidenceCode` to `GOCollection()` to restrict the pathways.50- **Loss of directionality in sets**: Standard gene sets do not capture whether a gene is upregulated or downregulated. *Fix*: Use `GeneColorSet()` to indicate how features of genes and phenotypes are associated.5152## Alternatives53- **msigdbr**: Provides MSigDB gene sets directly as tidy data frames rather than S4 objects, ideal for tidyverse workflows.54- **fgsea**: Uses simple named lists of character vectors for gene sets, bypassing the need for complex S4 classes entirely.5556## Citations57- Morgan M, Falcon S, Gentleman R (2023). "GSEABase: Gene set enrichment data structures and methods." Bioconductor.5859## References60- Homepage: https://bioconductor.org/packages/GSEABase61- Vignette: https://bioconductor.org/packages/release/bioc/vignettes/GSEABase6263<!-- biomate-cta -->64---6566## Run this on BioMate6768This skill is the **knowledge layer** — when, why, and how to use `gseabase`. To **run this analysis on your own data** with managed compute, automated QC, and reproducible outputs, use **[BioMate](https://www.biomate.ai?ref=kb&pkg=gseabase)** — free to start.6970▶ **[Open `gseabase` on BioMate →](https://www.biomate.ai?ref=kb&pkg=gseabase)**