Skip to main content

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

pydbsnp-0.1.6.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydbsnp-0.1.6-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

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

Hashes for pydbsnp-0.1.6.tar.gz
Algorithm Hash digest
SHA256 e86e8cdd7266c242d9434256656ad515d505dd9bf727e728eb94106f1ebd0d16
MD5 cb0e56ecf77869ccc879395c9c7e3458
BLAKE2b-256 f10a96d0bd86651529135ef055ca7b36b96ffb158e2f959dea38e3bed8a42121

See more details on using hashes here.

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

Hashes for pydbsnp-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 fc75ca81ace2a40fd8312fc6f94976242d10dc1e4877bc08e11c5f87564ea362
MD5 d11e47478a2c61a2bd70f51b6fd28648
BLAKE2b-256 de1e7ddd2de8ee1cc7d3d71967e5a6d9412a442efdcd4f11df5a7e989a2620dd

See more details on using hashes here.

Release history Release notifications | RSS feed

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.0.0

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

This release

0.1.6 This release

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.24

2 files

0.0.23

2 files

0.0.22

2 files

0.0.21

2 files

0.0.19

2 files

0.0.18

2 files

0.0.17

2 files

0.0.16

2 files

0.0.15

2 files

0.0.14

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.4

2 files

0.0.3

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page