Hi all,
Hopefully a simple one. I have used Rnbeads to generate M values for some 450k arrays, can happily export the site level data by cg ID and gene/promoter level data too. However, I can't find a simple within R way of generating a list of cg IDs by gene?
Chromosome Start End Strand symbol entrezID CpG GC C G
ENSG00000227232 chr1 14363 29806 - WASH7P 653635;100287171 380 8441 4320 4121
ENSG00000186092 chr1 69091 70008 + OR4F5 79501 11 393 218 175
ENSG00000237683 chr1 134901 139379 - <NA> 728728;100996768;101929819 181 2886 1113 1773
ENSG00000268903 chr1 135141 135895 - <NA> <NA> 42 511 198 313
ENSG00000237094 chr1 317720 453948 + <NA> 101928706;101929822;101929823 1498 57740 28840 28900
ENSG00000239664 chr1 529833 532878 - <NA> <NA> 60 1371 850 521
I can intersect the coordinates manually, but is there a simple way of exporting the CpG IDs by gene? i.e. the 380 CpGs present in ENSG00000227232. - which CpGs are they?
And going the opposite way, given a list of CpG IDs (e.g. cg13869341, cg14008030, cg12045430), which package/function will tell me what genes they are in without me needing to intersect them manually?
Thanks in advance!