annotationMatrix: Generate a 2x2 contingency table for statistical hypothesis...

View source: R/enrichment_funks.R

annotationMatrixR Documentation

Generate a 2x2 contingency table for statistical hypothesis testing of over- or underrepresentation of 'anno' in the case 'anno.tbl' when compared with the whole universe 'universe.tbl'. Please note, that 'anno.tbl' is expected to be a true subset of 'universe.tbl.'

Description

Generate a 2x2 contingency table for statistical hypothesis testing of over- or underrepresentation of 'anno' in the case 'anno.tbl' when compared with the whole universe 'universe.tbl'. Please note, that 'anno.tbl' is expected to be a true subset of 'universe.tbl.'

Usage

annotationMatrix(anno, anno.tbl, universe.tbl, anno.tbl.anno.col = 1,
  universe.tbl.anno.col = 1, dim.names = list(c("annotated",
  "not.annotated"), c("case", "universe")))

Arguments

anno

string representing the annotation, e.g. InterPro entry

anno.tbl

annotation table: column 1 holds gene identifiers, and column 2 annotations, e.g. InterPro entries. 'anno.tbl' represents the 'case'

universe.tbl

annotation table, true superset of 'anno.tbl'. Represents the 'universe' to test alternative hypotheses against.

anno.tbl.anno.col

The column of 'anno.tbl' in which to lookup the case gene identifiers. Default is 1.

universe.tbl.anno.col

The column of 'universe.tbl' in which to lookup the universe gene identifiers. Default is 1.

dim.names

used to set the row and column names of the generated contingency table. See base::matrix(...,dimnames) for more details. Default value is 'dim.names=list( c( 'annotated', 'not.annotated' ), c( 'case', 'universe' ) )'

Value

An instance of base::matrix representing the contingency table


asishallab/GeneFamilies documentation built on May 22, 2023, 11:30 a.m.