Run GSEA

run_gsea(x, ...)

# S4 method for data.frame
run_gsea(x, gene_set = "reactome", organism, orgDb, ...)

# S4 method for BbcSE
run_gsea(
  x,
  de_pkg = "edger",
  rank_by = "signed-log10pval",
  contrast_names = "",
  ...
)

Arguments

x

A BbcSE object or a dataframe.

...

Passed to gseKEGG, GSEA or gsePathway. See each function for possible arguments.

gene_set

one of "kegg", "reactome", "H", "C1", "C2", "C3", "C4", "C5", "C6", "C7"

organism

For compatibility with dowstream tools, the organism is specified differently depending on the desired gene set. For KEGG, use the three-letter code according to http://www.genome.jp/kegg/catalog/org_list.html. For Reactome, possible values are ‘celegans’, ‘fly’, ‘human’, ‘mouse’, ‘rat’, ‘yeast’ and ‘zebrafish’. For msigdb, run 'msigdbr::msigdbr_show_species()'.

orgDb

OrgDB object for your organism

de_pkg

"edger" or "deseq2". Only used if x is a BbcSE

rank_by
"signed-log10pval"

-log10 of the PValue from the DE analysis, signed by the LFC.

"-log10pval"

-log10 of the PValue from the DE analysis. May be ideal for gene sets that contain both up-regulated and down-regulated genes for a particular process or pathway etc.

contrast_names

character value or vector for the contrast(s) of interest. See name(de_results(edger(x))). If left to default "" value then all contrasts will be processed.

Value

A list of gseaResult objects or one gseaResult object

Methods (by class)

  • data.frame: x is a dataframe with gene name as col1 and metric(log2FC or F etc) as col2. Function will sort by col2 in decreasing order. See '?prep_clusterprofiler_genelist'.

  • BbcSE: Extract out the gene and signed -log10 PValue. Run run_gsea for each result object (contrast).

See also