GDC legacy archive retired. So, I downloaded the TCGA methylation data in hg38 (450K) using TCGAbiolinks. I'd like to use DMRcate to find DMRs. But the problem is that the annotation is hg19 (IlluminaHumanMethylation450kanno.ilmn12.hg19). I am tring to modify the "cpg.annotate" function, but got stuck when playing with "makeGenomicRatioSetFromMatrix" function to use my home made annotation for methylation array in hg38 (450K) (based on files here http://zwdzwd.github.io/InfiniumAnnotation). Actually, I don't know how to modify the funciton in makeGenomicRatioSetFromMatrix for this part as below to use my annotation rather than the feeded value of "ilmn12.hg19". I was also trying to make a GenomicRatioSet using my homemade annotation, but failed.
out <- GenomicRatioSet(gr = gr[ind2, ], Beta = NULL,
M = mat[ind1, , drop = FALSE], CN = NULL, colData = pData,
annotation = c(array = array, annotation = annotation),
preprocessMethod = preprocessing)
So, the question is that how should I apply "cpg.annotate" to TCGA methylation data in hg38 (450K)?
Another confusion is that I see "DMR.plot" has an option of "genome" which can be "hg38" (https://www.bioconductor.org/packages/devel/bioc/manuals/DMRcate/man/DMRcate.pdf). Is "hg38" only for EPICv2 in hg38?
See a related question here https://www.biostars.org/p/9587144/ .
Thanks a lot!