filterByCov {BiSeq} | R Documentation

## Filters regions (or single CpGs) of a `BSraw` object with a minimum coverage

### Description

This method reduces a `BSraw` object to its regions (or single CpGs) with a minimum number of reads.

### Usage

    filterByCov(object, minCov, global)

### Arguments

`object` | A `BSraw`.
`minCov` | Minimum number of reads overlapping the CpG sites.
`global` | A logical indicating whether the regions should achieve the minimum coverage in each sample. If `global = TRUE` the filtered object will consist of the regions achieving the minimum coverage in all samples. If `global = FALSE` (default) this function filters the regions for each sample separately, irrespectively of the coverages in other samples. `totalReads` and `methReads` are set to zero, if the minimum coverage is not obtained. Regions covered too sparse in all samples are dropped.

### Value

A `BSraw` object containing the CpGs or regions achieving the minimum coverage in all (if `global=TRUE`) or at least one (if `global=FALSE`) samples.

### Author(s)

Katja Hebestreit

### See Also

`filterBySharedRegions`

### Examples

    data(rrbs)
    rrbs.reduced <- filterByCov(object=rrbs, minCov=10, global=TRUE)

[Package BiSeq version 1.26.0 Index]