How to get DMR for Infinium methylation EPIC v2
3
1
Entering edit mode
@31eec9dd
Last seen 9 weeks ago
United States

I am doing EWAS analysis to get DMP, DMR and Enrichment pathway analysis. However, most packages do not support EPIC v2. I was so lucky to find some codes to get DMP, but still, now, I did not find a way to get Differentially methylated region (DMR). Is there a way to get it? I am trying to understand how these packages calculate DMR but it is confusing.

ChAMP DMRcate minfi • 3.5k views
ADD COMMENT
1
Entering edit mode
Tim Peters ▴ 200
@tim-peters-7579
Last seen 3 months ago
Australia

Hi Rae,

DMRcate can now call DMRs from EPICv2 in the current devel version: https://www.bioconductor.org/packages/devel/bioc/html/DMRcate.html. You can find the vignette for EPICv2 assays here: https://www.bioconductor.org/packages/devel/bioc/vignettes/DMRcate/inst/doc/EPICv2.pdf

This version will become 3.0 in the next Bioconductor release, available May 1st.

If you're interested, you can also check out our latest paper in BMC Genomics (https://bmcgenomics.biomedcentral.com/articles/10.1186/s12864-024-10027-5), where we take a deep dive into many aspects of EPICv2, including reproducibility and multiple probes mapping to the same CpG site.

Cheers, Tim

ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 12 hours ago
United States

All packages support the V2 EPIC array, you just need to get the correct annotation files, which are available from Zuguang Gu's GitHub page. You can install using BiocManager

library(BiocManager)
install("jokergoo/IlluminaHumanMethylationEPICv2anno.20a1.hg38")
install("jokergoo/IlluminaHumanMethylationEPICv2manifest ")
## and then
library(minfi)
targets <- read.metharray.sheet(<where your files are>)
dat <- read.metharray.exp(targets = targets)

At this point, do note that minfi does not natively support the V2 array, so you have to change the annotation

annotation(dat) <- setNames(c("IlluminaHumanMethylationEPICv2", "ilmn20a1.hg38"), c("array","annotation"))

And then you can use minfi to identify DMRs using bumpHunter, or you can use the DMRcate package, or DSS, once it is fixed and starts building again.

ADD COMMENT
0
Entering edit mode

Thank you James for your insight, I did this step earlier in the beginning of the analysis, but I am encountering a challenge when specifying parameters in the cpg.annotate function for DMR (Differentially Methylated Regions) analysis.

The goal is to include the array type (IlluminaHumanMethylationEPICv2) and the annotation (20a1.hg38) in my analysis. However, I am unsure if I'm specifying the parameters correctly in the cpg.annotate function, especially in relation to the design and contrast matrices.

This the code in the minfi pipeline

myAnnotation <- cpg.annotate(object = mVals, datatype = "array", what = "M", 
                             analysis.type = "differential", design = design, 
                             contrasts = TRUE, cont.matrix = contMatrix, 
                             coef = "naive - rTreg", arraytype = "450K")

I adjusting the code for EPIC v2 as following, still does not work. seems to me to get DMR is not possible we have to wait for the package to be updated. I am getting error message

"Error in match.arg(arraytype) : 'arg' should be one of "EPIC", "450K"

"


myAnnotation <- cpg.annotate(object = mVals, datatype = "array", what = "M", 
                             analysis.type = "differential", design = design, 
                             contrasts = TRUE, cont.matrix = contMatrix, 
                             coef = "Case - Control", arraytype = "IlluminaHumanMethylationEPICv2",
                             annotation = "ilmn20a1.hg38")
ADD REPLY
0
Entering edit mode

You want to make sure that you already have a GenomicRatioSet that you pass into cpg.annotate.

eset <- preprocessFunnorm(dat)
myAnnotation <- cpg.anotate("array", eset, design = design, 
                             contrasts = TRUE, cont.matrix = contMatrix, 
                             coef = "naive - rTreg")

You don't have to specify the 'what' or 'datatype' arguments (see ?cpg.annotate).

ADD REPLY
0
Entering edit mode

Hi, I was having similar issue but using your suggested code resulted in following (new problem)

