normaliseNC {segmentSeq} | R Documentation |
This function adjusts the observed cytosine methylated/unmethylated counts at each cytosine site based on the reported nonconversion rates for each samples.
normaliseNC(mD, nonconversion)
mD |
Either an |
nonconversion |
A vector defining nonconversion rates for each sample, required if a
|
This function operates by estimating the expected number of unconverted cytosines at each site and subtracting this from the reported methylated cytosines and adding to the reported unmethylated cytosines. It should not be used on data that will be analysed in a way that accounts for nonconversion; e.g., using the ‘bbNCDist’ densityFunction object.
A modified version of the object supplied as ‘mD’.
Thomas J. Hardacastle
Hardcastle T.J. Discovery of methylation loci and analyses of differential methylation from replicated high-throughput sequencing data. bioRxiv (http://dx.doi.org/10.1101/021436)
datadir <- system.file("extdata", package = "segmentSeq") files <- c("short_18B_C24_C24_trim.fastq_CG_methCalls.gz", "short_Sample_17A_trimmed.fastq_CG_methCalls.gz", "short_13_C24_col_trim.fastq_CG_methCalls.gz", "short_Sample_28_trimmed.fastq_CG_methCalls.gz") mD <- readMeths(files = files, dir = datadir, libnames = c("A1", "A2", "B1", "B2"), replicates = c("A","A","B","B"), nonconversion = c(0.004777, 0.005903, 0.016514, 0.006134)) mD <- normaliseNC(mD)