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 package 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 using observed and/or imputed parental genotypes.
The imputation method and the family-based GWAS and polygenic score models are described in Young et al. 2022.
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
Documentation: https://snipar.rtfd.io/
It is recommended to read the guide: https://snipar.rtfd.io/en/latest/guide.html
And to work through the tutorial: https://snipar.rtfd.io/en/latest/tutorial.html
Installing Using pip
snipar currently supports Python 3.7-3.9 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
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 .
Python version incompatibility
snipar does not currently support Python 3.10 or higher due to version incompatibilities of dependencies. To overcome this, create a Python3.9 environment using conda and install using pip in the conda environment:
conda create -n myenv python=3.9
conda activate myenv
pip install snipar
Apple ARM processor machines
There can be difficulties install snipar on Apple ARM processor machines due to lack of available versions of scientific computing software made for these processors' architectures. A workaround for this is to use snipar in a docker (https://docs.docker.com/desktop/install/mac-install/) image. To create an appropriate docker image, use this command in the terminal:
docker run -it amd64/python:3.9.9-slim-buster /bin/bash
Running tests
To check that the code is working properly and that the C modules have been compiled, you can run the tests using 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.16-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 461877c68909fd561913d0654725e220b01d443a3816e955d198d1b4edbb0775 |
|
MD5 | 937f577d0fb20fd3d776dea1a12c3858 |
|
BLAKE2b-256 | 5579bf31a818b9fa55736e93f0a963004f59da1bc08ae42a7bcd0ed90a79eae5 |
Hashes for snipar-0.0.16-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38721cea1f957841c211dfd0646f182c8b257351be4be203f851a7b4167e9663 |
|
MD5 | 2375e530c0f2de9d20f87f0b08c6c7f2 |
|
BLAKE2b-256 | 8dec6bdd5f9d655bb5fce057119bf0e193651e658de542012e800d49e8b380e4 |
Hashes for snipar-0.0.16-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2064ca42bfe5635ee763b6411fc078cae2516dd006e0c3f8f44cf2b699fec5c |
|
MD5 | dc244ae28412807098a716b086b2d7de |
|
BLAKE2b-256 | fbf7ae63aac42b380f22eee3fc17f2097db4d9a7c2bfec3fd8b9e864b611810f |
Hashes for snipar-0.0.16-cp39-cp39-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c10201c06cb5c3a418310db84894132e7a3a98f765e8448591d2e4bcc50664a1 |
|
MD5 | cc03c410c0ca4d742720ab7d86966773 |
|
BLAKE2b-256 | 20e5b9f5002612e73abb3674664da22f113ad3d1529895df706082171e358131 |
Hashes for snipar-0.0.16-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9eed6eeb6bb4375fe4a5594e1ab053ae3f0505876af173b4868cda10ebfdd11f |
|
MD5 | 9d05b0af72bbe3d108334459c236d829 |
|
BLAKE2b-256 | d0f7e265a60a65862dec0addae3dbaa3861916c5ba3c068a298a3bee58e1d773 |
Hashes for snipar-0.0.16-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4af118fb2651c77d49a9af190b36f5585f1c2854c83c15df5a7ac8084cfaa6a |
|
MD5 | b34466073a3a6c803abaf253f7c41e4c |
|
BLAKE2b-256 | e7efb7f3f7fe14396e8ab8253d0c7a73ac4edf16e0cc971a1e8b68d760d40373 |
Hashes for snipar-0.0.16-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d4a088b2be9fe0b0d497f1a228ec5f4ae389ace9ff3cfb38aa3c4a18d9e3df8 |
|
MD5 | a1f3915a6a55f626c172c280cea0a021 |
|
BLAKE2b-256 | 8fc49e5d1dcab74cad2cdc8b01a129c8c3191a27511dfdf925450bdaadc29d25 |
Hashes for snipar-0.0.16-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c37eb2a13e5c9b0a1cc31a44327a9ad7457e84c8dbdba29bcdd7825ae39e2e8f |
|
MD5 | 26a4b75db90c54825270535646c0cc8e |
|
BLAKE2b-256 | 57eb1d7db7553fe3f2fd72fc3cde44f33512826acd672ab890f26b5e1c19a230 |
Hashes for snipar-0.0.16-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c4f2da0ad9736ec1fab60ac3c4cee5078bb48934f94726cf97dc2d48f09ea5d |
|
MD5 | 2613f0fe0e405413cd7c52278ea33090 |
|
BLAKE2b-256 | 07ed7cbabda900ebdd3bfd37b8d1d639ef9879f02bb046ab5bfc4bebe1372591 |
Hashes for snipar-0.0.16-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7e1706820078f78527dd567e473755327319a663cce6cc0bd9e4e87474d5d82 |
|
MD5 | e43648a1213537cd6a87d06b0241c6ef |
|
BLAKE2b-256 | b5a2804a4337ed9d1b0f78eedb452cc17832ca508648421e1219aa08cd9e1474 |
Hashes for snipar-0.0.16-cp38-cp38-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba272caaac4327e485eb13cd1f9dc8d41729a85e6f3f1dd99e84834a06be86b2 |
|
MD5 | a77ac0d7e2fe54398f5ecc6336abccee |
|
BLAKE2b-256 | 83b559f6be7bde5993e3d1f9451bd0faf3e713dd8e5446ec825f00fd39a7c75c |
Hashes for snipar-0.0.16-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b8c500e5b943273a8d1f3b596220784cae98c17a93eba83b615c0625b5b7e06 |
|
MD5 | 3d3c644c228f3a91881d48827bee32ed |
|
BLAKE2b-256 | aa4699810b4a870b61c14386051dcc50908ab9141717624111402fc780da709d |
Hashes for snipar-0.0.16-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 857bcc2d9a83535970484cf41bb11841c95df19cd3b231d881bbb3f762f5238d |
|
MD5 | 5f885cf0450678a6a1ab266779af46cb |
|
BLAKE2b-256 | 0d15f2b4863034357b7666fb2d881a2b9245625db57d88b7862312df60f608d4 |
Hashes for snipar-0.0.16-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96145f830ee00920b66bb66be5dde670a9037ed950af8ea8c3b5f0adef98ff46 |
|
MD5 | c1cab0667813fe19bd5a21b319dee241 |
|
BLAKE2b-256 | 7a7158ab9958ca1047c73600701c215b0844dbeacde3a67c0aabfca54a7d1390 |
Hashes for snipar-0.0.16-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1acdd70197f3467160f9047e1a45c36199cea14519b96b812c1efe2a10ba4515 |
|
MD5 | 64a5e92678adf4dc08663eef0ac19309 |
|
BLAKE2b-256 | f8000a038bd35c721dba0253b209e6e5ef26e8f9eb3fbd6c4f6dee8e24cf9077 |
Hashes for snipar-0.0.16-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 823719bb2d45979a26096d896704ece5b58b6a4a492c2cd30694321f9d3f697f |
|
MD5 | 888b48c6e031618a10c41502f5f9a82d |
|
BLAKE2b-256 | 75c61da8333eb3079487fcb578b7de56ebb744ea4349bd74eabfc3628ab1f22f |
Hashes for snipar-0.0.16-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b778ba7f1d734be88c14a76561c524cc7e8927ce7105f3de7f0d1db8db2b5a3 |
|
MD5 | 33df14eaf94645bb57cae58f91980f10 |
|
BLAKE2b-256 | 369b6413d92b1c34b840a590ba8e3cbed447eff5da0a2d39d9d7cfdaee979fba |
Hashes for snipar-0.0.16-cp37-cp37m-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c13e8e74374d99e77bb6b2013ef4033010a180588b1b6646b087016542c9375 |
|
MD5 | 8b721977c4c143283414029418fc0443 |
|
BLAKE2b-256 | 3bc2bd4e6380981f5393246c92316172af6735a4de0e00dd418e7db93fe90017 |
Hashes for snipar-0.0.16-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b5420f2b4eaa2283820588b02ba205e24dc39060870f91f2364f423273d1e81 |
|
MD5 | dcc44cfb18e0a3b69df9979cd8c10a29 |
|
BLAKE2b-256 | fd68cdb0e71245cfac3b80d73df4efc1923d98636e77c764b34202080c32621c |
Hashes for snipar-0.0.16-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d826ad734901bb9b3f1695ffde06eb3af4286f9b3c8c93268535cdabcff4d24 |
|
MD5 | 2776d40bb12ac53040c5dfa91b12aefa |
|
BLAKE2b-256 | b14b16645399c5dc6bdc0989d961b93091299bac459c7e8caafcfac494a59473 |
Hashes for snipar-0.0.16-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d060eed4ce1a7cb45c1b6502eae8e8636194be1fdf6d413061e7ac4556a22714 |
|
MD5 | 07c9a1bd9459e4ad4e508f10ba31466f |
|
BLAKE2b-256 | 6417b9b6a4281957bf8746e0882e4a67a518dee6f5c8913fb8798f85a640312a |