|
a |
|
b/README.md |
|
|
1 |
# shaprs |
|
|
2 |
ShaPRS: Leveraging shared genetic effects across traits and ancestries improves accuracy of polygenic scores |
|
|
3 |
|
|
|
4 |
Installation: |
|
|
5 |
|
|
|
6 |
``` R |
|
|
7 |
install_github("mkelcb/shaprs") |
|
|
8 |
library("shaPRS") |
|
|
9 |
``` |
|
|
10 |
|
|
|
11 |
## To find the shaPRS weighted meta-analysis of a proximal and adjunct data, simply run: |
|
|
12 |
``` R |
|
|
13 |
proximalLoc <- system.file("extdata", "phenoA_sumstats", package = "shaPRS") |
|
|
14 |
adjunctLoc <- system.file("extdata", "phenoB_sumstats", package = "shaPRS") |
|
|
15 |
shaPRS(proximalLoc, adjunctLoc, "<YOUR_OUTPUT_FOLDER>") |
|
|
16 |
``` |
|
|
17 |
- This will output your final summary statistics file with the postfix "_shaprs" that you may use in your favourite PRS generation tool. |
|
|
18 |
- 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). |
|
|
19 |
|
|
|
20 |
|
|
|
21 |
## Blend LD ref matrices (cross-ancestry analysis): |
|
|
22 |
|
|
|
23 |
``` R |
|
|
24 |
Pop1LDRefLoc <- paste0(system.file("extdata", "", package = "shaPRS"), "/") |
|
|
25 |
Pop2LDRefLoc <- paste0(system.file("extdata", "", package = "shaPRS"), "/") |
|
|
26 |
blendFactorLoc <- system.file("extdata", "pop_SNP_lFDR", package = "shaPRS") |
|
|
27 |
adjustinputLoc <- system.file("extdata", "pop_adjustinput", package = "shaPRS") |
|
|
28 |
outputLoc <- "<YOUR LOCATION>" |
|
|
29 |
shaPRS_LDGen(Pop1LDRefLoc, Pop2LDRefLoc, blendFactorLoc, adjustinputLoc, outputLoc) |
|
|
30 |
``` |
|
|
31 |
|
|
|
32 |
- 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. |
|
|
33 |
- 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"). |
|
|
34 |
- The output data in the results folder (<YOUR LOCATION>), can then be used by LDpred2, processed by the same scripts that you have been using on the standard LD-ref matrices. |