prstools
prstools is software to create Polygenic Risk Scores (PRS) directly
from the commandline
(and optionally from inside python).
It makes PRS generation easier, compared to previous tools, by:
- Super fast reading and matching of sumstats (handles odd formats).
- Rapid creation of the model.
- Automatic generation of the PRS Prediction for target plink files.
All the above, for a real GWAS sumstat, within 30 minutes using only 1 command. Installation and running the demo example should not take more than 10 minutes.
We are actively developing prstools and feedback by mail or our
feedback form (with 🏆 lottery)
is much appreciated!
Install
To install use the following command.
pip install -U --prefer-binary prstools
For it to work, you should have python3.8 or later installed (pip is
included in python3.8+). If the command above does not work directly you
can install using conda (or mamba if you have that), by running
conda install "python>=3.9". For other install issues please check the
install
guide
or send us a mail.
How to use
Immediately after installing prstools, it should be possible to
download & run the demo example (~4mb), by pasting the following into
the commandline (if not see install
guide):
# Makes 'example' dir with data in current path:
prstools downloadutil --pattern example --destdir ./; cd example
# Run the model with example data:
prstools prscs2 --ref ldref_1kg_pop --target target \
--sst sumstats.tsv --n_gwas 2565 --out ./result
This will run PRS-CS2 on the example data, using the new implementation
to demonstrate the capabilities of prstools and makes PRS predictions
for the example dataset. The best and fastest way to get a PRS for your
is to try the Tutorial below.
There is also the prstools
documentation, which resides inside of the command-line interface, which
you can see by typing prstools.
Usage:
prstools <command> ...
Convenient and powerfull Polygenic Risk Score creation.
'prst' is a commandline shorthand for 'prstools'
Models & Utility Commands:
<command>
downloadutil Download and unpack LD reference panels and other data.
combine A tool to combine genetics-related text files.
prscs2 PRS-CS v2: A polygenic prediction method that infers posterior SNP effect sizes
under continuous shrinkage (CS) priors.
By combining prstools with another <command> a specific model or
other functionality can be used.
Forinstance typing
prstools prscs2 will output the documentation for the prscs2
subcommand:
Usage:
prstools prscs2 [-h --cpus <number-of-cpus>] --ref <dir/refcode> --target <bim-prefix>
--sst <file> --out <dir+prefix> [--n_gwas <num> --chrom <chroms>]
[--colmap <alternative_colnames> --pred --n_iter <n_iter>]
[--n_burnin <n_burnin> --n_slice <n_slice> --seed <seed> --a <a>]
[--b <b> --phi <phi> --clip <clip> --sampler <sampler>]
PRS-CS v2: A polygenic prediction method that infers posterior SNP effect sizes under continuous shrinkage (CS) priors.
General Options:
-h, --help Show this help message and exit.
-c, --cpus <number-of-cpus> The number of cpus to use. Generally most efficient if
chosen to be between 1 and 5. Functionality can be
... [omitted for readability] ...
--clip <clip> Clip parameter. The default works best in pretty much
all cases. (default: 1.0)
--sampler <sampler> Sampler algorithm. Rue sampling is the original sampler,
which gives good results. (default: Rue)
Examples --> can be directly copy-pasted (:
prst downloadutil --pattern example --destdir ./; cd example # Makes 'example' dir in current path.
prstools prscs2 --ref ldref_1kg_pop --target target --sst sumstats.tsv --n_gwas 2565 --out ./result-prscs2 # Run the model with example data.
prst prscs2 -r ldref_1kg_pop -t target -s sumstats.tsv -n 2565 -o ./result-prscs2 --pred # A shorter version of previous that also does the predictions.
As can be seen, there are examples at the end of the help output to
illustrate usage, which should work with a simple copy-paste. There is
now also an online version of all this documentation
(https://prstools.readthedocs.io/).
Tutorial + Video
For more information and a hands on demonstration of what prstools can
do have a look at the Getting Started
Tutorial.
There is also a Video. The
tutorial+video is a tiny bit older than the current prstools version,
which has more functionality. You can load the tutorial in a free cloud
instance by clicking here: .
Contact
For questions and support please send a mail (menno.j.witteveen@gmail.com).
Metadata
Release files for prstools 0.0.75
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| prstools-0.0.75.tar.gz | 2.0 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| prstools-0.0.75-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.0 MB
Release files / prstools-0.0.75.tar.gz
| Download URL | prstools-0.0.75.tar.gz |
|---|---|
| Size | 2.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
14d63da83ea4ae59b23846f7da2d0e3f85c3040464a92274389965841db7443a
|
|
BLAKE2b-256 checksum How to use checksums |
bd1c4aa89bf7742fbad440fb5e43f3ef396bf161f147942eba10fd40885643eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.4
|
Release files / prstools-0.0.75-py3-none-any.whl
| Download URL | prstools-0.0.75-py3-none-any.whl |
|---|---|
| Size | 2.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd1a3aa94068d1bcb9fb6b6c349050a2a33236fd526060ac7d50e53e90050629
|
|
BLAKE2b-256 checksum How to use checksums |
5acbdf3c6a32045ac613755b1410fb86271a072c7cbec8f9b7e2413729db40b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.4
|