This is great! although it seems that it is for Illumina EPIC V1, and I am using V2
I think I have a very easy question but unfortunately I haven't found a good answer yet, it's basically that I would like to annotate, using R, illumina epic probe sites according to their location, We did an experiment using Illumina Epic probes, and I now have my matrix of average beta values differences between two conditions for each probe, and I am trying to create a graph such as (E) and (F) here, where the Y axis is the average beta value difference for the probe and the X-axis corresponds to the location of this probe (transcription factor binding site, open chromatin, DNase I hypersensitive sites, etc). For this I need to annotate the probes, how can I do that?
I've been looking at the IlluminaMethylationManifest but it is not clear at all how to use it for this.
Any suggestions appreciated.
1 answer
Using minfi, this should be useful:
library(minfi)
library(minfiDataEPIC)
library(GenomicRanges)
epic.anno <- getAnnotation(minfiDataEPIC::MsetEPIC)
epic.anno <- epic.anno[order(epic.anno$chr, epic.anno$pos), ]
cpgs.ranges <- GRanges(epic.anno$chr, IRanges(epic.anno$pos, epic.anno$pos, names = epic.anno$Name))
cpgs.ranges@elementMetadata <- epic.anno
Log in to answer this question.
Just in case, check if you're using EPIC v1 and EPIC v2, because the annotations are different (see this and this packages)
Thanks, I am using EPIC v2, yet, it is not clear to me how to get right information from the manifest.
If you install and load these packages, you can get a data.frame within R with the information of probe names, coordinates, genes mapped to, etc., as such: