compute.go.enrichment {cellTree} | R Documentation

## Gene Ontology enrichment analysis

### Description

Computes enrichment scores for Gene Ontology terms associated with genes in each topic.

### Usage

    compute.go.enrichment(lda.results, go.db, ontology.type = "BP",
      reformat.gene.names = FALSE, bonferroni.correct = TRUE,
      p.val.threshold = if (bonferroni.correct) 0.05 else 0.01,
      go.score.class = "weight01Score", dag.file.prefix = FALSE)

### Arguments

`lda.results` | A fitted LDA model, as returned by `compute.lda`
`go.db` | String. Genome-wide annotation with GO mapping for the appropriate organism (e.g. org.Mm.eg.db or org.Hs.eg.db).
`ontology.type` | (optional). “BP” for Biological Process, “MF” for Molecular Function, and “CC” for Cellular Component.
`reformat.gene.names` | Boolean. If set to `TRUE`, converts all gene names to capitalised lowercase.
`bonferroni.correct` | Boolean. Unless set to `FALSE`, adjust statistical testing p-value threshold for multiple testing.
`p.val.threshold` | Numeric (optional). P-value significance threshold.
`go.score.class` | String (optional). Name of the scoring method to use for the Kolmogorov-Smirnov test (e.g. “weigth01Score” or “elimScore”). See topGO documentation for a complete list of scoring methods.
`dag.file.prefix` | String or `FALSE`. If not set to `FALSE`, plots individual subgraphs of significant terms for each topic using the string as filename prefix.

### Value

Returns a named list object with ranked tables of significantly enriched GO terms for each topic (‘all’), terms that only appear in each topic (‘unique’) and terms that appear in less than half of the other topics (‘rare’). In addition the list object contains an igraph object with the full GO DAG, annotated with each term's p-value and the significance threshold adjusted for multiple testing (Bonferroni method).

### Examples

    # Load pre-computed LDA model for skeletal myoblast RNA-Seq data from HSMMSingleCell package:
    data(HSMM_lda_model)

    # Load GO mapping database for 'homo sapiens':
    library(org.Hs.eg.db)
    # Compute Cellular Component GO enrichment sets for each topic:
    go.results = compute.go.enrichment(HSMM_lda_model, org.Hs.eg.db, ontology.type="CC", bonferroni.correct=TRUE, p.val.threshold=0.01)

    # Print table of terms that are only significantly enriched in each topic:
    print(go.results$unique)

[Package cellTree version 1.16.0 Index]