Library and command line scripts for inferring identity-by-descent (IBD) segments shared between siblings, imputing missing parental genotypes, and for performing family based genome-wide association and polygenic score analyses.
Project description
snipar
snipar (single nucleotide imputation of parents) is a python library for inferring identity-by-descent (IBD) segments shared between siblings, imputing missing parental genotypes from observed genotypes and IBD segments in a nuclear family, and for performing family based genome-wide association and polygenic score analyses using observed and/or imputed parental genotypes.
Main features:
Infer identity-by-descent segments shared between siblings (ibd.py).
Impute missing parental genotypes given the observed genotypes in a nuclear family (impute.py).
Perform family based GWAS using observed and imputed parental genotypes (gwas.py).
Compute polygenic scores for probands, siblings, and parents from SNP weights using observed/imputed parental genotypes, and perform family based analysis of polygenic scores (pgs.py script).
Compute genome-wide correlations between different effects estimated by gwas.py (correlate.py).
Documentation
It is recommended to work through the tutorial: https://snipar.readthedocs.io/en/latest/tutorial.html.
Installing Using Pip
snipar currently supports Python 3.7 and 3.8 on Linux, Windows, and Mac OSX. We recommend using a python distribution such as Anaconda 3 (https://store.continuum.io/cshop/anaconda/).
The easiest way to install is using pip:
pip install snipar
Sometimes this may not work because the pip in the system is outdated. You can upgrade your pip using:
pip install --upgrade pip
Virtual Environment
You may encounter problems with the installation due to Python version incompatability or package conflicts with your existing Python environment. To overcome this, you can try installing in a virtual environment. In a bash shell, this could be done by using the following commands in your directory of choice:
python -m venv path-to-where-you-want-the-virtual-environment-to-be
You can activate and use the environment using
source path-to-where-you-want-the-virtual-environment-to-be/bin/activate
If your Python version is not supported (for example, you have Anaconda Python 3.9) you can create a Python 3.7 or 3.8 environment in conda:
conda create --name py3x python=3.x
where x=7 or 8 for Python 3.7 and 3.8. This environment can be activatated by the command:
conda activate py3x
Installing From Source
To install from source, clone the git repository, and in the directory containing the snipar source code, at the shell type:
pip install .
Running tests
To check that the code is working properly and that the C modules have been compiled, you should run tests. To run the tests, after the installation run this command:
python -m unittest snipar.tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for snipar-0.0.7-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29cd7e0f6c814c5f0cc24b3935347d08fee5521d13413820ab70d77e2390dc68 |
|
MD5 | b7fdecc8542182b01b18cdc9031773f8 |
|
BLAKE2b-256 | 38b38f56743bcc71f299ff491ee0316696e407a4b43baffda04d67f48cda0fa1 |
Hashes for snipar-0.0.7-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81ae85181d03eac3a46ae3beee3c927518f597b534a9e01b4fe9b0b2e10abcaa |
|
MD5 | 736557e0903dcea86280f3fcd3b47346 |
|
BLAKE2b-256 | a13b254adccdc9da014531cc6414348fbe491dc574e5e709551fe2227101a2a7 |
Hashes for snipar-0.0.7-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f4aed99f41e1789487442ee7947648394bfe580aa24f120d03280be7b9e9f4d |
|
MD5 | 4bf586a69919819fa3dc3f46ade9a2f8 |
|
BLAKE2b-256 | 0b49ac9fe185d84033c34696eaefe50bc1a6f9b21047cce7e579c711f69f82ca |
Hashes for snipar-0.0.7-cp39-cp39-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bbfa31558fe4199346f60e4d9909d36604fccb458a4f2430db2c8cbef15794d |
|
MD5 | e8737b42b7b175fdfff7a50a69dea837 |
|
BLAKE2b-256 | 53c87f190d504e68e4e851841ff66f0c11a558125fc505036332bb2427343652 |
Hashes for snipar-0.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8baa8fe2d944e9a686ea1a26f3250606e4a8a05193290c50537e3fc1c83fa99a |
|
MD5 | de520e65635e372be09c5bf68212e4fd |
|
BLAKE2b-256 | 8b5ae39bea435dcda1aec7128e71b3fa3bacdf03c5010e0c6848e80cdeba700d |
Hashes for snipar-0.0.7-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2566afaf2ed6015eeb22af0aaa3d97a57a464dfb27b3867dd27ee03e2561fd1 |
|
MD5 | 36dfd762adb76ece04085917ea7226fe |
|
BLAKE2b-256 | 7a1db0ac2fc878e0c88e6d2115f425de83a4a68c5f97e7f270525fe05332d981 |
Hashes for snipar-0.0.7-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15ad575d716b3a1cb0c16e1afcd7d6a6b41c7c9927d6f172ec3118a5e98ab191 |
|
MD5 | 145460c13d47c7ecbeffb7ecc490e48c |
|
BLAKE2b-256 | 86747b64495232792ea54d165b992ebd84fbbf9d82e2b5a69292ca476e939d66 |
Hashes for snipar-0.0.7-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01091e208ff2153eb74d5d72a630c393962b1461b3538da7cea1a750e556d273 |
|
MD5 | 70a4f6af31ed0202bbb0e52d09281e30 |
|
BLAKE2b-256 | 5a9727441ac28b9797c259e99db68c92e33a8387105442b39a00bfb62bc3beb8 |
Hashes for snipar-0.0.7-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7f5bb67a50488455f663fdcbfd75a54d9ab4c4e5c88a11d5ef6edb38b6e2c54 |
|
MD5 | 26f6390c6211ac47b022c5516c690369 |
|
BLAKE2b-256 | 143a7c974d16a3513a8b7773efa58fb09cf3cc4c0414de42f6db7988d1415309 |
Hashes for snipar-0.0.7-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0733381b828b03954ed4ac5c5938328fb722b74514f0bb9542996fca518ef02 |
|
MD5 | 08a45996fcbf4e7376e9a8a08f438e21 |
|
BLAKE2b-256 | 9841959f7801e6f6b9faebb472daf9187cb7293ebd0e8e8da9483af8f7af851a |
Hashes for snipar-0.0.7-cp38-cp38-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6de04a80aa10aef3aa82cb50b1c4204f3ec85efb07b4b098dad30846a0199a4 |
|
MD5 | a00fc93cf50114e9148eafaed658af0f |
|
BLAKE2b-256 | 0b2359e865e521695cdda6504d6e4108dc5ffbd21c08bb74d6990912d036fd9f |
Hashes for snipar-0.0.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b5bb69efb4124a0a19eece737b305e1d1f7f4a99dddaa587b1890cfd2e2b959 |
|
MD5 | f1720a4ebed173105bfe828a27326a7c |
|
BLAKE2b-256 | 8994d7f5f131785c9eb71be4b1b53c4f51322d838146a881a9e9df8efdb3a358 |
Hashes for snipar-0.0.7-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af01ca6c6ef14c22d97909c149127240b44d1758df32d2315e7e7d3c4399a632 |
|
MD5 | e4cfffce5577362cbd49143b9f32cd3a |
|
BLAKE2b-256 | 95310b94af3e2a72a925e1d6426297f3884a5415875c4aba170b3ebc0023e26f |
Hashes for snipar-0.0.7-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c93b62d1219b49f550a2e66230a7c43261779f873197ed169d4127f173a29ea |
|
MD5 | 436a4d0166cbae7de9e88f53b7037904 |
|
BLAKE2b-256 | 70c211a4bd6cc2941f53970a68f9c3fb6e4db3c3883dc08c0d2bff2cd0d3dcf9 |