Movatterモバイル変換


[0]ホーム

URL:


lit

R-CMD-checkCRAN_Status_Badge

Overview

Thelit package implements a kernel-based multivariatetesting procedure, called Latent Interaction Testing (LIT), to test forlatent genetic interactions in genome-wide association studies. See ourmanuscript for additional details:

Bass AJ, Bian S, Wingo AP, Wingo TS, Culter DJ, Epstein MP.Identifying latent genetic interactions in genome-wide associationstudies using multiple traits. Genome Medicine; 2024.

Installation

This software is implemented in theR statisticalprogramming language. To install the release version, type the followingin theR terminal:

# release versioninstall.packages("lit")

The development version oflit can be installed usingthe following code:

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

The vignette can be viewed by typing:

browseVignettes(package ="lit")

If you run into issues withgfortran on Mac, see theanswerherefor additional details.

Quick start

We provide two ways to use thelit package. When thegenotypes can be loaded in R (small GWAS datasets), thelit() function can be used:

library(lit)# set seedset.seed(123)# generate 10 SNPs for 10 individualsX<-matrix(rbinom(10*10,size =2,prob =0.25),ncol =10)# generate 4 phenotypes for 10 individualsY<-matrix(rnorm(10*4),ncol =4)# test for latent genetic interactionsout<-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 andthe columns are different implementations of LIT to test for latentgenetic interactions:

For large GWAS datasets (e.g., biobank-sized), thelit()function is not computationally feasible because the genotypes cannot beloaded inR. Instead, thelit_plink() functioncan be applied directly to plink files. To demonstrate how to use thefunction, we use the example plink files from thegeniopackage:

# load genio packagelibrary(genio)# path to plink filesfile<-system.file("extdata",'sample.bed',package ="genio",mustWork =TRUE)# generate trait expressionY<-matrix(rnorm(10*4),ncol =4)# apply lit to plink fileout<-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 additionaldetails and input arguments.

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

# apply Marginal (SQ/CP) to loaded genotypesout<-marginal(Y, X)# apply Marginal (SQ/CP) to plink fileout<-marginal_plink(Y,file = file,verbose =FALSE)

[8]ページ先頭

©2009-2025 Movatter.jp