mean coverage plot of IRanges / Granges object
1
0
Entering edit mode
n.mary • 0
@615fff84
Last seen 16 months ago
France

Hello,

From a IRange object:

ir <- IRanges(c(1,3,5,7,7,9),width=c(4,2,1,2,2,2))


I know how to plot the corevage

cov <- coverage(ir);plot(cov)


I would like to know how to calculate the mean coverage for a window of x bases (5 bases in this example). I don't know how to do it.

Any tips?

Thank,

IRanges • 287 views
1
Entering edit mode
@james-w-macdonald-5106
Last seen 3 hours ago
United States
runmean(cov, 5)


See ?Rle-runstat