keptProbaWin: get the probability of begin kept for each window

Description Usage Arguments Value

View source: R/keptProbaWin.R

Description

calculate the keeping probability of each window based on its positive/negative proportion

Usage

1
2
3
keptProbaWin(winPosAlignments, winNegAlignments, winWidth, winStep, threshold,
pvalueThreshold, errorRate, mustKeepWin, minCov, maxCov, getWin,
useCoverage = FALSE)

Arguments

winPosAlignments

an object returned by getWinOfAlignments for positive reads

winNegAlignments

an object returned by getWinOfAlignments for negative reads

winWidth

the width of the sliding window, 1000 by default.

winStep

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

threshold

the strand proportion threshold to test whether to keep a window or not.

pvalueThreshold

threshold of p-value

errorRate

the probability that an RNA read takes the false strand. 0.01 by default

mustKeepWin

the windows that must be kept regardless their strand proportion

minCov

In the case that useCoverage=FALSE, if a window has least than minCov reads, then it will be rejected regardless the strand proportion. For the case that useCoverage=TRUE, if a window has max coverage least than minCov, then it will be rejected. 0 by default

maxCov

In the case that useCoverage=FALSE, if a window has more than maxCov reads, then it will be kept regardless the strand proportion. For the case that useCoverage=TRUE, if a window has max coverage more than maxCov, then it will be kept. If 0 then it doesn't have effect on selecting window. 0 by default.

getWin

if TRUE, the function will return a data frame containing the information of all windows. It's FALSE by default.

useCoverage

if TRUE, then the strand information in each window corresponds to the sum of coverage coming from positive/negative reads; and not the number of positive/negative reads as default.

Value

A list of 2 numeric-Rle objects containing keeping probability of each +/- alignments. If getWin=TRUE then the list contains an additional DataFrame for the number of reads and coverage of the input window +/- alignments


strandCheckR documentation built on Nov. 1, 2018, 2:26 a.m.