Parameterized fast gene set enrichment analysis (GSEA)
Source:R/AllGenerics.R
, R/FgseaList-methods.R
FgseaList.Rd
Extends the functionality of fgsea::fgsea()
.
Usage
FgseaList(object, ...)
# S4 method for DESeqAnalysis
FgseaList(
object,
keyType = c("geneName", "ensemblGeneId", "ncbiGeneId"),
value = c("stat", "log2FoldChange"),
proteinCodingOnly = FALSE,
...
)
# S4 method for DESeqResults
FgseaList(
object,
keyType = c("geneName", "ensemblGeneId", "ncbiGeneId"),
value = c("stat", "log2FoldChange"),
rowRanges,
proteinCodingOnly = FALSE,
...
)
# S4 method for RankedList
FgseaList(object, geneSetFiles)
Arguments
- object
Object.
- ...
Additional arguments.
- keyType
`character(1). Gene identifier format:
"geneName"
: Gene names (a.k.a. symbols; e.g."TP53"
)."ensemblGeneId
: Ensembl gene identifiers (e.g."ENSG00000000003"
)."ncbiGeneId"
: NCBI (Entrez) gene identifiers (e.g.7157
).
- value
character(1)
. Value type to use for GSEA ranked list.Currently supported:
stat
: Wald test statistic. This column is returned byresults()
but is removed inDESeq2::lfcShrink()
return, currently.log2FoldChange
: Shrunken log2 fold change. Note that this option requiresDESeq2::lfcShrink()
return to be slotted.padj
: Adjusted P value. This don't provide directional ranks, but is offered as a legacy option. Not generally recommended.
- proteinCodingOnly
logical(1)
. Restrict to protein coding genes only.- rowRanges
GenomicRanges
orGenomicRangesList
. Genomic ranges (e.g. genome annotations). Metadata describing the assay rows.- geneSetFiles
character
. Gene set file paths (i.e. GMT files). MSigDB files are recommended by default.
Examples
data(deseq, package = "DESeqAnalysis")
## DESeqAnalysis ====
object <- deseq
geneSetFiles <- prepareGeneSetFiles(
dir = system.file(
"extdata",
"msigdb",
"7.0",
"msigdb_v7.0_GMTs",
package = "AcidGSEA"
)
)
#> ℹ Detected 1 GMT file of `keyType` "geneName" in /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpKetMc1/temp_libpath16fef37658ca8/AcidGSEA/extdata/msigdb/7.0/msigdb_v7.0_GMTs.
fgsea <- FgseaList(
object = object,
geneSetFiles = geneSetFiles
)
#> → Running parameterized fast GSEA.
#> Gene set files:
#> • h_all_v7_0_symbols
#> Contrasts:
#> • condition_B_vs_A
#> • treatment_D_vs_C
#> → Importing /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpKetMc1/temp_libpath16fef37658ca8/AcidGSEA/extdata/msigdb/7.0/msigdb_v7.0_GMTs/h.all.v7.0.symbols.gmt using base::`readLines()`.
#> Collection: h_all_v7_0_symbols
#> ℹ Testing 50 pathways.
#> Contrast: condition_B_vs_A
#> Contrast: treatment_D_vs_C
print(fgsea)
#> FgseaList 0.9.0 of length 1
#> collectionNames: h_all_v7_0_symbols
#> contrastNames(2): condition_B_vs_A treatment_D_vs_C
#> rankedList: stat
#> alphaThreshold: 0.05