slidingIRanges
function (len, width, shift = 1L)
{
start <- seq(1L, len - width, by = shift)
end <- seq(width, len, by = shift)
IRanges(start, end)
}
<environment: namespace:IRanges>
It seems to me that this function doesn't really work... given that let's say I'm trying to generate a 1 nt sliding window across a sequence of length 10.
> length(seq(1L,10-1))
[1] 9
> length(seq(1,10))
[1] 10
>
Should it be? start <- seq(1L, len - width + 1, by = shift)
Or maybe I'm missing something... I was just trying to generate a sliding IRanges window.
Maybe I'm the first person to ever use the function!
https://code.bioconductor.org/search/search?q=slidingIRanges