bsseq (version 1.8.2)

BSmooth: BSmooth, smoothing bisulfite sequence data

Description

This implements the BSsmooth smoothing algorithm for bisulfite sequencing data.

Usage

BSmooth(BSseq, ns = 70, h = 1000, maxGap = 10^8, parallelBy = c("sample", "chromosome"), mc.preschedule = FALSE, mc.cores = 1, keep.se = FALSE, verbose = TRUE)

Arguments

BSseq
An object of class BSseq.
ns
The minimum number of methylation loci in a smoothing window.
h
The minimum smoothing window, in bases.
maxGap
The maximum gap between two methylation loci, before the smoothing is broken across the gap. The default smoothes each chromosome separately.
parallelBy
Should the computation be parallel by chromosome or sample, see details.
mc.preschedule
Passed to mclapply (should the tasks be prescheduled).
mc.cores
Passed to mclapply (the number of cores used). Note that setting mc.cores to a value greater than 1 is not supported on MS Windows, see the help page for mclapply.
keep.se
Should the estimated standard errors from the smoothing algorithm be kept. This will make the return object roughly 30 percent bigger and may not be used for anything.
verbose
Should the function be verbose.

Value

An object of class BSseq, containing smoothed values and optionally standard errors for these.

Details

ns and h are passed to the locfit function. The bandwidth used is the maximum (in genomic distance) of the h and a width big enough to contain ns number of methylation loci.

The function uses the parallel package to do parallel computations. In order to use this, make sure your system have enough RAM, these are typically big objects. The computation can either be split by chromosome or by sample, which is better depends on the number of samples and how many concurrent smoothings may be done.

References

KD Hansen, B Langmead, and RA Irizarry. BSmooth: from whole genome bisulfite sequencing reads to differentially methylated regions. Genome Biology (2012) 13:R83. doi:10.1186/gb-2012-13-10-r83.

See Also

locfit in the locfit package, as well as BSseq.

Examples

Run this code
## Not run: 
# data(BS.chr22)
# BS.fit <- BSmooth(BS.chr22, verbose = TRUE)
# BS.fit
# ## End(Not run)

Run the code above in your browser using DataCamp Workspace