Ingests VCF/BCF into compressed TileDB arrays, incrementally adds samples, runs fast parallel region/sample queries, and exports back to VCF. For population-genomics variant datasets too large for flat VCF.
Ships in alterlab-bioinformatics. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
TileDB-VCF is a high-performance C++ library with Python and CLI interfaces for efficient storage and retrieval of genomic variant-call data. Built on TileDB's sparse array technology, it enables scalable ingestion of VCF/BCF files, incremental sample addition without expensive merging operations, and efficient parallel queries of variant data stored locally or in the cloud.
This skill should be used when:
| Scenario | Use Instead |
|---|---|
| Reading, filtering, or iterating a handful of VCF/BAM files in Python (pysam/htslib) | alterlab-pysam |
| Producing the VCFs in the first place (FASTQ -> alignment -> variant calling) | alterlab-nf-core-sarek |
| Clinical interpretation or population frequency of a specific variant | alterlab-clinvar / alterlab-gnomad |
| General chunked array storage for non-variant data (images, tensors, matrices) | alterlab-zarr |
| Out-of-core dataframe analytics on an exported table | alterlab-polars / alterlab-dask |
| Differential expression from an RNA-seq count matrix (log2 fold changes, adjusted p-values) | alterlab-pydeseq2 |
Hand-off rule. When the request matches a row above, open your answer by naming that skill by its exact id (for example alterlab-pysam) and saying in one line why it fits better, then stop applying this skill's procedure. Name it even when you also need to ask for missing input. If only part of the request is out of scope, name the skill for that part and do only the in-scope part. A brief general pointer is fine; the named skill does the work.
Preferred method: conda/mamba from the tiledb channel. tiledbvcf-py is NOT on PyPI, conda-forge, or bioconda — it ships from the tiledb Anaconda channel, with native osx-arm64 builds (no Rosetta/CONDA_SUBDIR workaround needed on Apple Silicon). The current release is 0.40.3 (April 2026), built for linux-64, osx-64 and osx-arm64 on Python 3.9–3.12. There is no 3.13 build, so pin the interpreter when creating the environment — a default conda create that resolves to a newer Python will report the package as unavailable rather than explaining why.
# Native Apple Silicon (osx-arm64) — also works on osx-64 / linux-64
conda create -n tiledb-vcf -c conda-forge -c tiledb \
python=3.12 tiledbvcf-py=0.40 pandas pyarrow numpy
conda activate tiledb-vcf
Alternative: Docker images (pulls the CLI/Python interface; latest tag tracks current release)
docker pull tiledb/tiledbvcf-py # Python interface
docker pull tiledb/tiledbvcf-cli # Command-line interface
Create and populate a dataset:
import tiledbvcf
# Create a new dataset
ds = tiledbvcf.Dataset(uri="my_dataset", mode="w",
cfg=tiledbvcf.ReadConfig(memory_budget_mb=1024))
# Ingest VCF files (must be single-sample with indexes)
# Requirements:
# - VCFs must be single-sample (not multi-sample)
# - Must have indexes: .csi (bcftools) or .tbi (tabix)
ds.ingest_samples(["sample1.vcf.gz", "sample2.vcf.gz"])
Query variant data:
# Open existing dataset for reading
ds = tiledbvcf.Dataset(uri="my_dataset", mode="r")
# Query specific regions and samples
df = ds.read(
attrs=["sample_name", "pos_start", "pos_end", "alleles", "fmt_GT"],
regions=["chr1:1000000-2000000", "chr2:500000-1500000"],
samples=["sample1", "sample2", "sample3"]
)
print(df.head())
Export to VCF:
import os
# Export two VCF samples
ds.export(
regions=["chr21:8220186-8405573"],
samples=["HG00101", "HG00097"],
output_format="v",
output_dir=os.path.expanduser("~"),
)
Create TileDB-VCF datasets and incrementally ingest variant data from multiple VCF/BCF files. This is appropriate for building population genomics databases and cohort studies.
Requirements:
Common operations:
Query variant data with high performance across genomic regions, samples, and variant attributes. This is appropriate for association studies, variant discovery, and population analysis.
Common operations:
Export data in various formats for downstream analysis or integration with other genomics tools. This is appropriate for sharing datasets, creating analysis subsets, or feeding other pipelines.
Common operations:
TileDB-VCF excels at large-scale population genomics analyses requiring efficient access to variant data across many samples and genomic regions.
Common workflows:
TileDB-VCF Data Model:
Schema Configuration:
# Partition a large read across region/sample space
config = tiledbvcf.ReadConfig(
memory_budget_mb=2048, # memory budget in MB
region_partition=(0, 10), # (partition_index, num_partitions) over regions
sample_partition=(0, 4), # (partition_index, num_partitions) over samples
)
Critical: TileDB-VCF uses 1-based genomic coordinates following VCF standard:
Region specification formats:
# Single region
regions = ["chr1:1000000-2000000"]
# Multiple regions
regions = ["chr1:1000000-2000000", "chr2:500000-1500000"]
# Whole chromosome
regions = ["chr1"]
Note: regions= strings are always 1-based inclusive — a start <= 0 raises "Regions must be 1-based". There is no implicit BED-style conversion. To use 0-based half-open BED intervals, pass a BED file via read(bed_file="regions.bed", ...) instead of the regions= list.
Performance considerations:
TileDB-VCF seamlessly works with cloud storage:
# S3 dataset
ds = tiledbvcf.Dataset(uri="s3://bucket/dataset", mode="r")
# Azure Blob Storage
ds = tiledbvcf.Dataset(uri="azure://container/dataset", mode="r")
# Google Cloud Storage
ds = tiledbvcf.Dataset(uri="gcs://bucket/dataset", mode="r")
TileDB-VCF provides a command-line interface with the following subcommands:
Available Subcommands:
create - Creates an empty TileDB-VCF datasetstore - Ingests samples into a TileDB-VCF datasetexport - Exports data from a TileDB-VCF datasetlist - Lists all sample names present in a TileDB-VCF datasetstat - Prints high-level statistics about a TileDB-VCF datasetutils - Utils for working with a TileDB-VCF datasetversion - Print the version information and exit# Create empty dataset
tiledbvcf create --uri my_dataset
# Ingest samples (requires single-sample VCFs with indexes)
tiledbvcf store --uri my_dataset --samples sample1.vcf.gz,sample2.vcf.gz
# Export data
tiledbvcf export --uri my_dataset \
--regions "chr1:1000000-2000000" \
--sample-names "sample1,sample2"
# List all samples
tiledbvcf list --uri my_dataset
# Show dataset statistics
tiledbvcf stat --uri my_dataset
These are methods on the Dataset object (open in mode="r"), not top-level tiledbvcf functions. There is no read_allele_frequency or sample_qc function — use the methods below.
ds = tiledbvcf.Dataset(uri="my_dataset", mode="r")
# Internal allele-count (AC) array, returned as a pandas DataFrame
ac_df = ds.read_allele_count(region="chr1:1000000-2000000")
# Apply an allele-frequency filter at read time on a normal read()
df = ds.read(
attrs=["sample_name", "pos_start", "alleles", "fmt_GT"],
regions=["chr1:1000000-2000000"],
set_af_filter="<0.01", # keep variants with AF below threshold
)
# Internal variant-stats array (per-variant aggregate stats) as a DataFrame
stats_df = ds.read_variant_stats(region="chr1:1000000-2000000")
Note: read_allele_count and read_variant_stats require the dataset to have been
ingested with the corresponding internal arrays enabled (the default in recent versions).
# Pass raw TileDB Embedded config keys (e.g. cloud creds, cache sizing)
config = tiledbvcf.ReadConfig(
memory_budget_mb=4096,
tiledb_config={
"sm.tile_cache_size": "1000000000",
"vfs.s3.region": "us-east-1",
},
)
When workloads outgrow single-node processing (roughly: > 1000 samples, > 100 GB of VCF, or a need for distributed compute / shared access), the same datasets can be ingested and queried on TileDB Cloud via tiledb-cloud-py. The local tiledbvcf API stays the same; the cloud package adds distributed orchestration.
Setup
pip install "tiledb-cloud[life-sciences]" # cloud client with genomics extras
export TILEDB_REST_TOKEN="your_api_token" # auth is automatic from this env var
Distributed ingest and read. The cloud VCF entry points live in tiledb.cloud.vcf:
tiledb.cloud.vcf.ingest(...) — distributed ingestion into a tiledb://namespace/dataset URItiledb.cloud.vcf.build_read_dag(...) — builds a distributed read DAG over regions/samplesExact signatures and resource arguments change between releases, so consult the current Cloud API reference rather than hard-coding them: https://cloud.tiledb.com/academy/structure/life-sciences/population-genomics/api-reference/cloud/
Cloud-hosted datasets are still opened with the normal tiledbvcf.Dataset API by passing a tiledb:// URI plus a tiledb_config carrying credentials:
import tiledbvcf
cfg = {"rest.token": "your_api_token"} # or rely on TILEDB_REST_TOKEN
ds = tiledbvcf.Dataset("tiledb://TileDB-Inc/gvcf-1kg-dragen-v376",
mode="r", tiledb_config=cfg)
df = ds.read(
attrs=["sample_name", "fmt_GT", "fmt_AD", "fmt_DP"],
regions=["chr13:32396898-32397044", "chr13:32398162-32400268"],
samples=ds.samples(),
)
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/alterlab-bioinformatics:alterlab-tiledbvcffrom alterlab-bioinformatics
npx claudepluginhub alterlab-ieu/alterlab-academic-skills --plugin alterlab-bioinformatics38 skills in this plugin
/alterlab-alphafoldPredict protein 3D structures with AlphaFold2 via ColabFold — MMseqs2-accelerated MSAs, monomer and AlphaFold2-Multimer complex folding, and confidence-based validation (pLDDT, pTM/ipTM, PAE). Use when folding a protein sequence or complex from FASTA, generating a predicted structure with confidence metrics, ranking models, or checking self-consistency of a design. For co-folding a protein WITH a small-molecule ligand or predicting binding affinity prefer alterlab-boltz; for antibody–antigen or one-FASTA multi-entity complexes prefer alterlab-chai; to LOOK UP an already-computed structure prefer alterlab-alphafold-db; for ESM embeddings or inverse folding prefer alterlab-esm. Part of the AlterLab Academic Skills suite./alterlab-anndataBuild, slice, concatenate, read, and write AnnData annotated data matrices (obs, var, X, layers, obsm, uns) — the scverse data STRUCTURE, not an analysis pipeline. Use when creating or wrangling .h5ad/zarr files, managing cell and gene annotations, concatenating batches, or handling layers/obsm/backed-mode; for the QC, normalization, clustering, UMAP, and differential-expression analysis pipeline prefer alterlab-scanpy instead, and for RNA velocity from spliced/unspliced layers prefer alterlab-scvelo instead. Part of the AlterLab Academic Skills suite.2 plugins in one repository ship this exact skill · first indexed Nov 9, 2026
Other plugins' skills for the same job