refine {GOfuncR} | R Documentation

## Refine results given a FWER threshold

### Description

Given a FWER threshold, this function refines the results from `go_enrich()` like described in the elim algorithm of [1].
This algorithm removes genes from significant child-categories and then checks whether a category is still significant.
This way significant results are restricted to more specific categories.

### Usage

        refine(res, fwer = 0.05, fwer_col = 7, annotations = NULL)

### Arguments

`res` | list() returned from `go_enrich()`
`fwer` | numeric() FWER-threshold. Categories with a FWER < `fwer` will be labeled significant.
`fwer_col` | numeric() or character() specifying the column of `go_enrich()[[1]]` that is to be filtered. E.g. 6 for under-representation or 7 over-representation of candidate genes in the hypergeometric test.
`annotations` | optional data.frame() with custom annotations. Only needed if `go_enrich()` was run with custom annotations in the first place.

### Details

For each domain a p-value is found by interpolation, that corresponds to the input FWER threshold. Since GO-domains are independent graphs, the same FWER will correspond to different p-values, e.g. in 'molecular_function' and 'biological_process'.

### Value

a data.frame() with p-values after refinement for categories that were significant in `go_enrich()[[1]]` given the FWER-threshold.

### Author(s)

Steffi Grote

### References

[1] Alexa, A. et al. (2006). Improved scoring of functional groups from gene expression data by decorrelating GO graph structure. Bioinformatics 22, 1600-1607.

### See Also

`go_enrich`

### Examples

    ## perform enrichment analysis for some genes
    gene_ids = c('NCAPG', 'APOL4', 'NGFR', 'NXPH4', 'C21orf59', 'CACNG2', 'AGTR1',
        'ANO1', 'BTBD3', 'MTUS1', 'CALB1', 'GYG1', 'PAX2')
    input_hyper = data.frame(gene_ids, is_candidate=1)
    res_hyper = go_enrich(input_hyper, n_randset=100, silent=TRUE)
    head(res_hyper[[1]])
    ## perform refinement for categories with FWER < 0.1
    refined = refine(res_hyper, fwer=0.1)
    refined

[Package GOfuncR version 1.12.0 Index]