Smoothing of methylation signal within windows
0
1
Entering edit mode
6.2 years ago
gamma.jian ▴ 40

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,

Gian

R genome • 1.3k views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
1
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 2087 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6