MyNixOS website logo
Description

Latent Interaction Testing for Genome-Wide Studies.

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.

Latent Interaction Testing (LIT)

R-CMD-check

Overview

The lit package implements a kernel-based multivariate testing procedure, called Latent Interaction Testing (LIT), to test for latent genetic interactions in genome-wide association studies. See our manuscript for additional details:

Bass AJ, Bian S, Wingo AP, Wingo TS, Culter DJ, Epstein MP. Identifying latent genetic interactions in genome-wide association studies using multiple traits. Submitted; 2023.

Installation

install.packages("devtools")
library("devtools")
# install package
devtools::install_github("ajbass/lit")

The vignette can be viewed by typing:

browseVignettes(package = "lit")

Quick start

We provide two ways to use the lit package. For small GWAS datasets where the genotypes can be loaded in R, the lit() function can be used:

library(lit)
# set seed
set.seed(123)

# generate SNPs and traits
X <- matrix(rbinom(10 * 10, size = 2, prob = 0.25), ncol = 10)
Y <- matrix(rnorm(10 * 4), ncol = 4)

# test for latent genetic interactions
out <- lit(Y, X)
head(out)
#>        wlit      ulit      alit
#> 1 0.2681410 0.3504852 0.3056363
#> 2 0.7773637 0.3504852 0.6044655
#> 3 0.4034423 0.3504852 0.3760632
#> 4 0.7874949 0.3504852 0.6157108
#> 5 0.8701189 0.3504852 0.7337565
#> 6 0.2352616 0.3504852 0.2847600

The output is a data frame of p-values where the rows are SNPs and the columns are different implementations of LIT to test for latent genetic interactions: the first column (wlit) uses a linear kernel, the second column (ulit) uses a projection kernel, and the third column (alit) maximizes the number of discoveries by combining the p-values of the linear and projection kernels.

For large GWAS datasets (e.g., biobank-sized), the lit() function is not computationally feasible. Instead, the lit_plink() function can be applied directly to plink files. To demonstrate how to use the function, we use the example plink files from the genio package:

# load genio package
library(genio)

# path to plink files
file <- system.file("extdata", 'sample.bed', package = "genio", mustWork = TRUE)

# generate trait expression
Y <- matrix(rnorm(10 * 4), ncol = 4)

# apply lit to plink file
out <- lit_plink(Y, file = file, verbose = FALSE)
head(out)
#>   chr         id     pos alt ref       maf      wlit      ulit      alit
#> 1   1  rs3094315  752566   G   A 0.3888889 0.7908763 0.3422960 0.6150572
#> 2   1  rs7419119  842013   T   G 0.3888889 0.1552580 0.3422960 0.2194972
#> 3   1 rs13302957  891021   G   A 0.2500000 0.4088937 0.3325939 0.3687589
#> 4   1  rs6696609  903426   C   T 0.3125000 0.5857829 0.3325939 0.4519475
#> 5   1     rs8997  949654   A   G 0.4375000 0.6628300 0.3325939 0.4969663
#> 6   1  rs9442372 1018704   A   G 0.2500000 0.3192430 0.3325939 0.3258332

See ?lit and ?lit_plink for additional details and input arguments.

Note that a marginal testing procedure for latent genetic interactions based on the squared residuals and cross products (Marginal (SQ/CP)) can also be implemented using the marginal and marginal_plink functions:

# apply Marginal (SQ/CP) to loaded genotypes
out <- marginal(Y, X)

# apply Marginal (SQ/CP) to plink file
out <- marginal_plink(Y, file = file, verbose = FALSE)
Metadata

Version

1.0.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows