pydbsnp
Interface with dbSNP VCF data
Installation
First install the python package via pip3
pip3 install pydbsnp
or
pip3 install --user pydbsnp
Once the python package is installed, download and index the dbSBP VCF data:
pydbsnp-download
pydbsnp-index
For hg19/GRCh37 coordinates:
pydbsnp-download --reference-build GRCh37
pydbsnp-index
Command line usage
pydbsnp-query -h
pydbsnp-query rs689
pydbsnp-query chr11:2160994
pydbsnp-query --reference-build GRCh37 rs689
API
Two classes are provided: Variant and GeneralizedVariant.
An object of the Variant class has an attribute for each relevant field
of the VCF.
from pydbsnp import Variant
v = Variant(id='rs8056814')
print(v.chrom, v.pos, v.id, v.ref, v.alt)
print(v.info)
w = Variant(id='rs8056814', reference_build='GRCh37')
print(w.chrom, w.pos
help(Variant)
An object of the GeneralizedVariant class is similar, but each attribute
is a tuple which may have multiple items. For example, one RSID may map
to two sets of coordinates.
gv = GeneralizedVariant(id='rs8056814')
print(gv.chrom, gv.pos, gv.id, gv.ref, gv.alt)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pydbsnp-0.1.6.tar.gz.
File metadata
- Download URL: pydbsnp-0.1.6.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e86e8cdd7266c242d9434256656ad515d505dd9bf727e728eb94106f1ebd0d16
|
|
| MD5 |
cb0e56ecf77869ccc879395c9c7e3458
|
|
| BLAKE2b-256 |
f10a96d0bd86651529135ef055ca7b36b96ffb158e2f959dea38e3bed8a42121
|
File details
Details for the file pydbsnp-0.1.6-py3-none-any.whl.
File metadata
- Download URL: pydbsnp-0.1.6-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc75ca81ace2a40fd8312fc6f94976242d10dc1e4877bc08e11c5f87564ea362
|
|
| MD5 |
d11e47478a2c61a2bd70f51b6fd28648
|
|
| BLAKE2b-256 |
de1e7ddd2de8ee1cc7d3d71967e5a6d9412a442efdcd4f11df5a7e989a2620dd
|