/hvantk:dataset-build-at-scale <provider:dataset ...> [--list tasks.tsv --cpus N --mem-gb G --time D-HH:MM:SS --max-concurrent K]from hvantk
Builds hvantk datasets on a Slurm cluster using array jobs: staging raw files, running hvantk reprocess, verifying outputs against schema contracts, and checking upstream drift. Also handles common build failures.
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.
Building and verifying hvantk reprocess datasets from raw files already staged on
disk, as Slurm jobs. The task-list and array-job machinery is overkill for exactly one
dataset (hpc-hail-job alone covers that), but the raw-dir conventions and the
verification contract below are the same whether it is one or several; the array is
how several independent builds share one Slurm request instead of one submission each.
The outcome, per dataset: the output (a .ht/.mt directory with _SUCCESS, or a
single .h5ad/.parquet file) with its .provenance.json sidecar, a verification
receipt, and run notes carrying the array (or single) job id.
Not this skill: writing or repairing a plugin (the resource specs under
hvantk/skills/<provider>/SKILL.md); triaging a drift signal or a broken probe
(drift-triage).
source "$HVANTK_SITE_PROFILE" && bash "$HVANTK_REPO/skills/_site/check-site-profile.sh";
stop and ask for any missing value (skills/workflow-conventions/SKILL.md section 4).
Every later command that reads a profile value starts with the same
source "$HVANTK_SITE_PROFILE" &&.git -C "$HVANTK_REPO" rev-parse HEAD and
git -C "$HVANTK_REPO" status --porcelain; compare with the commit the user expects.readlink -f "$HVANTK_SIF" and
sha256sum "$(readlink -f "$HVANTK_SIF")".$HVANTK_WORK or similar, never
home.hvantk plugins describe <provider> prints the name, version, and each dataset's
domain/backend, skill path and committed fingerprint path -- nothing about artifact
type, lifecycle or acquisition. Read the manifest itself,
hvantk/skills/<provider>/plugin.yaml: artifact_type decides the output extension
(.ht table, .mt variant matrix, .h5ad expression -- always a single file, never a
directory -- .parquet a pandas-backed table), lifecycle.parse (if present) means a
parse stage and an --intermediate path, and acquisition.mode: byo means you supply
the raw files yourself (the reason and any instructions are printed by reprocess's
own error at build time; see Traps).HVANTK_EGRESS says, downloads happen on the login
node (references/raw-dir-conventions.md); the build jobs themselves always run with
--skip-download, so egress changes who runs the download command and when, not the
procedure below.$HVANTK_WORK/raw/<provider>[/<dataset>]/,
holding only that dataset's files. Full rules, including dated files and
latest_dated, in references/raw-dir-conventions.md.--skip-build skips only the build; it does not skip the parse stage
if the dataset declares one, so this also produces the parsed intermediate:
source "$HVANTK_SITE_PROFILE" && bash "$HVANTK_REPO/skills/hpc-hail-job/templates/run-in-image.sh" -- \
hvantk reprocess provider:dataset --raw-dir "$HVANTK_WORK/raw/provider" \
--output "$HVANTK_WORK/raw/provider/unused.ht" --skip-build --no-check-drift
A download-only --plugin-arg (e.g. genome_build=GRCh38 for clinvar:variants's
downloader) goes on this call; it is not guaranteed to also be accepted by the
builder -- a builder's parameters are not a superset of its downloader's (clinvar's
builder takes reference_genome, a different name for the same thing, and has no
catch-all for an argument it does not declare). For a parse-stage dataset
(uniprot-ptm:sites), give --intermediate an explicit path outside the raw
directory here, so the task line below can reuse it with --skip-parse --intermediate <that same path> instead of re-parsing inside the job. Then, before
spending a job on the build, check upstream has not drifted against the committed
fingerprint: hvantk drift provider:dataset through the same run-in-image.sh
line. A drifted result whose diff touches headers or checksums is a schema
signal: stop and use drift-triage first. A clean or routine result means it is
safe to proceed; so does a probe_failed caused by a network error ("unavailable,
proceed"), but any OTHER probe_failed (the probe raised on content it did fetch)
is itself a signal, same as drifted -- use drift-triage (Traps).<provider:dataset>\t<raw dir>\t<output path>[\t<extra reprocess options>]. Extra
options are build-stage ones, split on plain whitespace exactly as written, with no
quote handling at all (e.g. --plugin-arg reference_genome=GRCh38, or
--skip-parse --intermediate /abs/path for a dataset staged with a parse step); a
value containing a space cannot be expressed in this column.source "$HVANTK_SITE_PROFILE" && bash "$HVANTK_REPO/skills/dataset-build-at-scale/templates/submit-build-array.sh" \
--list "$HVANTK_WORK/out/tasks.tsv" --name <run>-build --cpus 4 --mem-gb 16 \
--time 0-00:30:00 --max-concurrent 3 --dry-run
then without --dry-run. It prints the array job id; write it into your run notes
at once as job: <id>, next to commit: and container: from the preflight.sacct -j <id> -X -o JobID,JobName%30,State,Elapsed, or add
--wait and run it in the background (a foreground wait outlives most tool
timeouts). Read each task's log at <name>_<array id>_<task>.out. One failed task
does not fail the array and does not stop the others; resubmit only the failed
indices with submit-build-array.sh --list <same list> --tasks i,j ... under a new
job name.source "$HVANTK_SITE_PROFILE" && bash "$HVANTK_REPO/skills/hpc-hail-job/templates/submit-hail-job.sh" \
--name <run>-verify --cpus 2 --mem-gb 8 --time 0-00:15:00 --wait -- \
python "$HVANTK_REPO/skills/dataset-build-at-scale/templates/verify-builds.py" \
--list "$HVANTK_WORK/out/tasks.tsv" --receipt "$HVANTK_WORK/out/verify.json"
Details in references/verification.md.run-in-image.sh -- hvantk drift --ledger, same as every other login-node
command here), run it the same way:
source "$HVANTK_SITE_PROFILE" && bash "$HVANTK_REPO/skills/hpc-hail-job/templates/run-in-image.sh" -- \
hvantk drift --mark-rebuilt provider:dataset
and commit the ledger alongside the change that motivated the rebuild.references/sizing-by-dataset.md has the full table. In short: one request sizes every
task in the array, so size it for the list's largest dataset — a dataset an
order of magnitude bigger than the rest (dbNSFP next to HGNC, say) belongs in its own
hpc-hail-job submission, not in the array. --max-concurrent caps how much of the
node share the array can claim at once, independent of how many lines are in the list.
Each task gets its own node-local scratch and its own Hail log directory from
hail-job.sbatch, so concurrent tasks never collide even on the same node. Outputs on
the parallel filesystem are directories of many part files; keep each dataset's dated
raw file and its .provenance.json sidecar discoverable next to its output.
Re-running only the failed indices (--tasks) is the normal way to recover from a
partial array failure, under a fresh job id rather than a retry of the old one.
expected exactly one file matching .... Cause: two files in one raw dir (a stray
second download). Fix: one dataset per raw directory; give --intermediate a path
outside the raw dir for a parse-stage dataset.--skip-download.... requires data you supply yourself (acquisition.mode=byo, reason=...). Cause: a
BYO dataset with an empty or missing --raw-dir. Fix: place the raw file yourself;
this error also names the reason and any instructions the manifest carries.... has no lifecycle.download declared. Cause: a different dataset state from
BYO -- no acquisition block at all, and no downloader written yet (automatable in
principle, just not done). Fix: --skip-download and place the file yourself, or
write the downloader.<dataset> writes .ht ...; got --output ...). Cause: the
artifact type decides the extension (.ht table, .mt variant matrix, .h5ad
expression, .parquet a pandas-backed table), and a mismatch is rejected before the
build runs. Fix: match --output's extension to the manifest's artifact_type.--plugin-arg value arriving as the wrong type. Cause: the coercion rules
(true/false to bool, digits to int, a comma to a list) — a single value that
itself contains a comma cannot be expressed this way. Fix: read the builder's or
downloader's own parameter docstring for the expected type.source_fingerprint: "probe-unavailable:source-unreachable". Cause: a compute
node has no egress for the in-job probe (references/raw-dir-conventions.md). Fix:
nothing -- the real signal is step 2's login-node check, before the build.sacct showing one row <A>_[2-3] for a while after submission. Cause: tasks still
pending can be reported collapsed into one range row. Fix: wait for every task to
reach a terminal state, not for that row to disappear.sacct -j <A> -X -n -o JobID,State), never the submission's own exit code alone.sample_rows.json, or an extra
column the committed schema.json does not list. Cause: the committed snapshot is
fixture-derived, a floor, not an equality target (GenCC's full build carries 17 more
columns than its 14-column fixture). Fix: verify-builds.py checks the snapshot as a
contract (every declared field present, extra allowed) and the sample keys only
informationally; compare row values across your own builds, never against the
fixture's.hvantk: command not found outside the image, or a command that silently wrote
into the wrong checkout. Cause and fix: see workflow-conventions's Runtime rules
(section 4) -- route it through run-in-image.sh, never a bare hvantk or
python -m hvantk..provenance.json sits next to the
output, not inside it, and does not record the raw file's path (see
references/verification.md for its actual fields). Fix: move both together, or
neither.latest_dated plugins (ClinGen, GenCC) but not for one without it
(HGNC). Fix: keep exactly one matching file per raw directory
(references/raw-dir-conventions.md).sacct -j <A> -X -n -o JobID,State — every task row COMPLETED; <A> and <A>_<i>
both count as the array's own ids.verify-builds.py's receipt (references/verification.md): per dataset,
schema_contract_ok true, schema_id_matches true, the row count and the
committed snapshot keys' presence (snapshot_keys_present; no sample rows)
recorded for your own comparison against the next build, and provenance_sha256
tying the verdict to exactly this output._SUCCESS (or, for a single-file .h5ad/.parquet artifact,
exists as a file) and a .provenance.json sidecar naming the schema_id you
expected.commit:, container:, and one job: line per job submitted (the
array counts as one job: line; the verification job is another).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/raw-dir-conventions.md (opens in a new tab)references/sizing-by-dataset.md (opens in a new tab)references/verification.md (opens in a new tab)templates/build-array.sbatch (opens in a new tab)templates/submit-build-array.sh (opens in a new tab)templates/verify-builds.py (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./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"./hpc-containerUse when the hvantk container image must be built from the repository lock file on a cluster without root (fakeroot or proot), validated with the install check, recorded with provenance, or promoted as the default image. Also when a job runs old dependencies although the code is current, when a build fails with "no valid mapping entry found", when check-install fails inside a fresh image, or when the lock file changed.