Hi thank you very much. So in essence I make a dataframe from genomic ranges of the areas of the genome I'm interested in. Using the dataframe I can get the CpG probe names in these regions from the Epic manifest?
Is there a way to find out which CpG probes are in Cpg Islands, promoter regions etc from the Epic manifest?
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)