Sign inSign up

tiledb/tiledbvcf-py

By tiledb

Updated about 1 month ago

Python Interface for TileDB-VCF: A high performance storage engine for genomic variant data

Image
0

5.9K

tiledb/tiledbvcf-py repository overview

TileDB-VCF Python Interface

TileDB logo

TileDB-VCF is a C++ library for efficient storage and retrieval of genomic variant-call data using [TileDB Embedded][].

Quick reference

Images

Pre-built images for all variants are available on Docker Hub.

Variants
Supported tags
  • latest: latest stable release (recommended)
  • dev: development version
  • v0.x.x for a specific version

Parameters

  • AWS_EC2_METADATA_DISABLED Disable the EC2 metadata service (default true). This avoids unnecessary API calls when querying S3-hosted arrays from non-EC2 clients. If you are on an EC2 instance this service can be enabled with -e AWS_EC2_METADATA_DISABLED=false.

Building locally

To build the Dockerfile locally you need to clone the TileDB-VCF repository from GitHub and run docker build from within the local repo's root directory.

git clone https://github.com/TileDB-Inc/TileDB-VCF.git
cd TileDB-VCF

docker build -f docker/Dockerfile-py .

Usage

The following examples are meant to provide a quick overview of how to use these containers. See our docs for more comprehensive introductions to TileDB-VCF's functionality.

Here, we're using a publicly accessible TileDB-VCF dataset hosted on S3 that contains genome-wide variants for 20 synthetic samples. To pass in a local array or save exported files you will need to bind a local directory to the container's /data directory.

You can use the tiledbcf-py container to execute an external script or launch an interactive Python session.

docker run -it --rm tiledb/tiledbvcf-py

Create a Pandas DataFrame containing all variants within a region of interest for sample v2-WpXCYApL.

import tiledbvcf

uri = "s3://tiledb-inc-demo-data/tiledbvcf-arrays/v4/vcf-samples-20"

# open the array in 'read' mode
ds = tiledbvcf.Dataset(uri, mode = "r")

ds.read(
  attrs=['sample_name', 'pos_start', 'pos_end', 'alleles'],
  regions=['chr7:144000320-144008793'],
  samples=['v2-WpXCYApL']
)

Want to learn more?

Check out TileDB-VCF's docs for installation instructions, detailed descriptions of the data format and algorithms, and in-depth tutorials.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Tag summary

Content type

Image

Digest

sha256:0162c99df

Size

561.5 MB

Last updated

5 months ago

docker pull tiledb/tiledbvcf-py