Skip to contents

:ocal regression (wrapper for locfit) to predict a tricube smoothed version of the statistic supplied for each SNP. This works as a weighted average across neighboring SNPs that accounts for Linkage disequilibrium (LD) while minizing noise attributed to SNP calling errors. Values for neighboring SNPs within the window are weighted by physical distance from the focal SNP.

Usage

tricubeStat_local(POS, Stat, windowSize = 2e+06)

Arguments

POS

A vector of genomic positions for each SNP

Stat

A vector of values for a given statistic for each SNP

windowSize

the window size (in base pairs) bracketing each SNP for which to calculate the statitics. Magwene et. al recommend a window size of ~25 cM, but also recommend optionally trying several window sizes to test if peaks are over- or undersmoothed. Default: 2e+06

Value

Returns a vector of the weighted statistic caluculted with a tricube smoothing kernel

Details

DETAILS

Note

example from QTLSeqR: df_filt_4mb$Gprime <- tricubeStat(POS, Stat = GStat, WinSize = 4e6)

See also

getG for G statistic calculation

locfit for local regression