I have a DNA methylation matrix with 30 samples and about 770k probes. Two phenotypes exist in these 30 samples. I would like to compare samples with different phenotype and obtain the differential methylated regions. I use the function bumphunter() in minfi. I found that the original function is adapted from the package bumphunter. Therefore, I do two tests with different input.
test(1): matrix as input, using package bumphunter and function bumphunterEngine().
test(2): GenomeRatioSet as input, using package minfi and function bumphunter(). The
GenomicRatioSet was generated from the matrix using the function makeGenomicRatioSetFromMatrix(). Cluster files were made using the function clusterMaker().
However, the results obtained from the two tests were different: test1 obtained much more "bumps" compared with test2. Except the input and cluster files, all other parameters are the same. I further went with the bumphunterEngine using the getMethSignal(GRSet, "M") as the input (test3), the results is close to the test1 and have large difference compared with test2.
I have a DNA methylation matrix with 30 samples and about 770k probes. Two phenotypes exist in these 30 samples. I would like to compare samples with different phenotype and obtain the differential methylated regions. I use the function bumphunter() in minfi. I found that the original function is adapted from the package bumphunter. Therefore, I do two tests with different input.
test(1): matrix as input, using package bumphunter and function bumphunterEngine(). test(2): GenomeRatioSet as input, using package minfi and function bumphunter(). The
GenomicRatioSet was generated from the matrix using the function makeGenomicRatioSetFromMatrix(). Cluster files were made using the function clusterMaker(). However, the results obtained from the two tests were different: test1 obtained much more "bumps" compared with test2. Except the input and cluster files, all other parameters are the same. I further went with the bumphunterEngine using the getMethSignal(GRSet, "M") as the input (test3), the results is close to the test1 and have large difference compared with test2.
Attached code: test(1): matrix_bumps <- bumphunterEngine(matrix, design, chr, pos, cluster = cl_matrix, coef = 1, maxGap = 300,cutoff = 0.3, nullMethod = "bootstrap", smooth = T, B = 100, verbose = T, smoothFunction = loessByCluster) test(2): GRSet_bumps <- bumphunter(GRSet, design = design, cluster = cl_GRSet, B = 100, type = "Beta", maxGap = 300, cutoff = 0.3, coef = 1, nullMethod = "bootstrap", smooth = T, smoothFunction = loessByCluster) test(3): GRSet_bumps2 <- bumphunterEngine(getMethSignal(GRSet, "M"), design = design, chr = as.factor(seqnames(GRSet)), pos = start(GRSet), coef = 1, cutoff = 0.3, maxGap = 300,nullMethod = "bootstrap", smooth = T, smoothFunction = loessByCluster, B=100 )
make the GenomicRatioSet from the matrix
GRSet <- makeGenomicRatioSetFromMatrix(matrix,rownames(matrix), pData = as.data.frame(colnames(matrix)), array = "IlluminaHumanMethylationEPIC", annotation = "ilm10b3.hg19", what = "M")
different number of bumps detected