/hvantk:joint-genotyping <gVCF directory> <output directory> [--prefix NAME] [--per-contig]from hvantk
Runs joint genotyping on a Slurm cluster using the hvantk HGC pipeline: combines single-sample gVCFs into a VDS, densifies to a MatrixTable, runs sample and variant QC, and exports a cohort VCF. Handles memory/time failures, placeholder allele inflation, missing VCF index, and contig name mismatches.
Ships in hvantk. 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.
Read the hvantk:workflow-conventions skill (skills/workflow-conventions/SKILL.md)
first; this skill assumes its site-profile rule, its section contract and its
measurement contract. Jobs run through hpc-hail-job.
From one gVCF per sample, bgzipped and indexed, to a cohort callset: the lossless
VDS (<prefix>.vds), the dense MatrixTable (<prefix>.mt), per-sample and per-variant
QC tables (qc/), and a biallelic cohort VCF (<prefix>.vcf.bgz), all under one output
directory with the recipe that made them. The outcome also includes the counts a recipient
needs: samples, variant rows, VCF records, and where the QC summary is.
Use it for a cohort of any size. A few samples run as one job on one node; hundreds or
thousands run one job per contig (section 4), then the per-contig outputs are kept as
the callset. Not this skill: subsetting an existing callset (callset-subset-export),
variant calling itself (gVCFs are the input), and multi-node Spark.
source "$HVANTK_SITE_PROFILE" && bash "$HVANTK_REPO/skills/_site/check-site-profile.sh";
stop and ask for any missing value. Every later command that reads a profile value
starts with the same source "$HVANTK_SITE_PROFILE" &&.hpc-hail-job (commit, digest, run notes).*.g.vcf.gz with a .tbi next to each, readable from
compute nodes, with GRCh38 contig names (chr1): the templates' combiner is GRCh38
only and HGC does no recoding. Check a header: { zcat <file> || true; } | grep -m1 '^##contig'.
GRCh37 gVCFs need the Python API with reference_genome set. Count the files: that
is the sample count every size decision uses.$HVANTK_WORK; the pipeline refuses to overwrite unless
told. Never under the home directory.references/sizing.md; for more than a few
hundred samples plan per contig from the start.gvcf-combine (gVCFs to a VDS), vds2mt (dense
MatrixTable), compute-qc (sample and variant QC under qc/), mt2vcf (biallelic
cohort VCF). It blocks until the last job ends, so run it in the background and poll
the job ids (hpc-hail-job section 3).
source "$HVANTK_SITE_PROFILE" && bash "$HVANTK_REPO/skills/joint-genotyping/templates/pipeline-job.sh" \
--gvcf-dir "$HVANTK_WORK/gvcfs" --out "$HVANTK_WORK/callsets/<name>" --prefix <name> \
--cpus 8 --mem-gb 32 --time 0-00:30:00 --name <run>-hgc --plan # then without --plan
--n-partitions sets the dense MatrixTable's partition count; --min-ac the VCF's.hvantk hgc pipeline, does the same stages in one process and
is the only command that takes --reference-genome GRCh37 (a stage-handoff defect
that broke a fresh run of it was fixed in 0.6.0; 0.5.0 and earlier fail at
the densify stage). The template keeps the chain
above because each stage is then its own job with its own request and the run resumes
by stage; GRCh37 gVCFs go through hvantk hgc pipeline --reference-genome GRCh37 as
one job through hpc-hail-job.<out>/recipe.txt lists the
four commands, so resume by submitting the remaining ones through hpc-hail-job
rather than starting over. The template refuses to overwrite an existing VDS,
MatrixTable or VCF.hvantk hgc qc-summary -d <out>/qc -o <out>/qc/summary.md as a small job, and
hvantk hgc qc-report -i <out>/qc/<prefix>_with_qc.mt -o <out>/qc/report.html when a
report is wanted (the QC-annotated MatrixTable compute-qc writes, not the plain one). references/outputs.md says what each QC file holds and what it leaves out.bcftools or tabix (Hail writes none): a cluster
module or a user install; record which. Without one, say so in the run notes.templates/per-contig-array.sbatch runs hvantk hgc gvcf-combine as one array
task per contig with the same container environment as a single job, followed by
vds2mt and mt2vcf per contig. Keep the per-contig outputs; a genome-wide VCF, if
needed, is a bcftools concat of the per-contig files in contig order.references/sizing.md and double memory before adding cores.--n-partitions on the dense MatrixTable reduces part files on the parallel
filesystem: aim for a few hundred MB per part.hvantk hgc gvcf-combine ... --import-interval-size N (or
--use-exome-default-intervals) through hpc-hail-job yourself for that step.reference_genome for GRCh37; never recode gVCFs by hand.<*>, <NON_REF>,
*) are rows in the dense MatrixTable. Fix: count variants from the QC tables or the
VCF, which drop them; compute-qc drops star alleles by default.compute-qc writes <prefix>_variant_qc.tsv and <prefix>_sample_qc.csv. Fix: read
them accordingly; the orchestrated pipeline's qc/<prefix>_variant_qc.tsv holds only
the first 10,000 variants.mt2vcf refuses with an adj error. Cause: the adj entry field is missing or
mostly missing, so filtering on it would delete genotypes. Fix: run vds2mt with
genotype adjustment on (the default), or export with --no-filter-adj deliberately..vcf.gz and tools complain. Cause: Hail writes block-gzip;
the toolkit's extension is .vcf.bgz. Fix: name it .vcf.bgz, index it yourself..tbi next to the VCF. Cause: Hail writes none. Fix: section 3 step 5.seff reports more memory than requested on a job that completed. Cause: accounting
sums per-process RSS. Fix: trust the request and the cgroup (hpc-hail-job).vds2mt sorts columns; verify with the header before
concatenating.<out>/<prefix>.vds/reference_data/_SUCCESS, <out>/<prefix>.vds/variant_data/_SUCCESS
and <out>/<prefix>.mt/_SUCCESS exist; <out>/qc/<prefix>_sample_qc.csv has one row
per sample and <out>/qc/<prefix>_variant_qc.tsv exists; <out>/<prefix>.vcf.bgz exists.templates/pipeline-job.sh --describe <out> --prefix <name> --name <run>-describe):
the sample set of the MatrixTable, its row count, and the VCF record count. Put all
three in the run notes; a recipient compares against them.eval/check.py (opens in a new tab)eval/control.sh (opens in a new tab)eval/reference.json (opens in a new tab)eval/stage.sh (opens in a new tab)eval/task.md (opens in a new tab)references/outputs.md (opens in a new tab)references/sizing.md (opens in a new tab)templates/describe-callset.py (opens in a new tab)templates/per-contig-array.sbatch (opens in a new tab)templates/pipeline-job.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub bigbio/hvantk --plugin hvantk13 skills in this plugin
/ancestry-inferenceUse when samples of a cohort must be assigned a continental ancestry with hvantk: building a labelled reference MatrixTable from 1000 Genomes, running the PCA and random-forest pipeline as a Slurm job, and reading the predictions and their confidence. Also when the pipeline refuses for too few shared variants, mixed genome builds or a missing label column, or when many samples come back unassigned./callset-subset-exportUse when a sample subset of a joint callset must be delivered as a verified VCF: subsetting the lossless VDS by sample list, densifying and exporting with hvantk, verifying header samples and record counts, writing checksums and a manifest, per contig for large callsets. Also when sample names in a list do not match the callset, when per-contig VCFs refuse to concatenate, or when a delivery must go to a read-only share./cohort-attach-burdenUse when turning a case/control cohort into a gene-level table hvantk can join and rank: running the gene burden test on a cleaned MatrixTable (hvantk cohort burden), writing or checking the cohort manifest (hvantk cohort validate), and attaching the cohort's gene table to the gene index or the composed annotation matrix (hvantk cohort attach) as Slurm jobs, or attaching a gene-level table you already have. Also when attach stops with "mapped ... below the required", "duplicate row(s) for gene key", "missing declared column(s)" or "needs --hgnc", or burden rejects multi-allelic rows or an undefined case/control field./dataset-build-at-scaleUse when building one or many hvantk datasets with hvantk reprocess on a Slurm cluster from staged raw files: raw-directory conventions, staging downloads on the login node, fanning independent builds out as one array job, verifying every output against its plugin's committed schema contract, and checking upstream drift before a build. Also when a build fails with "expected exactly one file matching", "requires data you supply yourself", an HTTP error on a compute node, or an output-extension error./drift-triageUse when hvantk drift or a drift-bot pull request reports a dataset as drifted or its probe as failed: classifying the signal (routine content change, schema change, broken probe), choosing between accepting the new fingerprint and repairing the plugin, rebuilding and verifying the dataset against its committed snapshots, and recording the fingerprint, the rebuild-ledger row and the rebuild. Also when a build that used to work fails with a missing column, a key field not found, or a header marker not found./gene-indexUse when building the gene index that gene-level annotations, cohort tables and rankings join onto (hvantk annotate spine) from the Ensembl gene-structure and HGNC datasets on a Slurm cluster: staging and building the two inputs, choosing the biotype, checking the gene count and the HGNC mapping rate, writing a receipt, and adding annotation axes onto it with hvantk annotate prepare and compose. Also when the gene index comes out empty, the mapping rate is far below what you expect, or a build stops with "HGNC join changed the row count" or "needs --hgnc".