Metadata-Version: 2.1
Name: prstools
Version: 0.0.80
Summary: Convenient and powerfull Polygenic Risk Score creation.
Home-page: https://github.com/mennojw/prstools-release
Author: Menno Witteveen et al.
Author-email: menno102@hotmail.com
License: MIT License
Keywords: PRS PGS polygenic genomics prediction genetics
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas
Requires-Dist: scipy
Requires-Dist: tqdm
Requires-Dist: h5py
Requires-Dist: ipython
Requires-Dist: matplotlib
Requires-Dist: seaborn
Requires-Dist: joblib
Requires-Dist: pyarrow
Requires-Dist: psutil
Requires-Dist: bed-reader<1.0; python_version < "3.9"
Requires-Dist: bed-reader; python_version >= "3.9"
Provides-Extra: dev
Requires-Dist: nbdev; extra == "dev"
Provides-Extra: full
Requires-Dist: mjwt; extra == "full"
Requires-Dist: pysnptools; extra == "full"
Requires-Dist: seaborn; extra == "full"

# prstools


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

`prstools` is software to create Polygenic Risk Scores (PRS) directly
from the commandline. <br>

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](https://forms.gle/TnvNyBX6qDy7Vupn9) (with 🏆 lottery)
is much appreciated!

## Install

To install use the following command.

``` sh
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](https://prstools.readthedocs.io/en/latest/guides/install_guide.html)
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](https://prstools.readthedocs.io/en/latest/guides/install_guide.html)):

``` bash
# 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
case is to try the **Tutorial** below. <br>

There is also the prstools documentation, residing inside of the
command-line interface, which you can see by typing `prstools` or a
subcommand. Forinstance typing `prstools prscs2` will output the
**documentation** for the `prscs2` subcommand:

``` console
Usage:
 prst prscs2 [-h  --cpus <num-of-cpus>] --ref <dir/refcode> --target <bim-prefix>
                   --sst <file> --out <dir+prefix> [--n_gwas <num>  --chrom <chroms>]
                   [ ... [omitted for readability] ... ]

PRS-CS v2: A polygenic prediction method that infers posterior SNP effect sizes under 
continuous shrinkage (CS) priors.

... [omitted for readability] ...

# Examples (get data, run model) --> can be directly copy-pasted (:
prstools downloadutil --pattern example --destdir ./; cd example        
prst prscs2 --ref ldref_1kg_pop -t target -s sumstats.tsv --n_gwas 2565 --out result-prscs2
```

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/>). <br>

## Tutorial + Video

For more information and a hands on demonstration of what prstools can
do have a look at the [Getting Started
Tutorial](https://prstools.readthedocs.io/en/latest/tutorials/getting_started.html).
There is also a [Video](https://youtu.be/BP1zUBFH2l8). 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: [![Google
Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mennojw/prstools-release/blob/main/docs/tutorials/getting_started.ipynb).

## Contact

For questions and support please send a mail
(menno.j.witteveen@gmail.com).
