FWT: Perform a wavelet transform.

Description Usage Arguments Value

View source: R/WaveQTL_preprocess_funcs.R

Description

This function performs a wavelet transform using a wavethresh R package and returns WCs in the order that corresponds to output from the function fiter.WCs. For now, the function doesn't allow users to specify the level of wavelet decomposition and uses the maximum level decomposition.

Usage

1
FWT(Data, filter.number = 1, family = "DaubExPhase")

Arguments

Data

matrix (or a vector when N = 1) with N (# of samples) by T (# of bps in a region); This matrix contains original data to be decomposed; Here, T should be a power of 2.

filter.number

default=1; argument to the function wd in the R package wavethresh; See their manual for details.

family

default="DaubExPhase"; argument to the function wd in the R package wavethresh; See their manual for details.

Value

WCs a matrix with N (# of samples) by T (# of bps in a region); n-th row contains WCs for n-th sample; WCs are ordered from low resolution WC to high resolution WC; For example, with a Haar wavelet transform, the first column contains WC (precisely speaking, scaling coefficient) that corresponds to sum of data in the region. The second column contains WC that contrasts the data in the first half vs second half of the region. The last column contains WC that contrasts the data in the (T-1)-th bp vs T-th bp.


jean997/cfdrSims documentation built on May 18, 2019, 11:43 p.m.