Phylostratum or Divergence Stratum Enrichment of a given Gene Set based on Fisher's Test

Share:

Description

This function computes the significance of enriched (over or underrepresented) Phylostrata or Divergence Strata within an input test.set based on the fisher.test. Please concult PlotEnrichment for details.

Usage

1
2
EnrichmentTest(ExpressionSet, test.set, use.only.map = FALSE,
  measure = "log-foldchange", complete.bg = TRUE, epsilon = 1e-05)

Arguments

ExpressionSet

a standard PhyloExpressionSet or DivergenceExpressionSet object.

test.set

a character vector storing the gene ids for which PS/DS enrichment analyses should be performed.

use.only.map

a logical value indicating whether instead of a standard ExpressionSet only a Phylostratigraphic Map or Divergene Map is passed to this function.

measure

a character string specifying the measure that should be used to quantify over and under representation of PS/DS. Measures can either be measure = "foldchange" (odds) or measure = "log-foldchange" (log-odds).

complete.bg

a logical value indicating whether the entire background set of the input ExpressionSet should be considered when performing Fisher's exact test (complete.bg = TRUE) or whether genes that are stored in test.set should be excluded from the background set before performing Fisher's exact test (complete.bg = FALSE).

epsilon

a small value to shift values by epsilon to avoid log(0) computations.

Author(s)

Hajk-Georg Drost

See Also

PlotEnrichment, fisher.test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data(PhyloExpressionSetExample)

set.seed(123)
test_set <- sample(PhyloExpressionSetExample[ , 2],1000)

E.Result <- EnrichmentTest(ExpressionSet = PhyloExpressionSetExample,
                           test.set      = test_set ,
                           measure       = "log-foldchange")
                           
# get the log-fold change table
E.Result$enrichment.matrix

# get P-values for the enrichment significance for each Phylostratum
E.Result$p.values

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.