terms_enrichment: Enrichment analysis of annotation terms

Description Usage Arguments Value

View source: R/annots.r

Description

Takes a data.frame or tibble with one gene per row, annotations per gene, and a score per gene. It performs enrichment analysis via gsea or test_go.

Usage

1
terms_enrichment(dat, method = "gsea", ...)

Arguments

dat

A data.frame or tibble. It must have columns 'gene_id', 'terms' and 'score'. Values in 'gene_id' must be unique.

method

Either 'gsea', 'sign_test', or 'test_go'.

...

Extra parameters for gsea, sign_test or test_go. If ‘method = ’test_go'‘ parameters ’genes', 'scores' and 'ontology' are already provided by this function.

Value

A tibble. If method 'gsea' or 'test_go' was used it will have columnns 'term', 'size', 'statistic', and 'p.value'. If method 'sign_test' was used, the tibble will have columns 'term', 'n_successes', 'expected', 'n_trials', 'p_success', and 'p.value'. In any case, if at least one term has GO-like IDs, then columns 'ontology' and 'annotation' will be otbained from GO.db.


surh/HMVAR documentation built on Aug. 18, 2021, 1:21 a.m.