correctCoverageBias {PureCN} | R Documentation

## Correct for library-specific coverage biases

### Description

Takes as input coverage data and a mapping file for GC content and optionally replication timing. Will then normalize coverage data for GC-bias. Plots the pre and post normalization GC profiles.

### Usage

    correctCoverageBias(
      coverage.file,
      interval.file,
      output.file = NULL,
      plot.bias = FALSE,
      plot.max.density = 50000,
      output.qc.file = NULL
    )

### Arguments

`coverage.file` | Coverage file or coverage data parsed with the `readCoverageFile` function.
`interval.file` | File providing GC content for each exon in the coverage files. First column in format CHR:START-END. Additional optional columns provide gene symbols, mappability and replication timing. This file is generated with the `preprocessIntervals` function.
`output.file` | Optionally, write file with GC corrected coverage. Can be read with the `readCoverageFile` function.
`plot.bias` | Optionally, plot profiles of the pre-normalized and post-normalized coverage. Provides a quick visual check of coverage bias.
`plot.max.density` | By default, if the number of intervals in the probe-set is > 50000, uses a kernel density estimate to plot the coverage distribution. This uses the `stat_density` function from the ggplot2 package. Using this parameter, change the threshold at which density estimation is applied. If the `plot.bias` parameter is set as `FALSE`, this will be ignored.
`output.qc.file` | Write miscellaneous coverage QC metrics to file.

### Author(s)

Angad Singh, Markus Riester

### See Also

`preprocessIntervals`

### Examples

    normal.coverage.file <- system.file("extdata", "example_normal.txt",
        package="PureCN")
    interval.file <- system.file("extdata", "example_intervals.txt",
        package="PureCN")
    coverage <- correctCoverageBias(normal.coverage.file, interval.file)

[Package PureCN version 1.22.2 Index]