IRanges icon indicating copy to clipboard operation
IRanges copied to clipboard

Fix for slidingIRanges function

Open AxelRosendahlHuber opened this issue 2 years ago • 0 comments

See the Biostars thread at: https://support.bioconductor.org/p/9140415 I have checked the fix proposed by story.benjamin and this fixes the behaviour of the function and would propose a fix

Correct function below: (which changes seq(1L, len - width , by = shift) for seq(1L, len - width + 1 , by = shift)

slidingIRanges <- function (len, width, shift = 1L)  {
  start <- seq(1L, len - width + 1 , by = shift)
  end <- seq(width, len, by = shift)
  IRanges(start, end)
}

AxelRosendahlHuber avatar Feb 01 '23 11:02 AxelRosendahlHuber