predictMeth: Predicts methylation levels along CpG sites or for a grid of...

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

Description

Uses local regression to predict methylation levels per sample.

Usage

1
predictMeth(object, h, grid.dist, mc.cores)

Arguments

object

A BSraw with a cluster.id metadata column on the rowRanges, usually the output of clusterSites.

h

Bandwidth in base pairs. Large values produce a smoother curve. Default is 80.

grid.dist

OPTIONAL. If numeric, than methylation values are predicted at intervals of grid.dist base pairs. By default, methylation is smoothed at each CpG site.

mc.cores

Passed to mclapply. Default is 1.

Details

Uses binomLikelihoodSmooth with pos = CpG position, m = number methylated reads and n = number of reads. pred.pos corresponds to all CpG positions, or to the grid sites respectively, within the CpG clusters.

Value

A BSrel object containing the predicted methylation levels in the methLevel slot.

Author(s)

Katja Hebestreit

See Also

clusterSites, binomLikelihoodSmooth, mclapply

Examples

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

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

ind.cov <- totalReads(rrbs.clust.unlim) > 0
quant <- quantile(totalReads(rrbs.clust.unlim)[ind.cov], 0.9)
rrbs.clust.lim <- limitCov(rrbs.clust.unlim, maxCov = quant)

# with a small subset to save calculation time:
rrbs.part <- rrbs.clust.lim[1:100,]

predictedMeth <- predictMeth(object=rrbs.part)

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