getWinFromBamFile: get the strand information of all windows from bam files

Description Usage Arguments Value See Also Examples

View source: R/getWinFromBamFile.R

Description

get the number of positive/negative reads of all windows from bam files

Usage

1
2
getWinFromBamFile(files, sequences, mapqFilter = 0, yieldSize = 1e+06,
winWidth = 1000, winStep = 100, readProp = 0.5, paired)

Arguments

files

the input bam files. Your bamfiles should be sorted and have their index files located at the same path.

sequences

the list of sequences to be read

mapqFilter

every read that has mapping quality below mapqFilter will be removed before any analysis

yieldSize

by default is 1e6, i.e. the bam file is read by block of records whose size is defined by this paramter. It is used to pass to same paramter of the scanBam function.

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. 0.5 by default.

paired

if TRUE then the input bamfile will be considered as paired end reads. If missing, 100 thousands first reads will be inspected to test if the input bam file in paired end or single end.

Value

a DataFrame object containing the number of positive/negative reads and coverage of each window sliding across the bam file

See Also

filterDNA, plotHist, plotWin

Examples

1
2
3
file <- system.file('extdata','s1.sorted.bam',package = 'strandCheckR')
win <- getWinFromBamFile(file,sequences='10')
win

strandCheckR documentation built on Nov. 8, 2020, 7:02 p.m.