testGyriq: testGyriq

Description Usage Arguments Details Value Author(s) References Examples

View source: R/testGyriq.R

Description

Calculates the p-value of the kinship-adjusted SNP-set association test for censored traits

Usage

1
2
3
testGyriq(compResid, G, w, ker = "LIN", asv = NULL, method = "davies",
  starResid = NULL, bsw = NULL, tsw = NULL, pos = NULL, sf = FALSE,
  fileOut = "outGyriq.out")

Arguments

compResid

a nx1 vector containing the completed residuals

G

a nxs matrix containing the set of SNPs. Each row represents a different individual and each column represents a separate SNP. The SNP genotypes should be equal to the number of copies of the minor allele (0, 1 or 2).

w

a sx1 vector of weights for the s SNPs

ker

(default="LIN") Type of kernel matrix: weighted linear ("LIN") or weighted identical-by-state ("IBS")

asv

(default=NULL) Number of approximate eigenvalues to be estimated for the kernel matrix using the implicitly-restarted Lanczos bidiagonalization implemented in the package irlba (Baglama and Reichel, 2005). If the spectral decomposition of the matrix is to be conducted using the R base function eigen, asv can be left as NULL. This argument has no effect if method is not equal to "davies".

method

(default="davies") Procedure used to obtain the p-value of the test. "davies" represents the approximation of Davies (1980), "rspMom" represents the permutation approach based on matching moments described in Lee et al. (2012), and "rspOrd" represents the standard permutation procedure.

starResid

(default=NULL) a Bxn matrix of permuted residuals used to obtain the p-value of the test following a permutation procedure (method based on matching moments or standard permutation method). Each row represents a different permutation sample, and each column represents a different individual. This argument has no effect if method is not equal to "rspOrd" or "rspMom".

bsw

(default=NULL) a vx1 vector containing the lower bounds of the v sliding windows considered for the SNP-set, taking values between 1 and s

tsw

(default=NULL) a vx1 vector containing the upper bounds of the v sliding windows considered for the SNP-set, taking values between 1 and s

pos

(default=NULL) a sx1 vector of SNP positions

sf

(default=FALSE) logical: indicates whether or not cluster computing is used via the package snowfall in order to reduce wall-clock time. Initialisation and loading of the package gyriq on all nodes including master must be called beforehand using the functions sfInit and sfLibrary respectively. See the reference manual of snowfall for details. When cluster computing is used, the p-value for each sliding window is computed on a separate node.

fileOut

(default="outGyriq.out") a string containing the name and path of the output file where the results are printed (used only if lower and upper bounds of sliding windows are also given as input; the file is appended for each sliding window in order to reduce resource wastage)

Details

If the lower and upper bounds of sliding windows are not provided, the test is performed once on the whole SNP-set G. Otherwise, the score statistic and the p-value are computed for each window sequentially.

In each run, the score statistic, which has a quadratic form following a mixture of chi-squared variables, is calculated from the completed vector of residuals and a kernel matrix. The p-value is obtained using a permutation approach based on matching moments described in Lee et al. (2012), a standard permutation procedure or the Davies approximation (Davies, 1980) implemented in the package CompQuadForm (Duchesne and Lafaye De Micheaux, 2010).

Warning: No missing data is allowed for compResid, G, w and starResid.

Value

If the lower and upper bounds of sliding windows are not provided, the function produces a list consisting of:

score

the score statistic of the test

pVal

the p-value

Otherwise, the function produces a data frame where each row represents a sliding window tested. For each window, the following information is provided:

Author(s)

Martin Leclerc <martin.leclerc.5@ulaval.ca> and Lajmi Lakhal Chaieb <lakhal@mat.ulaval.ca>

References

Baglama J, Reichel L. 2005. Augmented implicitly restarted Lanczos bidiagonalization methods. SIAM J Sci Comput 27:19-42.

Davies RB. 1980. The distribution of a linear combination of χ^2 random variables. J R Stat Soc Ser C 29:323-333.

Lee S, Emond MJ, Bamshad MJ et al. 2012. Optimal unified approach for rare-variant association testing with application to small-sample case-control whole-exome sequencing studies. Am J Hum Genet 91:224-237.

Duchesne P, Lafaye De Micheaux P. 2010. Computing the distribution of quadratic forms: further comparisons between the Liu-Tang-Zhang approximation and exact methods. Comput Stat Data Anal 54:858-862.

Lin X, Zhou Q. 2015. coxKM: Cox kernel machine SNP-set association test. R package version 0.3, URL http://www.hsph.harvard.edu/xlin/software.html#coxkm.

Lin X, Cai T, Wu M, Zhou Q, Liu G, Christiani D, Lin X. 2011. Survival kernel machine SNP-set analysis for genome-wide association studies. Genetic Epidemiology 35:620-631.

Cai T, Tonini G, Lin X. 2011. Kernel machine approach to testing the significance of multiple genetic markers for risk prediction. Biometrics 67:975-986.

Examples

1
2
3
4
5
6
data(simGyriq)
for (i in seq_along(simGyriq)) assign(names(simGyriq)[i], simGyriq[[i]])

cr <- genComplResid(U, Delta, Phi, blkID, m=50, X)
testGyriq(cr$compResid, G, w, ker="LIN", asv=NULL, method="davies", 
starResid=NULL, bsw, tsw, pos)

gyriq documentation built on May 2, 2019, 2:39 a.m.