addOffset: Estimate background reads

Description Usage Arguments Value Author(s) See Also Examples

View source: R/qsea.createSet.R

Description

This function sets the background reads offset parameters for the qseaSet object, either by estimating offset reads, or by setting user provided values.

Usage

1
addOffset(qs,enrichmentPattern , maxPatternDensity=0.01,offset)

Arguments

qs

the qseaSet object

enrichmentPattern

name of the enrichment pattern, as specified in addPatternDensity

maxPatternDensity

Maximum pattern density, at which the window is treated as pattern free.

offset

This parameter alternatively allows to specify the amount of background reads for each sample manually. In this case, please provide average background reads for CNV free windows in rpkm scale.

Value

The function returns the qseaSet object, extended by the estimated amount of background reads for all samples

Author(s)

Mathias Lienhard

See Also

addPatternDensity, getOffset

Examples

1
2
3
4
5
6
7
#simulate data with varing background fractions
qs=getExampleQseaSet(expSamplingDepth=5e4, repl=5,bgfraction=seq(0,.8,.2))
#estimate the background in simulated data
addOffset(qs, "CpG", maxPatternDensity=0.7)
#return the background on different scales
getOffset(qs, scale="fraction") #estimated fraction of total reads
getOffset(qs, scale="rpw") #average background reads per CNV free window

qsea documentation built on Nov. 8, 2020, 8:28 p.m.