I am very new to bioinfromatics and have never handled DNA methylation data before. I have Illumina EPIC array data and I am looking for specific CpG probes that are within 2.5 megabases from the start of specific genes of interest. I am most interested in CpG probes in the promoter regions of my genes of interest. I want to create a list of these CpG probes based on their location and only use them to test for differentially methylated probes between my two groups of patients.
I have no idea how to do this, so any help would be really helpful.
I managed to get the chromosome number and the start position and end position of all of my genes of interest:
I have the Chromosome number and MAPINFO i.e. location of my CpG sites:
How do I go about finding out which CpG probes are situated within the start/end positions of the genes I have identified? I can't figure out how to code this selection in R as the chromosome column has to match and the MAPINFO value I assume has to between the start and end values.
Create two Granges objects corresponding to your gene coordinates and the probes : Beware, first you need to transform your chromosome columns to "chr1" "chr2" ... and not "1" "2" "3" After this,
Then, use the findOverlaps() function from GenomicAlignments package :
findOverlaps(probesRanges,genesRanges)