backgroundCorrection {NADfinder} | R Documentation

## Correct ratios for background

### Description

Correct ratios of read counts per sliding window for background.

### Usage

    backgroundCorrection(ratios, degree = 3, ...)

### Arguments

`ratios` | A vector of numeric. It is log2-transformed ratios, CPMRatios or OddRatios of counts for each window.
`degree` | Degree of polynomial. default 3.
`...` | parameters could be passed to baseline.modpolyfit.

### Details

This function implements the backgound correction methods of algorithm for polynomial fitting. See details via `baseline.modpolyfit`. This function expects the trendency of decreasing of the ratios from 5' end to 3' end.

### Value

A vector of numeric. It is the background corrected log2-transformed ratios, CPMRatios or OddRatios.

### Examples

    x <- runif(200)
    background <- rep(c(20:1)/100, each=10)
    backgroundCorrection(x)

[Package NADfinder version 1.8.1 Index]