get_significant_annotations: get significant annotations

get_significant_annotationsR Documentation

get significant annotations

Description

given a statistical_results object and some conditional expressions, return the significant annotations

In the case where we have a combined_enrichment and we want to get all of the significant annotations from each of them, and put them together so we can start doing real meta-analysis.

Usage

get_significant_annotations(in_results, ...)

## S4 method for signature 'statistical_results'
get_significant_annotations(in_results, ...)

## S4 method for signature 'combined_enrichment'
get_significant_annotations(in_results, ...)

Arguments

in_results

a combined_enrichment object

...

conditional expressions

Details

Note that this function returns the original combined_enrichment object with a modified combined_statistics slot where the significant annotations have been added in.

Value

vector of significant annotation_id's

combined_enrichment object

Examples


test_stat <- new("statistical_results",
                 annotation_id = c("a1", "a2", "a3"),
                 statistic_data = list(pvalues = c(a1 = 0.01, a2 = 0.5, a3 = 0.0001),
                   counts = c(a1 = 5, a2 = 10, a3 = 1),
                   odds = c(a1 = 20, a2 = 100, a3 = 0)))
get_significant_annotations(test_stat, pvalues < 0.05)
get_significant_annotations(test_stat, odds > 10)
get_significant_annotations(test_stat, pvalues < 0.05, counts >= 1)


rmflight/categoryCompare2 documentation built on Dec. 18, 2024, 9:13 a.m.