epigraHMMDataSetFromMatrix {epigraHMM} | R Documentation

## Create a epigraHMMDataSet from matrices of counts

### Description

This function creates a `RangedSummarizedExperiment` object from matrices of counts. It is used to store the input data, the model offsets, and the results from the peak calling algorithms.

### Usage

    epigraHMMDataSetFromMatrix(countData, colData, rowRanges = NULL)

### Arguments

`countData` | a matrix (or a list of matrices). If countData is a list of matrices, matrices must be named, have the same dimensions, and, at least, a matrix with name 'counts' must exist (see details).
`colData` | a `data.frame` with columns `condition` and `replicate`. `condition` refers to the experimental condition identifier (e.g. cell line name). `replicate` refers to the replicate identification number (unique for each condition).
`rowRanges` | an optional GRanges object with the genomic coordinates of the `countData`

### Details

Additional columns included in the colData input will be passed to the resulting epigraHMMDataSet assay and can be acessed via `colData()` function.

### Value

An epigraHMMDataSet object with sorted colData regarding conditions and replicates. Experimental counts will be stored in the 'counts' assay in the resulting epigraHMMDataSet object. If ‘countData' is a list of matrices, the resulting ’counts' assay will be equal to ‘countData[[’counts']]'.

Additional matrices can be included in the epigraHMMDataSet. For example, if one wants to include counts from an input control experiment from ‘countData[[’controls']]‘, an assay ’control' will be added to the resulting epigraHMMDataSet..

### Author(s)

Pedro L. Baldoni, pedrobaldoni@gmail.com

### References

https://github.com/plbaldoni/epigraHMM

### Examples

    countData <- list('counts' = matrix(rpois(4e5,10),ncol = 4),
    'controls' = matrix(rpois(4e5,5),ncol = 4))
    colData <- data.frame(condition = c('A','A','B','B'), replicate = c(1,2,1,2))
    object <- epigraHMMDataSetFromMatrix(countData,colData)

[Package epigraHMM version 1.0.8 Index]