GithubHelp home page GithubHelp logo

shaprs's Introduction

shaprs

ShaPRS: Leveraging shared genetic effects across traits and ancestries improves accuracy of polygenic scores

Installation:

install_github("mkelcb/shaprs")
library("shaPRS")

To find the shaPRS weighted meta-analysis of a proximal and adjunct data, simply run:

proximalLoc <- system.file("extdata", "phenoA_sumstats", package = "shaPRS")
adjunctLoc <- system.file("extdata", "phenoB_sumstats", package = "shaPRS")
shaPRS(proximalLoc, adjunctLoc, "<YOUR_OUTPUT_FOLDER>")
  • This will output your final summary statistics file with the postfix "_shaprs" that you may use in your favourite PRS generation tool.
  • The above will also output a few other files that may be of interest: "_meta" (fixed fixed effect meta-analysis) and "_SNP_lFDR" (lFDR estimates and Q-values for each SNP).

Blend LD ref matrices (cross-ancestry analysis):

Pop1LDRefLoc <- paste0(system.file("extdata", "", package = "shaPRS"), "/")
Pop2LDRefLoc <- paste0(system.file("extdata", "", package = "shaPRS"), "/")
blendFactorLoc <- system.file("extdata", "pop_SNP_lFDR", package = "shaPRS")
adjustinputLoc <- system.file("extdata", "pop_adjustinput", package = "shaPRS")
outputLoc <- "<YOUR LOCATION>"
shaPRS_LDGen(Pop1LDRefLoc, Pop2LDRefLoc, blendFactorLoc, adjustinputLoc, outputLoc)
  • This runs the shaPRS cross-ancestry analysis on the included toy dataset and generates the LD-reference panel for the 22 autosomes, along with a map.rds file.
  • To run it on real data, first run the main shaPRS() to generate the "_SNP_lFDR" and "_adjustinput" files (see above) for "blendFactorLoc" and "adjustinputLoc". Finally, specify two LDpred2 formatted LD-reference panels, appropriate to your proximal/adjunct datasets ("Pop1LDRefLoc" and "Pop2LDRefLoc").
  • The output data in the results folder (), can then be used by LDpred2, processed by the same scripts that you have been using on the standard LD-ref matrices.

shaprs's People

Contributors

mkelcb avatar chr1swallace avatar

Stargazers

Chen-Yang Su avatar  avatar Frederick Boehm avatar Mahan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.