DMR {sesame} | R Documentation |
This subroutine uses Euclidean distance to group CpGs and then combine p-values for each segment. The function performs DML test first if cf is NULL. It groups the probe testing results into differential methylated regions in a coefficient table with additional columns designating the segment ID and statistical significance (P-value) testing the segment.
DMR( betas, smry, contrast, platform = NULL, refversion = NULL, dist.cutoff = NULL, seg.per.locus = 0.5 )
betas |
beta values for distance calculation |
smry |
DML |
contrast |
the pair-wise comparison or contrast check colnames(attr(smry, "model.matrix")) if uncertain |
platform |
EPIC, HM450, MM285, ... |
refversion |
hg38, hg19, mm10, ... |
dist.cutoff |
distance cutoff (default to use dist.cutoff.quantile) |
seg.per.locus |
number of segments per locus higher value leads to more segments |
coefficient table with segment ID and segment P-value each row is a locus, multiple loci may share a segment ID if they are merged to the same segment. Records are ordered by Seg_Est.
sesameDataCache("HM450") # in case not done yet data <- sesameDataGet('HM450.76.TCGA.matched') smry <- DML(data$betas[1:1000,], ~type, meta=data$sampleInfo) colnames(attr(smry, "model.matrix")) # pick a contrast from here merged_segs = DMR(data$betas[1:1000,], smry, "typeTumour")