correctGC: GC correction

Description Usage Arguments Details Value Author(s) Examples

View source: R/correctionMethods.R

Description

Correct a list of binned.data by GC content.

Usage

1
2
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

1
2
3
4
5
6
7
8
9
## 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)
}

AneuFinder documentation built on Nov. 8, 2020, 7:44 p.m.