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.
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 = "")
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
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")
To use PRISM on real data, please use this vignette.