https://github.com/sgkit-dev/vcztools
Partial reimplementation of bcftools for VCF Zarr
https://github.com/sgkit-dev/vcztools
Last synced: about 1 month ago
JSON representation
Partial reimplementation of bcftools for VCF Zarr
- Host: GitHub
- URL: https://github.com/sgkit-dev/vcztools
- Owner: sgkit-dev
- License: apache-2.0
- Created: 2024-06-26T14:43:27.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2026-04-01T15:12:05.000Z (about 1 month ago)
- Last Synced: 2026-04-01T18:50:33.714Z (about 1 month ago)
- Language: Python
- Size: 571 KB
- Stars: 23
- Watchers: 5
- Forks: 6
- Open Issues: 58
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/sgkit-dev/vcztools/actions/workflows/ci.yml)
[](https://pepy.tech/projects/vcztools)
# vcztools
Partial reimplementation of bcftools for [VCF Zarr](https://github.com/sgkit-dev/vcf-zarr-spec/)
Please see the [preprint](https://www.biorxiv.org/content/10.1101/2024.06.11.598241) for more information.
## Installation
```
python3 -m pip install vcztools
```
## Usage
```
vcztools view
```
or
```
python -m vcztools view
```
should be equivalent to running
```
bcftools view
```
See the [bio2zarr](https://sgkit-dev.github.io/bio2zarr/) project for help in
converting VCF files to Zarr.
## Goals
Vcztools aims to be a drop-in replacement for a subset of bcftools functionality.
Currently supported are the ``view``, ``query`` and ``index -s/-n`` commands.
We aim for 100% compatibility so if you notice a difference between the output of
vcztools and bcftools please do open an issue.
## Cloud stores
Vcztools can read vcz files from cloud stores using [fsspec](https://filesystem-spec.readthedocs.io/en/latest/).
For example, to read from Amazon S3, first install the `s3fs` fsspec library:
```
python3 -m pip install s3fs
```
Then provide your AWS credentials as described in the [`s3fs` documentation](https://s3fs.readthedocs.io/en/latest/#credentials), for example by setting environment variables:
```
export AWS_ACCESS_KEY_ID=...
export AWS_SECRET_ACCESS_KEY=...
```
You can then run vcztools using an `s3://` URL:
```
python -m vcztools view s3:///path/to.vcz
```
## Development
Vcztools is under active development and contributions are warmly welcomed. Please
see the project on [GitHub](https://github.com/sgkit-dev/vcztools).