cpgDiscretization: Discretize the CpG methylation values to align with single...

Description Usage Arguments Value Examples

View source: R/cpgDiscretization.R

Description

In single cell analysis overwhelmingly large number of CpGs have binary methylation Due to errors in sequencing and amplification many CpGs tend to have non-binary methylation. Hence this function catergorizes the non-binary CpGs as methylated if the methyation is above 0.8 and unmethylated if the methylation is below 0.2

Usage

1
2
cpgDiscretization(bs, subSample = 1e+06, offset = 50000,
  coverageVec = NULL)

Arguments

bs

bsseq object

subSample

number of CpGs to subsample. Default value is 1000000.

offset

how many CpGs to offset when subsampling Default value is set to be 50000, i.e. first 50000 CpGs will be ignored in subsampling.

coverageVec

If coverage vector is already calculated provide it to speed up the process

Value

meth discretized methylation matrix

discard total number of removed CpGs from each sample

Percentage of CpGs discarded compared to the total number of CpGs

Examples

1
2
3
directory <- system.file("extdata/bismark_data", package='scmeth')
bs <- HDF5Array::loadHDF5SummarizedExperiment(directory)
cpgDiscretization(bs)

scmeth documentation built on Nov. 8, 2020, 6:21 p.m.