rmPosReps: Filter out position replicates from an EPICv2 beta- or...

View source: R/rmPosReps.R

rmPosRepsR Documentation

Filter out position replicates from an EPICv2 beta- or M-matrix

Description

Given a beta-value or M-value matrix with EPICv2 probe IDs as rownames, returns a truncated matrix with a 1-to-1 mapping of probe ID to CpG locus. Values returned depend on the filtering strategy selected. Replicate probes are averaged by default, but the user may optionally select individual probes per replicate group based on maximum sensitivity to methylation change or maximum precision, as per empirical cross-platform consensus testing against EPICv1 and WGBS data (Peters et al. 2024).

Usage

rmPosReps(object, filter.strategy= c("mean", "sensitivity",
                                     "precision","random"))

Arguments

object

A matrix of beta- or M-values, with unique EPICv2 Illumina probe IDs as rownames.

filter.strategy

Strategy for filtering probe replicates that map to the same CpG site. "mean" takes the mean of the available probes; "sensitivity" takes the available probe most sensitive to methylation change; "precision" either selects the available probe with the lowest variation from the consensus value (most precise), or takes the mean if that confers the lowest variation instead, "random" takes a single probe at random from each replicate group.

Value

A truncated matrix with a 1-to-1 mapping of probe to CpG site. If the group mean is taken, the first probe in the group by alphabetical sorting is returned as the rowname.

Author(s)

Tim J. Peters <t.peters@garvan.org.au>

References

Peters, T.J., Meyer, B., Ryan, L., Achinger-Kawecka, J., Song, J., Campbell, E.M., Qu, W., Nair, S., Loi-Luu, P., Stricker, P., Lim, E., Stirzaker, C., Clark, S.J. and Pidsley, R. (2024). Characterisation and reproducibility of the HumanMethylationEPIC v2.0 BeadChip for DNA methylation profiling. BMC Genomics 25, 251. doi:10.1186/s12864-024-10027-5.

Examples

library(ExperimentHub)
eh <- ExperimentHub()
ALLbetas <- eh[["EH9451"]]
ALLbetas <- ALLbetas[1:1000,]
ALLMs <- minfi::logit2(ALLbetas)
ALLMs.repmean <- rmPosReps(ALLMs, filter.strategy="mean")

timpeters82/DMRcate-devel documentation built on April 26, 2024, 9:23 a.m.