Skip to contents

Class containing parameterized ranked gene lists.

Usage

RankedList(object, ...)

# S4 method for DESeqAnalysis
RankedList(
  object,
  keyType = c("geneName", "ensemblGeneId", "ncbiGeneId"),
  value = c("stat", "log2FoldChange"),
  proteinCodingOnly = FALSE
)

# S4 method for DESeqResults
RankedList(
  object,
  rowRanges,
  keyType = c("geneName", "ensemblGeneId", "ncbiGeneId"),
  value = c("stat", "log2FoldChange"),
  proteinCodingOnly = FALSE
)

# S4 method for FgseaList
RankedList(object)

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.

Value

RankedList.

Note

Updated 2023-03-01.

Gene symbol multi-mapping

Multiple gene IDs can map to a gene symbol (e.g. Homo sapiens HGNC names). In this event, we're averaging the values using mean() internally.

Examples

data(deseq, package = "DESeqAnalysis")
data(fgsea)

## DESeqAnalysis ====
object <- deseq
rl <- RankedList(object)
print(rl)
#> RankedList of length 2
#> names(2): condition_B_vs_A treatment_D_vs_C

## FgseaList ====
object <- fgsea
rl <- RankedList(object)
print(rl)
#> RankedList of length 2
#> names(2): condition_B_vs_A treatment_D_vs_C