gcCorrect: Correction for GC content

Description Usage Arguments Details Value Author(s) Examples

View source: R/gcCorrect.r

Description

This function performs GC correction of read counts in bins, by means of loess.

Usage

1
2
gcCorrect(rangedata, sampletype="normal",span = 0.3, mappability = 0.9, 
            samplesize = 50000, bprange = 6, maskmap=T )

Arguments

rangedata

Object of class IRanges created by HMMcopy::wigsToRangedData

sampletype

One of "tumor" or "normal"

span

span parameter of loess().

mappability

Bins with mappability lower than this are ignored for GC correction

samplesize

That many random bins are selected to derive GC correction

bprange

Bins with read counts that are outliers are ignored in GC correction, where an outlier is defined as in boxplot(..., range=bprange )

maskmap

Sets reads.gc and map columns to NA if bin's mappability is less than the value of mappability argument

Details

If sampletype is "tumor", then a first segmentation round is done to adjust the read counts for the segments' height.

Value

Returns the rangedata, with an additional column named reads.gc that contains the (scaled) GC-corrected read counts. More precisely the column takes the value:

rangedata$reads/predict( loess(rangedata$reads~rangedata$gc, ...), rangedata$gc)

Author(s)

Mathieu Lemire

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# normal data
n<- wigsToRangedData( normalWigFile, gcWigFile, mapWigFile )
nc<-gcCorrect(n) 
# tumour data
t <- wigsToRangedData( tumourWigFile, gcWigFile, mapWigFile )
tc<-gcCorrect( t, sampletype="tumor" )

## End(Not run)

mathieu-lemire/celluloid_0.11 documentation built on Aug. 6, 2018, 9:15 a.m.