binningC {HiTC} | R Documentation

## Windowing of high-throughput 'C' contact matrix

### Description

Binning of 'C' contact map

### Usage

    binningC(x, binsize=100000, bin.adjust=TRUE, upa=TRUE,
    method=c("sum", "median","mean"), use.zero=TRUE, step=1, optimize.by = c("speed", "memory"))

### Arguments

`x` | object that inherits from class `HTCexp`
`binsize` | size of the bin to consider for windowing
`bin.adjust` | logical; adjust the size of the bin to the size of the genomic region
`upa` | logical; unique primer assignment. Allow one primer to belong to one or several bins
`method` | the method used to combine the counts. Must be ‘mean’, ‘median’ or ‘sum’
`use.zero` | logical; use the zero values in the `method` calculation
`step` | numeric; binning step size in `n` coverage i.e. window step
`optimize.by` | "speed" will use faster methods but more RAM, and "memory" will be slower, but require less RAM

### Details

`bin.adjust` allows to work with bins of exactly the same size. Otherwise, the last bin is usually smaller than the others.
This function aims at changing the resolution of both 5C or Hi-C data. In case of 5C data (i.e. raw, not binned data), the contacts between all pairs of primers will be summarized per genomic bins (the median of all pairwise primers is usually used). In case of binned data (as Hi-C maps), the function can generate smaller resolution maps by aggregating bins. For instance, going from a 40kb resolution to a 1Mb resolution.
The `method` is used to combine the counts in a bin, must be ‘mean’, ‘median’ or ‘sum’. The `step` parameter allows to choose the overlap between the bins. A `step` of 2 means a 50% overlap between two bins, a step of 3 means a 60% overlap between two bins, etc.

### Value

An `HTCexp-class` object with binned intraction data. In this case, the genomic intervals are converted into bins of fixed size. The contact matrix is symetric.

### Author(s)

N. Servant, B. Lajoie

### See Also

`HTCexp-class`

### Examples

    data(Nora_5C)

    ## Data binning 100kb, with a 1/3 overlap
    E14.bin <- binningC(E14$chrXchrX, binsize=100000, step=3)
    show(E14.bin)
    ## Move to a lower resolution map
    E14.bin2 <- binningC(E14.bin, binsize=500000, step=1)
    show(E14.bin2)

[Package HiTC version 1.38.0 Index]