BiasFactor: Calculate the bias factor induced by the genomic replication...

Description Usage Arguments Value Author(s) Examples

View source: R/BiasFactor.R

Description

The whole genome is first divided into N consecutive regions (windows). The number of read counts is summed within each window and is modelled as a function of the window using the locally weighed scatterplot smoothing (LOESS) function. Finally, we calculate a fitted value for each insertion, and then normalize these fitted values to have the product of these values equal to one. The normalized values are the bias factors(one for each insertion).

Usage

1
BiasFactor(Location, Count, window=10000)

Arguments

Location

a numeric vector specifying insertion locations.

Count

a numeric vector of read counts over locations.

window

the number of regions to divide the whole genome.

Value

bias.factor

bias factor for each insertion.

yfit

the fitted count value for each insertion.

w

window id

yw

total read counts over windows.

ywfit

the fitted count value for each window.

Author(s)

Lili Zhao zhaolili@umich.edu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
data(serratia)
countData=serratia[,-c(1,2,3)]
location=serratia$Loc


# obtain bias factor for the first sample
foo=BiasFactor(location, countData[,1],  window=10000)  

# obtain the adjusted counts after the bias correction
countData.adj=countData[,1]/foo$bias.factor



## End(Not run)

Tnseq documentation built on May 1, 2019, 7:31 p.m.

Related to BiasFactor in Tnseq...