| countHitsWindow {htSeqTools} | R Documentation |
Computes a smoothed number of hits along the chromosome by using moving windows of user specified size.
countHitsWindow(x, chrLength, windowSize = 10^4 - 1)
x |
Object containing hits (start, end and chromosome). Currently only |
chrLength |
Named vector indicating the length of each chromosome in base pairs. |
windowSize |
Size of the window used to smooth the hit count. |
signature(x = "RangedData")x contains chromosome, start and end positions for each hit.
set.seed(1)
st <- round(rnorm(1000,500,100))
st[st>=10000] <- 10000
strand <- rep(c('+','-'),each=500)
space <- rep('chr1',length(st))
x <- RangedData(IRanges(st,st+38),strand=strand,space=space)
countHitsWindow(x, chrLength=c(chr1=10000), windowSize=99)