lit

Identifying latent genetic interactions in genome-wide association studies using multiple traits

https://github.com/ajbass/lit

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.2%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Identifying latent genetic interactions in genome-wide association studies using multiple traits

Basic Info
  • Host: GitHub
  • Owner: ajbass
  • License: gpl-3.0
  • Language: C++
  • Default Branch: main
  • Homepage:
  • Size: 68.4 KB
Statistics
  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Created almost 3 years ago · Last pushed 11 months ago
Metadata Files
Readme Changelog License

README.Rmd

---
output: github_document
---

```{r setup, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  message = FALSE,
  warning = FALSE,
  out.width = "100%"
)
```

# lit



[![R-CMD-check](https://github.com/ajbass/lit/actions/workflows/R-CMD-check.yml/badge.svg)](https://github.com/ajbass/lit/actions/workflows/R-CMD-check.yml) [![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/lit)](https://cran.r-project.org/package=lit)



## 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. Genome Medicine; 2024.

## Installation

This software is implemented in the `R` statistical programming language. To install the release version, type the following in the `R` terminal:

```{r, eval = FALSE}
# release version
install.packages("lit")
```

The development version of `lit` can be installed using the following code:

```{r, eval = FALSE}
# install devtools
install.packages("devtools")
devtools::install_github("ajbass/lit")
```

The vignette can be viewed by typing:

``` r
browseVignettes(package = "lit")
```

If you run into issues with `gfortran` on Mac, see the answer [here](https://stackoverflow.com/questions/69639782/installing-gfortran-on-macbook-with-apple-m1-chip-for-use-in-r) for additional details.

## Quick start

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

```{r}
library(lit)
# set seed
set.seed(123)

# generate 10 SNPs for 10 individuals
X <- matrix(rbinom(10 * 10, size = 2, prob = 0.25), ncol = 10)

# generate 4 phenotypes for 10 individuals
Y <- matrix(rnorm(10 * 4), ncol = 4) 

# test for latent genetic interactions
out <- lit(Y, X)
head(out)
```

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: 

- `wlit` uses a linear kernel to measure pairwise similarity for the genotype and trait matrices
- `ulit` uses a projection kernel to measure pairwise similarity for the genotype and trait matrices
- `alit` combines the p-values of `wlit` and `ulit` using a Cauchy combination test to maximize the number of discoveries

For large GWAS datasets (e.g., biobank-sized), the `lit()` function is not computationally feasible because the genotypes cannot be loaded in `R`. 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:

```{r}
# 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)
```

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:

```{r, eval = FALSE}
# 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)
```


```{=html}

```

Owner

  • Name: Andrew Bass
  • Login: ajbass
  • Kind: user
  • Location: Princeton, NJ

Post-doc, PhD @StoreyLab

GitHub Events

Total
  • Push event: 3
Last Year
  • Push event: 3

Packages

  • Total packages: 1
  • Total downloads:
    • cran 271 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
  • Total maintainers: 1
cran.r-project.org: lit

Latent Interaction Testing for Genome-Wide Studies

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 271 Last month
Rankings
Forks count: 28.4%
Dependent packages count: 28.6%
Stargazers count: 31.5%
Dependent repos count: 36.9%
Average: 42.8%
Downloads: 88.3%
Maintainers (1)
Last synced: 10 months ago