getWinOverlapEachIRange: Get the ranges of sliding windows that overlap each range of...

Description Usage Arguments Details Value Examples

View source: R/getWinOverlapEachIRange.R

Description

Get the ranges of sliding windows that overlap each range of an IRanges object.

Usage

1
2
getWinOverlapEachIRange(x, winWidth = 1000L, winStep = 100L,
  readProp = 0.5, maxWin = Inf)

Arguments

x

an IRanges object containing the start and end position of each read fragment.

winWidth

the width of the sliding window, 1000 by default.

winStep

the step length to sliding the window, 100 by default.

readProp

A read is considered to be included in a window if at least readProp of it is in the window. Specified as a proportion.

maxWin

The maximum window ID

Details

This finds the windows that overlap each range of the input IRanges object. Each range corresponds to a read fragment. This allows the total number of read fragments within a window to be calculated simply using coverage.

Value

An IRanges object containing the index of the windows overlapping each read fragment

Examples

1
2
3
library(IRanges)
x <- IRanges(start=round(runif(100,1000,10000)),width=100)
getWinOverlapEachIRange(x)

UofABioinformaticsHub/rnaCleanR documentation built on Aug. 11, 2021, 11:51 p.m.