contingency_matrix {TFEA.ChIP} | R Documentation

## Computes 2x2 contingency matrices

### Description

Function to compute contingency 2x2 matrix by the partition of the two gene ID lists according to the presence or absence of the terms in these list in a ChIP-Seq binding database.

### Usage

    contingency_matrix(test_list, control_list,
      chip_index = get_chip_index())

### Arguments

`test_list` | List of gene Entrez IDs
`control_list` | If not provided, all human genes not present in test_list will be used as control.
`chip_index` | Output of the function “get_chip_index”, a data frame containing accession IDs of ChIPs on the database and the TF each one tests. If not provided, the whole internal database will be used

### Value

List of contingency matrices, one CM per element in chip_index (i.e. per ChIP-seq dataset).

### Examples

    data('Genes.Upreg',package = 'TFEA.ChIP')
    CM_list_UP <- contingency_matrix(Genes.Upreg)

[Package TFEA.ChIP version 1.8.0 Index]