cpgDensity {scmeth} | R Documentation |
Provides Coverage by the CpG density. CpG Density is defined as the number of CpGs observed in certain base pair long region.
cpgDensity(bs, organism, windowLength = 1000, small = FALSE)
bs |
bsseq object |
organism |
scientific name of the organism of interest, e.g. Mmusculus or Hsapiens |
windowLength |
Length of the window to calculate the density |
small |
Indicator for a small dataset, cpg density is calculated more memory efficiently for large dataset but for small dataset a different quicker method is used Default value for window length is 1000 basepairs. |
Data frame with sample name and coverage in repeat masker regions
library(BSgenome.Hsapiens.NCBI.GRCh38) directory <- system.file("extdata/bismark_data", package='scmeth') bs <- HDF5Array::loadHDF5SummarizedExperiment(directory) cpgDensity(bs, Hsapiens, 1000, small=TRUE)