findDMRs {BiSeq} | R Documentation |
This function aggregates CpG sites to DMRs on the basis of their P values.
findDMRs(test.out, alpha, max.dist, diff.dir)
test.out |
An object returned by |
alpha |
OPTIONAL. A DMR contains CpG sites with P values smaller or equal than |
max.dist |
Numeric. The maximum distance between two P values smaller than
|
diff.dir |
Logical. Should DMRs be seperated if the direction of methylation
differences changes? If |
A GRanges
object storing the start and end positions of the DMRs with information in metadata columns:
median.p |
median of P values |
median.meth.group1 |
median of modeled methylation level of group1. |
median.meth.group1 |
median of modeled methylation level of group2. |
median.meth.diff |
median of difference of modeled methylation levels of group1 and group2. |
Katja Hebestreit
## Variogram under Null hypothesis (for resampled data): data(vario) plot(vario$variogram$v) vario.sm <- smoothVariogram(vario, sill=0.9) # auxiliary object to get the pValsList for the test # results of interest: data(betaResults) vario.aux <- makeVariogram(betaResults, make.variogram=FALSE) # Replace the pValsList slot: vario.sm$pValsList <- vario.aux$pValsList ## vario.sm contains the smoothed variogram under the Null hypothesis as ## well as the p Values that the group has an effect on DNA methylation. locCor <- estLocCor(vario.sm) clusters.rej <- testClusters(locCor, FDR.cluster = 0.1) clusters.trimmed <- trimClusters(clusters.rej, FDR.loc = 0.05) DMRs <- findDMRs(clusters.trimmed, max.dist=100, diff.dir=TRUE)