Learn R Programming

BiSeq (version 1.12.0)

filterByCov: 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

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

See Also

filterBySharedRegions

Examples

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

Run the code above in your browser using DataLab