Loading required package: IlluminaHumanMethylationEPICanno.ilm10b4.hg19

Attaching package: 'IlluminaHumanMethylationEPICanno.ilm10b4.hg19'

The following objects are masked from 'package:IlluminaHumanMethylationEPICv2anno.20a1.hg38':

    Islands.UCSC, Locations, Manifest, Other, SNPs.141CommonSingle,
    SNPs.142CommonSingle, SNPs.144CommonSingle, SNPs.146CommonSingle,
    SNPs.147CommonSingle, SNPs.Illumina

Error in makeGenomicRatioSetFromMatrix(mat = object, array = "IlluminaHumanMethylationEPIC",  : 
  No rowname matches. 'rownames' need to match IlluminaHumanMethylation450k probe names.

any solution plz?

ADD REPLY
0
Entering edit mode

Yes. Did you read the error message? The row.names of your matrix have to be Illumina IDs that match the array you are using.

ADD REPLY
0
Entering edit mode

Hello, I'm facing the same problem and I'm unable to solve it. Did you found the way of solving it? Thanks in advanced, it is getting quite complicated to adapt EPIC pipeline to EPIC V2, I will really appreciate any help.

ADD REPLY
0
Entering edit mode

There is this code in cpg.annotate

  if (arraytype == "450K") {
        grset <- makeGenomicRatioSetFromMatrix(mat = object, 
                                               array = "IlluminaHumanMethylation450k", annotation = "ilmn12.hg19", 
                                               what = what)
      }

And if you are loading the 'IlluminaHumanMethylationEPICanno.ilm10b4.hg19' package and getting an error that your EPICV2 row names don't match the IlluminaHumanMethylation450k probe names, that's an indication that you have told cpg.annotate that you are using a 450k array instead of an EPICV2 array.

ADD REPLY
0
Entering edit mode

Hello, DMRcate for EPICv2 is now in release, and there is also a tutorial, see How to get DMR for Infinium methylation EPIC v2

Cheers, Tim

ADD REPLY
0
Entering edit mode
Tim Peters ▴ 200
@tim-peters-7579
Last seen 3 months ago
Australia

Hey there,

DMRcate has the ability now to call DMRs from EPICv2. If you're interested in an integrated workflow which preprocesses idats, normalises, and calls DMRs, Braydon's tutorial might be useful for you:

https://clark-lab.github.io/EPICv2_tutorial/

The main thing to note is that for the moment, cpg.annotate() will accept only a beta or M-matrix of EPICv2 values, not a GenomicRatioSet. We are working to make the workflow more minfi-compatible, but since Zuguang's annotation package is external to Bioconductor it's trickier to integrate it with DMRcate. Instead, for the time being, we recommend sesame as a frontend for preprocessing and normalisation.

Cheers, Tim

ADD COMMENT
1
Entering edit mode

Hi Tim,

Zuguang submitted his packages as part of the current release, so they are no longer external to Bioconductor.

> library(BiocManager)
Bioconductor version 3.19
  (BiocManager 1.30.23), R 4.4.0
  (2024-04-24 ucrt)
> install("IlluminaHumanMethylationEPICv2anno.20a1.hg38")
'getOption("repos")' replaces
Bioconductor standard repositories,
see 'help("repositories", package =
"BiocManager")' for details.
Replacement repositories:
    CRAN: https://cran.rstudio.org
Bioconductor version 3.19
  (BiocManager 1.30.23), R 4.4.0
  (2024-04-24 ucrt)
Installing package(s)
  'IlluminaHumanMethylationEPICv2anno.20a1.hg38'
installing the source package 'IlluminaHumanMethylationEPICv2anno.20a1.hg38'

trying URL 'https://bioconductor.org/packages/3.19/data/annotation/src/contrib/IlluminaHumanMethylationEPICv2anno.20a1.hg38_1.0.0.tar.gz'
Content type 'application/x-gzip' length 156309587 bytes (149.1 MB)
downloaded 149.1 MB

* installing *source* package 'IlluminaHumanMethylationEPICv2anno.20a1.hg38' ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
...
ADD REPLY
0
Entering edit mode

Thanks James, TIL.

ADD REPLY

Login before adding your answer.

Traffic: 644 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6