I am trying to analyze a data set of BS-seq (RRBS) data following the example at the section 4.7 of the edgeR user manual.
In the tutorial the function nearestTSS is used to annotate the nearest gene of each site.
Is there a way to retrieve information though for the two upstream and two downstream genes instead of the one that is closer?
I found the get2NearestFeature function (https://rdrr.io/bioc/hiAnnotator/man/get2NearestFeature.html) but I am not sure how to convert my DGElist object to a GRanges objects.
Note that I am using hg19 as a human reference strain.
Thank you very much in advance for your time and help.