limitCov: Limits the coverage of a 'BSraw' object

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Number of methylated and unmethylated reads of a CpG site with coverage above maxCov are reduced such that the methylation level remains unchanged.

Usage

1
limitCov(object, maxCov)

Arguments

object

A BSraw.

maxCov

The maximum number of reads a CpG should have. All coverages above this threshold are limited. (Default is 50)

Details

This function might be useful prior to the use of predictMeth to limit the weights of CpGs with extremly high coverages. See binomLikelihoodSmooth for details.

Value

A BSraw object.

Author(s)

Katja Hebestreit

See Also

predictMeth, binomLikelihoodSmooth

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data(rrbs)

rrbs.clust.unlim <- clusterSites(object = rrbs,
                                 groups = colData(rrbs)$group,
                                 perc.samples = 4/5,
                                 min.sites = 20, max.dist = 100)
covBoxplots(rrbs.clust.unlim)

# 90% quantile of coverage is 39x
quantile(totalReads(rrbs.clust.unlim)[totalReads(rrbs.clust.unlim)>0],
0.9)

rrbs.clust.lim <- limitCov(rrbs.clust.unlim, maxCov = 39)
covBoxplots(rrbs.clust.lim)

BiSeq documentation built on Nov. 8, 2020, 8:05 p.m.