Skip to content

Statistical genetic tool to infer common variants pleiotropy, using GWAS summary statistics

License

Notifications You must be signed in to change notification settings

martintnr/PRISM

Repository files navigation

PRISM: Pleiotropic Relationships to Infer the SNP Model

Principle of PRISM

PRISM PRISM takes as input GWAS summary statistics of multiple traits and outputs significant labeled variant-trait effects. Further information can be found in our pre-print.

Results visualization

You can visualize PRISM results and the causal network of any variant on our Shiny visualization tool. The app can be launched locally from R using the following command:

shiny::runGitHub(repo = "martintnr/PRISMApp", subdir = "")

Installation

To install the current version of PRISM, which should take a few minutes:

  if(!"devtools" %in% installed.packages()[, "Package"]) {
  install.packages("devtools") }

  if(!"PRISM" %in% installed.packages()[, "Package"]) {
  devtools::install_github("martintnr/PRISM") }

PRISM has been tested on Linux: Ubuntu 22.04.4 LTS and macOS: Sonoma 14.5

Example

This is a basic example to obtain labels from simulated GWAS summary statistics.
Parameters obtained from LHC-MR, LDscores of all variants, and simulated GWAS standardized effect sizes are already included.
You should specify the NbCores parameters if your computer can handle parallel computations.

library(data.table)
library(dplyr)
library(stats)
library(stringr)
library(parallel)
library(matrixStats)
library(PRISM)


if(!grepl("PRISM_example", getwd(), fixed = TRUE)){
if(!file.exists("PRISM_example/")){system("mkdir PRISM_example")}
setwd("PRISM_example")}

Prepare_example_data(gzip = T)

ParametersTable <- fread("Data/ParametersTable.csv", header = T, sep = ",")
Index <- fread("Data/Index.csv", header = T, sep = ",")

ListofTraits <- unique(c(ParametersTable$X, ParametersTable$Y))

PRISM_main(ListofTraits, ParametersTable, Index , sourceGWAS = "Data/",
              NbCores = 1, gzip = F, keepIntermediateFiles = F)

On a single core, PRISM_main is expected to complete execution within approximately 20 minutes. Upon completion, the Results/ directory will contain, for each trait, a file that includes variants, p-values from PRISM, and pleiotropy annotations.

To visualize a result example graph:

library(ggplot2)

Graph <- Example_graph(ListofTraits, ParametersTable, Trait = "B4")

print(Graph)

To visualize an example network, with Shiny:

library(splitstackshape)
library(visNetwork)
library(shiny)

Network <- Example_network(ListofTraits, ParametersTable, Variant = "1:5341323:G:A")

Using PRISM

To use PRISM on real data, please use this vignette.

About

Statistical genetic tool to infer common variants pleiotropy, using GWAS summary statistics

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages