getWinOverlapEachReadFragment: Get the window ranges that overlap each read fragment

Description Usage Arguments Value Examples

View source: R/getWinOverlapEachReadFragment.R

Description

Calculate the window ranges that overlap each read fragment

Usage

1
2
getWinOverlapEachReadFragment(readInfo, strand, winWidth, winStep,
  readProp, useCoverage = FALSE, subset = NULL)

Arguments

readInfo

a list contains the read information

strand

the considering strand

winWidth

the width of the sliding window, 1000 by default.

winStep

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

readProp

a read fragment is considered to be included in a window if and only if at least readProp percent of it is in the window.

useCoverage

either base on coverage or number of reads

subset

if we consider only a subset of the input reads

Value

If useCoverage=FALSE: an IRanges object which contains the range of sliding windows that overlap each read fragment. If useCoverage=TRUE: a list of two objects, the first one is the later IRanges object, the second one is an integer-Rle object which contains the coverage of the input readInfo

Examples

1
2
3
4
5
library(Rsamtools)
file <- system.file('extdata','s2.sorted.bam',package = 'strandCheckR')
readInfo <- scanBam(file, param = 
ScanBamParam(what = c("pos","cigar","strand")))
getWinOverlapEachReadFragment(readInfo[[1]],"+",1000,100,0.5)

UofABioinformaticsHub/strandCheckR documentation built on Aug. 15, 2021, 9:08 a.m.