butterFilter: Low pass filter on ratios by butterworth filter

Description Usage Arguments Value Examples

View source: R/butterFilter.R

Description

The Butterworth filter is a type of signal processing filter designed to have as flat a frequency response as possible in the passband.

Usage

1
butterFilter(ratios, N = ceiling(length(ratios)/200))

Arguments

ratios

A vector of numeric. It is log2-transformed ratios, CPMRatios or OddRatios in each window.

N

numeric(1) or integer(1). Critical frequencies of the low pass filter will be set as 1/N. 1/N is a cutoff at 1/N-th of the Nyquist frequency. By default, it is suppose there are about 200 peaks in the inputs.

Value

A vector of numeric with same length of input ratios. The vector indicates smoothed ratios.

Examples

1
2
ratios <- runif(20000)
butterFilter(ratios)

LihuaJulieZhu/NADfinder documentation built on May 17, 2019, 6:21 p.m.