View source: R/Likelihood_functions.R
estimateErrorRate | R Documentation |
This function estimates the CpG-specific error rate from a single sample BSseq object generated using read.bedMethyl
.
estimateErrorRate(BSseq, minCov = 10, maxCov = 100, minRatio = 0.8, plotErrorProfile = FALSE)
BSseq |
A single sample object of class |
minCov |
A non-negative integer specifying the minimum coverage required for CpG loci to be considered. |
maxCov |
A non-negative integer specifying the maximum coverage allowed for CpG loci to be considered. |
minRatio |
A numeric value between 0 and 1 specifying the minimum ratio of CpG sites to non-CpG sites for a loci to be considered. |
plotErrorProfile |
A logical value indicating whether to plot the CpG to non-CpG ratio distribution for the filtered sites. |
A numeric value representing the estimated CpG-specific error rate the BSseq object.
Søren Blikdal Hansen (soren.blikdal.hansen@sund.ku.dk)
BSseq
for the BSseq
class,
read.bedMethyl
for details on reading data into a BSseq
object.
# Example input files
infiles <- c(system.file("extdata/HG002_nanopore_test.bedMethyl.gz",
package = "bsseq"),
system.file("extdata/HG002_pacbio_test.bedMethyl.gz",
package = "bsseq"))
# Run the function to import data
bsseq <- read.bedMethyl(files = infiles,
colData = DataFrame(row.names = c("test_nanopore",
"test_pacbio")),
strandCollapse = TRUE,
verbose = TRUE)
# Estimate error rate
estimateErrorRate(bsseq[, 1], plotErrorProfile = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.