Tiledbvcf
K-DenseCommunityCreated by Jeremy LeipzigDistributed by K-Dense
- Skill
- Tool integration
- Science and research
- MIT
- No issues found
From the skill’s files
Taken from the skill’s own files (its description, section headings and stated usage). Not an AutoGineer summary, and not written by the author as one.
Stores and retrieves genomic variant calls with TileDB-VCF. Use for indexed single-sample VCF/BCF ingestion, incremental cohorts, region and sample queries, streaming results, allele statistics, QC, and VCF/BCF export locally or through TileDB Cloud. Use for cohort variant storage, incremental sample ingestion, interval queries, and exporting subsets for downstream genomics. TileDB-VCF stores records; it does not perform joint variant calling, association testing, normalization, or population structure adjustment. Dataset size alone does not determine whether cloud execution is appropriate: benchmark the intended sample, region, and attribute workload.
What it does
- When to use
- Install and verify the native stack
- Prepare and create a cohort
- Query completely and interpret coordinates correctly
- Export and validate
- Cohort statistics and QC
When to use it
- Use for indexed single-sample VCF/BCF ingestion, incremental cohorts, region and sample queries, streaming results, allele statistics, QC, and VCF/BCF export locally or through TileDB Cloud.
- Use for cohort variant storage, incremental sample ingestion, interval queries, and exporting subsets for downstream genomics.
- TileDB-VCF stores records; it does not perform joint variant calling, association testing, normalization, or population structure adjustment.
- Dataset size alone does not determine whether cloud execution is appropriate: benchmark the intended sample, region, and attribute workload.
- This skill targets released TileDB-VCF 0.40.3.
- Native Python/CLI checks used two synthetic single-sample VCFs on macOS ARM64.
Advantages
The skill’s files do not state this.
Usage examples
The skill’s files do not state this.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/k-dense-ai/tiledbvcf/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip tiledbvcf.zip -d .agents/skills
Documentation by Jeremy Leipzig
TileDB-VCF
When to use
Use for cohort variant storage, incremental sample ingestion, interval queries, and exporting subsets for downstream genomics. TileDB-VCF stores records; it does not perform joint variant calling, association testing, normalization, or population structure adjustment. Dataset size alone does not determine whether cloud execution is appropriate: benchmark the intended sample, region, and attribute workload.
This skill targets released TileDB-VCF 0.40.3. Native Python/CLI checks used two synthetic single-sample VCFs on macOS ARM64. Cloud client 0.14.4 contracts were checked against its released wheel and mocked dispatch; hosted queries and jobs were not executed. See installation and verification notes.
Install and verify the native stack
The tiledbvcf Python distribution is not published on PyPI at this review. The
official tiledb Conda channel supplies tiledbvcf-py 0.40.3 for macOS ARM64,
macOS x86-64, and Linux x86-64, with Python 3.9-3.12 builds. tiledb on PyPI is
TileDB-Py and does not install TileDB-VCF. Native Apple Silicon no longer requires
forcing CONDA_SUBDIR=osx-64.
For the tested macOS ARM64 environment, pins below avoid versioned-library import failures in the otherwise successful current Conda solve:
conda create -n tiledb-vcf -c tiledb -c conda-forge \
python=3.12 tiledbvcf-py=0.40.3 \
azure-core-cpp=1.16.2 azure-storage-blobs-cpp=12.16.0 \
azure-storage-files-datalake-cpp=12.14.0 capnproto=1.4.0 c-blosc2=2.23.1
conda activate tiledb-vcf
python -c 'import tiledbvcf; print(tiledbvcf.version)'
tiledbvcf versionThe equivalent Micromamba solve/install was executed. These extra ABI pins are a verified macOS ARM64 workaround, not a claim about all platforms. Preserve the resolved environment for production. Other-platform installation and official Docker images are alternatives documented upstream, not tested here.
Prepare and create a cohort
Record reference assembly, contig naming/lengths, callers, normalization rules, sample identity, and file checksums. Do not mix assemblies or assume
1andchr1are equivalent. Confirm compatible headers across inputs.Each input must contain one sample, be coordinate sorted, and have an index. Use BGZF-compressed VCF or BCF with a matching
.csi/.tbi. Inspectbcftools query -l sample1.vcf.gz; filenames are not sample identifiers.Create the dataset explicitly, then ingest. Opening
mode="w"alone does not create its schema. Materialize frequently read fields at creation time.Validate a small known interval and a round-trip export before scaling.
For existing sorted plain-text VCFs (run once per input; output names must be new):
bcftools view -Oz -o sample1.vcf.gz sample1.vcf
bcftools index -c sample1.vcf.gz
bcftools view -Oz -o sample2.vcf.gz sample2.vcf
bcftools index -c sample2.vcf.gzThe following local examples were exercised with sample IDs S1 and S2, contig
chr1, and coordinates 1-100; substitute the verified IDs and intervals in real data.
import tiledbvcf
uri = "cohort"
config = {"sm.compute_concurrency_level": "2", "sm.io_concurrency_level": "2"}
with tiledbvcf.Dataset(uri, mode="w", tiledb_config=config) as ds:
ds.create_dataset(extra_attrs=["fmt_GT", "fmt_DP"])
ds.ingest_samples(
["sample1.vcf.gz"], threads=2, total_memory_budget_mb=512
)
# Incremental ingestion uses the existing dataset; do not call create_dataset again.
with tiledbvcf.Dataset(uri, mode="w", tiledb_config=config) as ds:
ds.ingest_samples(
["sample2.vcf.gz"], threads=2, total_memory_budget_mb=512
)The schema-v4 data array has contig, start-coordinate, and sample dimensions;
headers and optional statistics are separate arrays in the dataset group. Fields
not explicitly materialized remain in the INFO/FORMAT payloads. Query names such
as pos_start need not match raw storage column names.
Upstream supports parallel thread/process ingestion. Assign distinct sample work
and coordinate lifecycle/maintenance operations; do not blindly re-ingest samples.
resume=True supports interrupted ingestion, not arbitrary duplicate correction.
Query completely and interpret coordinates correctly
| Surface | Coordinate convention |
|---|---|
Python regions=["chr1:10-14"] | 1-based, closed interval |
Returned pos_start, pos_end | 1-based, inclusive record endpoints |
BED input and query_bed_start, query_bed_end | 0-based, half-open |
read_variant_stats() / read_allele_count() column pos in 0.40.3 | 0-based; add one before joining to VCF POS |
Queries return overlapping records, not just records starting inside the
interval. A deletion spanning positions 10-14 appears in chr1:14-14, with
pos_start=10. For BED [13,14), the equivalent string is chr1:14-14.
The Python region parser requires explicit contig:start-end; bare "chr1"
is rejected in this release. Use a known contig length for a whole-contig query.
cfg = tiledbvcf.ReadConfig(memory_budget_mb=128, tiledb_config=config)
attrs = ["sample_name", "contig", "pos_start", "pos_end", "alleles", "fmt_GT"]
with tiledbvcf.Dataset(uri, cfg=cfg) as ds:
assert {"S1", "S2"}.issubset(ds.samples())
assert set(attrs).issubset(ds.attributes())
for batch in ds.read_iter(
attrs=attrs, regions=["chr1:1-100"], samples=["S1", "S2"]
):
print(batch) # Replace with a bounded consumer or partitioned output.read()returns a pandas DataFrame;read_arrow()returns a PyArrow Table. Either can return only the first memory-limited batch. Continue withcontinue_read()/continue_read_arrow()untilread_completed(), or useread_iter()for ordinary DataFrame queries. Avoid concatenating all batches when the result cannot fit in memory.ReadConfig(memory_budget_mb=...)controls reads; useingest_samples(total_memory_budget_mb=...)for writes. A read budget is not a process RSS cap.limittruncates total output; it is not a pagination size.sample_partition=(0, 2)selects partition zero of two. Likewise,region_partition=(index, number_of_partitions)partitions query regions; these tuples are not coordinate bounds, tile extents, or sample capacities.0.40.3 retains BED selection state when a later call omits
bed_file. Open a freshDatasetfor an independent query when changing BED/region inputs.fmt_GTcontains allele indices: 0 refers to REF, positive values index ALT, and -1 means missing. Preserve multiallelic identity and ploidy; do not treat every positive integer as a biallelic dosage or missing calls as reference. The integer list alone does not encode the original phased GT string.
Export and validate
from pathlib import Path
Path("exported").mkdir(exist_ok=True)
with tiledbvcf.Dataset(uri, cfg=cfg) as ds:
ds.export(
samples=["S1"], regions=["chr1:1-100"],
output_format="v", output_dir="exported",
)Python export formats: v VCF, z compressed VCF, u uncompressed BCF, b
compressed BCF. merge=False writes per-sample files; merge=True requires a
combined output_path. A combined export is not joint calling. Re-index exported
files before indexed downstream access. Compare sample IDs, contigs, record
counts, alleles, INFO/FORMAT values, and missing/phased genotypes; semantic
round-trip preservation does not imply byte-identical compression or headers.
The CLI accepts positional sample paths or --samples-file (one URI per line),
not a comma-separated --samples argument:
tiledbvcf create --uri cli_cohort
tiledbvcf store --uri cli_cohort --threads 2 --total-memory-budget-mb 512 \
-- sample1.vcf.gz sample2.vcf.gz
tiledbvcf list --uri cli_cohort
tiledbvcf stat --uri cli_cohort
tiledbvcf export --uri cli_cohort --regions chr1:1-100 \
--sample-names S1,S2 -Ot --tsv-fields 'SAMPLE,CHR,POS,REF,ALT,F:GT' \
--output-path variants.tsv-- protects positional paths from variable-length options such as
--tiledb-config. Check expected artifacts and sample counts as well as the exit
code: an invalid store command returned exit zero while printing an error in the
reviewed CLI. TSV fields use F:GT for FORMAT/GT and I:DP for INFO/DP.
Cohort statistics and QC
with tiledbvcf.Dataset(uri, cfg=cfg) as ds:
stats = ds.read_variant_stats(regions=["chr1:1-100"], drop_ref=True)
stats["vcf_pos"] = stats["pos"] + 1
print(stats[["contig", "vcf_pos", "alleles", "ac", "an", "af"]])
qc = tiledbvcf.sample_qc(uri, samples=["S1"], config=config)
print(qc)Statistics arrays are enabled by default at creation; older/disabled arrays may
not support these operations. read_variant_stats has no samples argument.
The older read_allele_frequency(dataset_uri, region) wrapper accepts a single
region and delegates to the deprecated singular argument; prefer the Dataset
method above. sample_qc uses dataset_uri, not uri, as its first argument.
The ac, an, and af values summarize the ingested cohort, not a selected
ancestry or query sample subset. A read(samples=[...], set_af_filter=">0.6")
filter still used cohort AF in the tested release. Compute subgroup frequencies
from correctly selected calls with explicit missingness, ploidy, callable-region,
and gVCF reference-block policies. Use an appropriate called-allele denominator,
not universally 2 * number_of_samples; a missing VCF record is not proof of a
homozygous-reference call. QC metrics and sparse storage do not establish GWAS
readiness or scientific validity.
Object storage and TileDB Cloud
Direct storage uses s3://bucket/path, azure://container/path, or
gcs://bucket/path, supported by the installed TileDB backend and its provider
credentials. This does not automatically distribute the computation. Use the
provider's credential chain or scoped configuration, and verify access to both
the dataset and source indexes. A TileDB Cloud token is distinct from bucket
credentials. Remote storage examples below are illustrative, source-verified,
and not authenticated end-to-end tests.
Install tiledb-cloud==0.14.4 in a compatible environment. Its life-sciences
extra adds TileDB-SOMA, not TileDB-VCF. Supply TILEDB_REST_TOKEN through the
execution environment before importing the client; TILEDB_REST_HOST selects a
custom deployment if required. Do not embed tokens in code or print configuration.
# Illustrative: requires an accessible registered cohort and a billing namespace.
import tiledb.cloud
import tiledb.cloud.vcf
cloud_cfg = tiledb.cloud.Config()
with tiledbvcf.Dataset("tiledb://my-namespace/cohort", tiledb_config=cloud_cfg) as ds:
sample_names = ds.samples()
result = tiledb.cloud.vcf.read(
dataset_uri="tiledb://my-namespace/cohort",
config=cloud_cfg, attrs=["sample_name", "pos_start", "fmt_GT"],
regions=["chr1:1-100"], samples=sample_names[:2],
num_region_partitions=1, namespace="my-namespace", max_workers=2,
)
frame = result.to_pandas() # read returns an Arrow table, not a DataFrame.Distributed reads assemble an Arrow result and may use significant worker/client memory. Bound the requested regions/samples and worker count; partitioning does not make the final concatenated result memory-free. This is SDK task execution, not a paginated VCF REST-list API.
# Illustrative, mutating cloud job: use only for an authorized ingestion task.
submission = tiledb.cloud.vcf.ingest(
dataset_uri="s3://my-bucket/cohort",
sample_list_uri="s3://my-bucket/inputs/sample-uris.txt",
namespace="my-namespace", acn="registered-storage-role",
register_name="cohort", max_samples=2,
ingest_resources={"cpu": "2", "memory": "4Gi"},
)
print(submission["graph_id"])Use exactly one of search_uri, sample_list_uri, or metadata_uri; file-search
patterns apply to search_uri. Registration requires the access credential name
(acn). vcf.ingest submits asynchronously and returns
{"status": "started", "graph_id": ...}; track that graph to terminal success
and verify ingested samples before claiming completion. There is no released
ingest_vcf_dataset(source=..., output=...) API. Pricing, availability, security
controls, and deployment obligations require the current account/service terms.
Official references
Files
- ATTRIBUTION.mdAdded by AutoGineer976 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md13.6 KiB
- references/verification.md6.0 KiB
references/verification.md
TileDB-VCF verification notes
Reviewed 2026-10-01 against TileDB-VCF 0.40.3 and tiledb-cloud 0.14.4.
Distribution and local environment
The official TileDB channel metadata listed 0.40.3 builds for Python 3.9-3.12 on osx-arm64, osx-64, and linux-64. PyPI tiledbvcf metadata and the conda-forge tiledbvcf-py package endpoint returned 404. This is a distribution constraint, not absence of a macOS build. The native library is also available through the project's documented source-build and container routes.
An unpinned native osx-arm64 Conda solve succeeded but importing the resulting package failed: its bundled libtiledb needed exact versioned Azure dylibs absent from the newer dependencies selected by Conda. Pinning azure-core-cpp 1.16.2, azure-storage-blobs-cpp 12.16.0, azure-storage-files-datalake-cpp 12.14.0, capnproto 1.4.0, and c-blosc2 2.23.1 resolved the import failure without binary patches. The resolved environment used Python 3.12.14, pandas 2.3.3, NumPy 2.5.3, and PyArrow 24.0.0. The CLI reported TileDB-VCF 0.40.3, embedded TileDB 2.30.0, and htslib 1.23; the Conda TileDB package version alone was not an accurate indicator of the bundled library's runtime version.
Tests in tests/tiledbvcf/ (repository-level, outside this shipped skill) use
tiny synthetic, indexed VCFs, not real human data. Native checks cover incremental
ingestion, multiallelic and missing GT values, deletion overlap boundaries, BED
coordinates, sample partitions, total record limits, cohort statistics, QC,
semantic per-sample export, and CLI create/store/list/stat/TSV. Native checks
require the separate Conda build and bcftools; an ordinary uv environment cannot
install TileDB-VCF from PyPI.
Source and runtime findings
Released Python Dataset source defines
memory_budget_mb, explicitcreate_dataset, the batch-continuation protocol, 1-based explicit region strings, and(index, count)partitions.read_iterdoes not acceptset_af_filter; usereadwith continuation when applying that filter.Native in-memory exporter converts
pos_startandpos_endto 1-based output while keeping BED endpoints in BED conventions. Statisticsposremained 0-based in the native fixture.A BED read followed by a string-region read on the same Dataset retained the old BED interval, adding a record outside the new requested window. The skill requires reopening the reader when switching selectors. This is an observed 0.40.3 behavior, not a universal claim about future releases.
The CLI's variadic
--tiledb-configconsumed following positional paths until--was added. The invalid command printed a missing-input error with exit code zero. Validate sample counts and artifacts after ingestion.Cohort AF was 3/4 for a site where S1 was 0/1 and S2 was 1/1. Selecting S1 with AF >0.6 still returned S1, establishing that this query does not recompute AF on the selected sample subset. Both variant-statistics and allele-count tables reported the VCF POS=1 site as
pos=0.
Cloud SDK and endpoint contracts
The published 0.14.4 wheel,
including tiledb/cloud/vcf/query.py, vcf/ingestion.py, utilities/_common.py,
client.py, config.py, and generated REST client modules, is the contract
source. Some older website examples still name obsolete partition arguments;
follow the released num_region_partitions signature.
The default service base is https://api.tiledb.com; a configured deployment host
may override it. The SDK reads TILEDB_REST_TOKEN and sends it using the
X-TILEDB-REST-API-KEY header. tiledb.cloud.Config() propagates the authenticated
client configuration to the native library as rest.server_address and
rest.token. Importing only the Cloud client does not supply that configuration
to an independently opened native Dataset. login() can persist configuration;
environment-based credentials avoid putting a literal token in the example.
| Released generated route | Request / response contract |
|---|---|
POST /v1/udfs/generic/{namespace} | JSON GenericUDF payload; binary result (application/octet-stream, SDK response type file) |
POST /v1/taskgraphs/{namespace}/graphs | JSON graph payload; TaskGraph response |
POST /v1/taskgraphs/{namespace}/graphs/{id}/submit | No request body; TaskGraphLog response |
These submission calls use API-key or basic authentication and have no pagination
query parameters. The SDK handles serialization, graph state, and result
retrieval; the skill does not invent a /vcf REST endpoint. Route/method/body/auth
and result-type dispatch were tested against the installed client with transport
mocked. This is not proof that a hosted deployment accepts the calls today.
The distributed read wrapper waits for its DAG and returns pyarrow.Table.
The public vcf.ingest wrapper starts a batch graph and returns a status/graph-ID
mapping before completion. Underlying ingest_vcf validates exactly one source
selector. The PyPI life-sciences extra installs TileDB-SOMA, not TileDB-VCF.
Cloud account authorization, storage roles, quotas, distributed native image
versions, paid execution, and remote object storage were not exercised.
Further official sources
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Python
The author says: Requires a native TileDB-VCF installation and Python 3.9-3.12 for the reviewed Conda builds. bcftools compresses/indexes input fixtures. Installation and remote storage need network access; TileDB Cloud needs its Python client, account token, and storage permissions.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Jeremy Leipzig
- Publisher
- K-Dense (Community)
- Distributed by
- K-Dense
- Source
- K-Dense-AI/scientific-agent-skills · skills/tiledbvcf · commit a25cf9e
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE.md)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Jeremy Leipzig or K-Dense.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download tiledbvcf.zip