Skip to contents

Plot enriched gene sets

Usage

plotEnrichedGeneSets(object, ...)

# S4 method for FgseaList
plotEnrichedGeneSets(
  object,
  collection,
  direction = c("both", "up", "down"),
  n = 10L,
  headerLevel = 3L
)

Arguments

object

Object.

collection

character(1). Gene set collection name. Typically refers to h (hallmark), c1-c7 collections from MSigDb. Can obtain using collectionNames() on FgseaList object.

direction

character(1). Include "both", "up", or "down" directions.

n

integer(1). Number to include.

headerLevel

integer(1) (1-7). Markdown header level.

...

Additional arguments.

Value

ggplot.

Note

Updated 2022-04-27.

See also

Examples

data(fgsea)

## FgseaList ====
object <- fgsea
alphaThreshold(object) <- 0.9
collection <- collectionNames(object)[[1L]]
plotEnrichedGeneSets(
    object = object,
    collection = collection,
    n = 1L
)
#> 
#> 
#> ### condition_B_vs_A {.tabset}
#> 
#>  4 upregulated gene sets detected (alpha < 0.9; nes > 0).
#>  2 downregulated gene sets detected (alpha < 0.9; nes > 0).
#> 
#> 
#> #### HALLMARK_KRAS_SIGNALING_UP
#> 

#> 
#> 
#> #### HALLMARK_KRAS_SIGNALING_DN
#> 
#> 
#> 
#> ### treatment_D_vs_C {.tabset}
#> 
#>  23 upregulated gene sets detected (alpha < 0.9; nes > 0).
#>  12 downregulated gene sets detected (alpha < 0.9; nes > 0).

#> 
#> 
#> #### HALLMARK_MYC_TARGETS_V2
#> 

#> 
#> 
#> #### HALLMARK_ESTROGEN_RESPONSE_EARLY
#>