mean coverage plot of IRanges / Granges object
1
0
Entering edit mode
n.mary • 0
@615fff84
Last seen 3 days 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 • 47 views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 19 hours ago
United States
runmean(cov, 5)

See ?Rle-runstat

Login before adding your answer.

Traffic: 455 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