Skip to main content

Python 3 VCF library with good support for both reading and writing

Project description

VCFPy

https://img.shields.io/pypi/v/vcfpy.svg https://img.shields.io/travis/bihealth/vcfpy.svg Documentation Status Updates

Python 3 VCF library with good support for both reading and writing

Features

  • Support for reading and writing VCF v4.3

  • Interface to INFO and FORMAT fields is based on OrderedDict allows for easier modification than PyVCF (also I find this more pythonic)

  • Read (and jump in) and write BGZF files just using vcfpy

Why another VCF parser for Python!

I’ve been using PyVCF with quite some success in the past. However, the main bottleneck of PyVCF is when you want to modify the per-sample genotype information. There are some issues in the tracker of PyVCF but none of them can really be considered solved. I tried several hours to solve these problems within PyVCF but this never got far or towards a complete rewrite…

For this reason, VCFPy was born and here it is!

What’s the State?

VCFPy is the result of two full days of development plus some maintenance work later now (right now). I’m using it in several projects but it is not as battle-tested as PyVCF.

Why Python 3 Only?

As I’m only using Python 3 code, I see no advantage in carrying around support for legacy Python 2 and maintaining it. At a later point when VCFPy is known to be stable, Python 2 support might be added if someone contributes a pull request.

History

0.3.1 (2016-09-21)

  • Work around FORMAT/FT being a string; this is done so in the Delly output

0.3.0 (2016-09-21)

  • Reader and Writer can now be used as context manager (with with)

  • Including license in documentation, including Biopython license

  • Adding support for writing bgzf files (taken from Biopython)

  • Adding support for parsing arrays in header lines

  • Removing example-4.1-bnd.vcf example file because v4.1 tumor derival lacks ID field

  • Adding AltAlleleHeaderLine, MetaHeaderLine, PedigreeHeaderLine, and SampleHeaderLine

  • Renaming SimpleHeaderFile to SimpleHeaderLine

  • Warn on missing FILTER entries on parsing

  • Reordered parameters in from_stream and from_file (#18)

  • Renamed from_file to from_stream (#18)

  • Renamed Reader.jump_to to Reader.fetch

  • Adding header_without_lines function

  • Generally extending API to make it esier to use

  • Upgrading dependencies, enabling pyup-bot

  • Greatly extending documentation

0.2.1 (2016-09-19)

  • First release on PyPI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vcfpy-0.4.0.tar.gz (967.0 kB view details)

Uploaded Source

Built Distribution

vcfpy-0.4.0-py2.py3-none-any.whl (26.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file vcfpy-0.4.0.tar.gz.

File metadata

  • Download URL: vcfpy-0.4.0.tar.gz
  • Upload date:
  • Size: 967.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for vcfpy-0.4.0.tar.gz
Algorithm Hash digest
SHA256 681214ea59cee245859442caa14ba9c1b4e55a21e24ca32069b80da269aae6a9
MD5 7b3fd18d59aefd3021e9d518a6ab0740
BLAKE2b-256 87f81ae94d291b64e107d7bb2f8dceb40efe9fb1e2bef1cc1c44e8058e5581f5

See more details on using hashes here.

File details

Details for the file vcfpy-0.4.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for vcfpy-0.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c9c230e2a1f94c72df3491e3c0ad21aa18bd5fb19af1782197ad5f7a36a60e76
MD5 80240784527673e72d26d93fdbe99731
BLAKE2b-256 d2bda949506f80e390d586bcd2cc699e196a4aa6fec94f6455cb13ff552248de

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page