Create a table of terms ranked by their significance of occurrence in a set of term sets amongst an enclosing set, with p-values computed by permutation. Terms are subselected so that only the minimal set of non-redundant terms at each level of frequency within the group are retained.
group_term_enrichment(
ontology,
term_sets,
group,
permutations = 1000L,
min_terms = 2L,
mc.cores = NULL,
...
)data.frame containing columns: term (with the term ID); name (term readable name); in_term (number of sets in the given group of containing the term); in_no_term (number of sets in the given group not containing the term); out_term and out_no_term (equivalently for the sets not in the given group); p (the p-values calculated by permutation for seeing a term with such a strong association, measured using Fisher's exact test, in a group of term sets the size of the given group among term_sets). Rows ordered by significance (i.e. the p columns).
ontology_index object.
List of character vectors of ontological term IDs.
Integer/logical/character vector specifying indices/positions/names of subgroup for which to calculate a group similarity p-value.
Number of permutations to test against, or if NULL, perform no permutations and return the unadjusted p-values for the occurrence of each term.
Minimum number of times a term should occur within the given group to be eligible for inclusion in the results.
If not null and greater than on, the number of cores use calculating permutations (passed to mclapply).
Arguments to pass to fisher.test.
sample_group_sim create_sim_index