importDataFromMatrices {DChIPRep} | R Documentation

## Import the data from ChiP and input matrices

### Description

This function imports the data from two matrices that contain counts summarized per position. It computes the normalization factors from the input (one per position) and creates a DChIPRepResults object.

### Usage

    importDataFromMatrices(inputData, chipData, sampleTable)

### Arguments

`inputData` | a matrix containing the counts for the input per position.
`chipData` | a matrix containing the counts for the ChIP per position.
`sampleTable` | a data.frame that has to contain the columns sampleID, upstream, downstream and condition. Each row of the table describes one experimental sample. See `data(exampleSampleTable)` for an example table. and the vignette for further information.

### Details

The normalization factors are computed as `t(t(inputData) * (covC/covI))` , Where covC and covI contain the total sum of the ChIP and the input samples. Zero normalization factors can arise if the input has zero counts for certain positions. That's why input values equal to zero are set to 1 in order to always obtain valid normalizationFactors.

### Value

a DChIPRepResults object containing the imported data as a `DESeqDataSet`.

### Examples

    data(exampleSampleTable)
    data(exampleInputData)
    data(exampleChipData)
    imDataFromMatrices <- importDataFromMatrices(inputData = exampleInputData,
    chipData = exampleChipData,
    sampleTable = exampleSampleTable)

[Package DChIPRep version 1.18.0 Index]