Question: Smoothing of methylation signal within windows
gravatar for franc.jian
2.2 years ago by
franc.jian40 wrote:

Dear all,

I would like to perform smoothing on my RRBS methylation data using a sliding window approach. Moreover, I would like also to compute the median beta for a series of fixed regions.

I can easily create a bed file for both the regions I am interested in, and for the position of each CpG covered, as my data are in the form of a matrix with CpG coordinates in rows and samples in columns.

I suspect this can be achieved with two different GRanges objects (one for sites and one for regions) and then the findOverlaps() funtion, but I feel like there should be a more elegant solution, maybe using specific packages or a tool that I currently don't know.

Thank you for your help,


R genome • 615 views
ADD COMMENTlink written 2.2 years ago by franc.jian40

What's your ultimate goal and which packages have you looked at already?

ADD REPLYlink written 2.2 years ago by Friederike6.5k

My ultimate goal is to evaluate the median Beta inside specific regions and more generally perform smoothing on methylation data (in the form of a Beta table). To this moment, I managed to obtain a solution using GRanges package, which made sense but was actually a bit intricate!

ADD REPLYlink written 2.2 years ago by franc.jian40

Would you mind posting the solution as an answer (and then accepting your own answer)? May help others.

ADD REPLYlink written 2.2 years ago by Kevin Blighe68k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1543 users visited in the last hour