Type: | Package |
Title: | Latent Interaction Testing for Genome-Wide Studies |
Version: | 1.0.0 |
Maintainer: | Andrew Bass <ajbass@emory.edu> |
Description: | Identifying latent genetic interactions in genome-wide association studies using the Latent Interaction Testing (LIT) framework. LIT is a flexible kernel-based approach that leverages information across multiple traits to detect latent genetic interactions without specifying or observing the interacting variable (e.g., environment). LIT accepts standard PLINK files as inputs to analyze large genome-wide association studies. |
URL: | https://github.com/ajbass/lit |
License: | LGPL-2 | LGPL-2.1 | LGPL-3 [expanded from: LGPL] |
Encoding: | UTF-8 |
VignetteBuilder: | knitr |
RoxygenNote: | 7.2.3 |
LinkingTo: | Rcpp, RcppArmadillo, RcppEigen |
Imports: | Rcpp (≥ 1.0.11), genio, CompQuadForm |
Suggests: | testthat (≥ 3.0.0), knitr, rmarkdown |
NeedsCompilation: | yes |
Packaged: | 2023-08-12 18:45:11 UTC; ajbass |
Author: | Andrew Bass [aut, cre], Michael Epstein [aut] |
Repository: | CRAN |
Date/Publication: | 2023-08-15 10:10:02 UTC |
GAMuT
Description
The GAMuT
function is a kernel-based multivariate association test.
Note that our code to process plink files builds from the
genio
R package.
Usage
gamut_plink(y, file, adjustment = NULL, pop_struct = NULL, verbose = TRUE)
Arguments
y |
matrix of traits (n observations by k traits) |
file |
path to plink files |
adjustment |
matrix of covariates to adjust traits |
pop_struct |
matrix of PCs that captures population structure |
verbose |
If TRUE (default) print progress. |
Value
A data frame of p-values where the columns are the cross products/squared residuals and the rows are SNPs.
See Also
Examples
# set seed
set.seed(123)
# path to plink files
file <- system.file("extdata", 'sample.bed', package = "genio", mustWork = TRUE)
# Generate trait expression
Y <- matrix(rnorm(10*4), ncol = 4)
out <- gamut_plink(Y, file = file)
Latent Interaction Testing
Description
lit
performs a kernel-based testing procedure, Latent Interaction Testing (LIT), using a set of traits and SNPs.
LIT tests whether the squared residuals (SQ) and cross products (CP) are statistically independent of the genotypes.
In particular, we construct a kernel matrix for the SQ/CP terms to measure the pairwise
similarity between individuals, and also construct an analogous one for the genotypes.
We then test whether these two matrices are independent.
Currently, we implement the linear and projection kernel functions to measure pairwise similarity between individuals.
We then combine the p-values of these implementations using a Cauchy combination test to maximize the number of discoveries.
Usage
lit(y, x, adjustment = NULL, pop_struct = NULL)
Arguments
y |
matrix of traits (n observations by k traits) |
x |
matrix of SNPs (n observations by m SNPs) |
adjustment |
matrix of covariates to adjust traits |
pop_struct |
matrix of PCs that captures population structure |
Value
A data frame of p-values where the columns are
wlit
: LIT using a linear kernelulit
: LIT using a projection kernelalit
: Cauchy combination test of the above two LIT implementations.
See Also
Examples
# set seed
set.seed(123)
# Generate SNPs and traits
X <- matrix(rbinom(10*2, size = 2, prob = 0.25), ncol = 2)
Y <- matrix(rnorm(10*4), ncol = 4)
out <- lit(Y, X)
LIT correcting for dominance effects
Description
Internal use for now
Usage
lit_h(y, x, adjustment = NULL, pop_struct = NULL)
Arguments
y |
matrix of traits (n observations by k traits) |
x |
matrix of SNPs (n observations by m SNPs) |
adjustment |
matrix of covariates to adjust traits |
pop_struct |
matrix of PCs that captures population structure |
Latent Interaction Testing
Description
lit_plink
performs a kernel-based testing procedure, Latent Interaction Testing (LIT), using a set of traits and SNPs.
LIT tests whether the squared residuals (SQ) and cross products (CP) are statistically independent of the genotypes.
In particular, we construct a kernel matrix for the SQ/CP terms to measure the pairwise
similarity between individuals, and also construct an analogous one for the genotypes.
We then test whether these two matrices are independent.
Currently, we implement the linear and projection kernel functions to measure pairwise similarity between individuals.
We then combine the p-values of these implementations using a Cauchy combination test to maximize the number of discoveries.
This function is suitable for large datasets (e.g., UK Biobank) in plink format.
Note that our code to process plink files builds from the
genio
R package
Usage
lit_plink(y, file, adjustment = NULL, pop_struct = NULL, verbose = TRUE)
Arguments
y |
matrix of traits (n observations by k traits) |
file |
path to plink files |
adjustment |
matrix of covariates to adjust traits |
pop_struct |
matrix of PCs that captures population structure |
verbose |
If TRUE (default) print progress. |
Value
A data frame of p-values where the columns are
wlit
: LIT using a linear kernelulit
: LIT using a projection kernelalit
: Cauchy combination test of the above two LIT implementations.
See Also
Examples
# set seed
set.seed(123)
# path to plink files
file <- system.file("extdata", 'sample.bed', package = "genio", mustWork = TRUE)
# Generate trait expression
Y <- matrix(rnorm(10*4), ncol = 4)
out <- lit_plink(Y, file = file)
Marginal (SQ/CP) approach
Description
The marginal
function performs a trait-by-trait univariate test for latent interactions
using the squared residuals and cross products.
Usage
marginal(y, x, adjustment = NULL, pop_struct = NULL)
Arguments
y |
matrix of traits (n observations by k traits) |
x |
matrix of SNPs (n observations by m SNPs) |
adjustment |
matrix of covariates to adjust traits |
pop_struct |
matrix of PCs that captures population structure |
Value
A data frame of p-values where the columns are the cross products/squared residuals and the rows are SNPs.
See Also
Examples
# set seed
set.seed(123)
# Generate SNPs and traits
X <- matrix(rbinom(10*2, size = 2, prob = 0.25), ncol = 2)
Y <- matrix(rnorm(10*4), ncol = 4)
out <- marginal(Y, X)
Marginal (SQ/CP) approach
Description
The marginal_plink
function performs a trait-by-trait univariate test for latent interactions
using the squared residuals and cross products. This function is suitable for large
datasets (e.g., UK Biobank) in plink format. Note that our code to process plink files builds from the
genio
R package.
Usage
marginal_plink(y, file, adjustment = NULL, pop_struct = NULL, verbose = TRUE)
Arguments
y |
matrix of traits (n observations by k traits) |
file |
path to plink files |
adjustment |
matrix of covariates to adjust traits |
pop_struct |
matrix of PCs that captures population structure |
verbose |
If TRUE (default) print progress. |
Value
A data frame of p-values where the columns are the cross products/squared residuals and the rows are SNPs.
See Also
Examples
# set seed
set.seed(123)
# Path to plink files
file <- system.file("extdata", 'sample.bed', package = "genio", mustWork = TRUE)
# Generate trait expression
Y <- matrix(rnorm(10*4), ncol = 4)
out <- marginal_plink(Y, file = file)