correctGC {AneuFinder} | R Documentation

## GC correction

### Description

Correct a list of `binned.data` by GC content.

### Usage

    correctGC(binned.data.list, GC.BSgenome, same.binsize = FALSE,
      method = "loess", return.plot = FALSE, bins = NULL)

### Arguments

`binned.data.list` | A `list` with `binned.data` objects or a list of filenames containing such objects.
`GC.BSgenome` | A `BSgenome` object which contains the DNA sequence that is used for the GC correction.
`same.binsize` | If `TRUE` the GC content will only be calculated once. Set this to `TRUE` if all `binned.data` objects describe the same genome at the same binsize and stepsize.
`method` | One of `c('quadratic', 'loess')`. Option `method='quadratic'` uses the method described in the Supplementary of `citation("AneuFinder")`. Option `method='loess'` uses a loess fit to adjust the read count.
`return.plot` | Set to `TRUE` if plots should be returned for visual assessment of the GC correction.
`bins` | A `binned.data` object with meta-data column 'GC'. If this is specified, `GC.BSgenome` is ignored. Beware, no format checking is done.

### Details

Two methods are available for GC correction: Option `method='quadratic'` uses the method described in the Supplementary of `citation("AneuFinder")`. Option `method='loess'` uses a loess fit to adjust the read count.

### Value

A `list()` with `binned.data` objects with adjusted read counts. Alternatively a `list()` with `ggplot` objects if `return.plot=TRUE`.

### Author(s)

Aaron Taudt

### Examples

    ## Get a BED file, bin it and run GC correction
    bedfile <- system.file("extdata", "KK150311_VI_07.bam.bed.gz", package="AneuFinderData")
    binned <- binReads(bedfile, assembly='mm10', binsize=1e6,
                      chromosomes=c(1:19,'X','Y'))
    plot(binned[[1]], type=1)
    if (require(BSgenome.Mmusculus.UCSC.mm10)) {
     binned.GC <- correctGC(list(binned[[1]]), GC.BSgenome=BSgenome.Mmusculus.UCSC.mm10)
     plot(binned.GC[[1]], type=1)
    }

[Package AneuFinder version 1.12.1 Index]