50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

rliger (version 2.2.0)

runGOEnrich: Run Gene Ontology enrichment analysis on differentially expressed genes.

Description

This function forms genesets basing on the differential expression result, and calls gene ontology (GO) analysis method provided by gprofiler2.

Usage

runGOEnrich(
  result,
  group = NULL,
  useBg = TRUE,
  orderBy = NULL,
  logFCThresh = 1,
  padjThresh = 0.05,
  splitReg = FALSE,
  ...
)

Value

A list object where each element is a result list for a group. Each result list contains two elements:

result

data.frame of main GO analysis result.

meta

Meta information for the query.

See gprofiler2::gost(). for detailed explanation.

Arguments

result

Data frame of unfiltered output from runMarkerDEG or runPairwiseDEG.

group

Selection of one group available from result$group. Default NULL uses all groups involved in DE result table.

useBg

Logical, whether to set all genes involved in DE analysis (before threshold filtering) as a domain background of GO analysis. Default TRUE. Otherwise use all annotated genes from gprofiler2 database.

orderBy

Name of DE statistics metric to order the gene list for each group. Choose from "logFC", "pval" or "padj" to enable ranked mode. Default NULL to use two-list mode.

logFCThresh

The absolute valued log2FC threshold above which the genes will be used. Default 1.

padjThresh

The adjusted p-value threshold less than which the genes will be used. Default 0.05.

splitReg

Whether to have queries of both up-regulated and down-regulated genes for each group. Default FALSE only queries up-regulated genes and should be preferred when result comes from marker detection test. When result comes from group-to-group DE test, it is recommended to set splitReg = TRUE.

...

Additional arguments passed to gprofiler2::gost(). Useful ones are:

organism

The organism to be used for the analysis. "hsapiens" for human, "mmusculus" for mouse.

evcodes

Whether to include overlapping genes for each term. Default FALSE.

significant

Whether to filter out non-significant terms. Default TRUE.

Arguments query, custom_bg, domain_scope, and ordered_query are pre-specified by this wrapper function.

Details

GO term enrichment test often goes with two modes: two-list mode and ranked mode.

Two-list mode comes with a query gene set and a background gene set. A query gene set contains the filtered DEGs in this analysis. A background can be all the genes involved in the DEG test (default, useBg = TRUE), or use all annotated genes in the gprofiler2 database (useBg = FALSE).

Ranked mode comes with only one query gene set, which is sorted. It should contain the whole domain background genes while significant genes are supposed to come first. Set orderBy to one of the DE statistics metric to enable this mode. useBg will be ignored in this mode.

References

Kolberg, L. et al, 2020 and Raudvere, U. et al, 2019

Examples

Run this code
# \donttest{
if (requireNamespace("gprofiler2", quietly = TRUE)) {
    go <- runGOEnrich(deg.pw)
}
# }

Run the code above in your browser using DataLab