Skip to contents

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:

  1. stat: Wald test statistic. This column is returned by results() but is removed in DESeq2::lfcShrink() return, currently.

  2. log2FoldChange: Shrunken log2 fold change. Note that this option requires DESeq2::lfcShrink() return to be slotted.

  3. 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 or GenomicRangesList. 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.

Value

FgseaList.

Note

Updated 2023-10-04.

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