一键导入
hvantk-resource-clinvar
Onboard, build, or update the ClinVar resource for hvantk
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Onboard, build, or update the ClinVar resource for hvantk
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Onboard, build, or update the ClinGen Gene-Disease Validity resource for hvantk
Build a Hail Table from GTEx cis-eQTL summary statistics (per-tissue significant variant-gene pairs) for qtlcascade and variant annotation.
Build a Hail Table from the EBI GWAS Catalog v1.0 full-associations TSV for variant-annotation joins.
Build a Hail Table from the Interactome Insider genomic BED (protein-protein interface residues projected to GRCh38) for interval-based variant annotation.
Build a Hail Table from an MSigDB GMT gene-set file (e.g., C2 Canonical Pathways) for enrichment / burden / overlap analyses.
HGNC gene nomenclature lookup table — authoritative human gene symbols, IDs, and cross-references keyed by hgnc_id.
| name | hvantk:resource-clinvar |
| description | Onboard, build, or update the ClinVar resource for hvantk |
| status | provisional |
| backend | hail |
| domain | variants |
This skill covers BUILD and UPDATE of the ClinVar Hail Table. It does NOT cover download (see hvantk/skills/clinvar/cli.py) or downstream analysis.
The builder is build_clinvar in hvantk/skills/clinvar/builder.py. It has the platform builder signature build_clinvar(parsed_input, ctx, *, reference_genome="GRCh38") -> AnnotationTable. There is no input_path / output_path / overwrite / export_tsv signature; the platform's run_builder_for_spec calls artifact.save() to materialize the table.
Provider metadata (URL, version cadence, license, citation) lives in the ClinVar entry inside hvantk/resources/registry/genomics/datasets.json (find by accession: "ClinVar_latest"), surfaced via hvantk catalog show ClinVar_latest. Read that file; do not restate.
Stable note (not in catalog): ClinVar releases monthly. New INFO fields are uncommon but do occur (e.g., the addition of ONCOGENICITY in the oncogenicity supplement).
Hail Table keyed by (locus, alleles). Reasoning: ClinVar is variant-keyed and joins with other variant tables (gnomAD, dbNSFP) downstream. A single Hail Table is the natural fit; nothing about ClinVar requires anndata or pandas.
.vcf.bgz with .tbi index).contig_recoding() helper from hvantk/core/utils/genome.py maps numeric contigs to chr* names.hl.import_vcf(path, force=True, reference_genome=..., contig_recoding=..., skip_invalid_loci=True). The force=True flag is required because ClinVar VCFs contain non-standard headers..rows(), repartition (typical: 100) and key by (locus, alleles).CLNSIG, CLNREVSTAT, CLNDN, CLNDISDB, RS, MC, GENEINFO. The full list comes from the VCF header — read it, do not assume._ (e.g., Likely_pathogenic)., or | depending on the field.CLNDISDB uses , between databases and | between IDs within a database.AnnotationTable wrapping a Hail Table keyed by (locus, alleles), with provenance schema_id="clinvar-variants-v1". The platform writes it to the build --output path. Schema is defined by hvantk/skills/clinvar/tests/snapshots/schema.json (canonical). Human summary: row contains rsid, qual, filters, and an info struct with the ClinVar-specific INFO fields parsed by hl.import_vcf.
build_clinvar in hvantk/skills/clinvar/builder.pyClinVarVariantTableStreamer in hvantk/skills/clinvar/streamers.py (subclass of VariantTableStreamer in hvantk/core/streamers/)clinvar_downloader in hvantk/skills/clinvar/cli.py (registered as hvantk clinvar-download; lifecycle download via download_dataset in the same module)ClinVarDataset in hvantk/skills/clinvar/shared/datasets.pyhvantk reprocess clinvar:variants --raw-dir <dir> --output <path>.ht (pass builder kwargs via --plugin-arg KEY=VALUE, e.g. --plugin-arg reference_genome=GRCh38). The plugin loader (hvantk/core/plugin/loader.py) resolves the dataset from plugin.yaml via get_registry().get_dataset("clinvar:variants"); the build runs through run_builder_for_spec (hvantk/core/plugin/run_builder.py).hvantk/skills/clinvar/plugin.yaml (drives loader registration; compound dataset key clinvar:variants)hvantk/skills/clinvar/tests/test_builder.pyRead the existing files at these paths as ground truth for shape. This skill does not restate code.
When invoked to build or update:
#CHROM header line of the input file.build_clinvar (no shared base helper):
hl.import_vcf(str(parsed_input), force=True, reference_genome=reference_genome, contig_recoding=contig_recoding(), skip_invalid_loci=True).rows().repartition(100).key_by("locus", "alleles")AnnotationTable.from_hail(ht, provenance=ctx.provenance(schema_id="clinvar-variants-v1")). The platform calls artifact.save() to write to disk.pytest hvantk/skills/clinvar/tests -m hail.When ClinVar releases a new monthly version:
hvantk clinvar-download --output-dir /tmp/clinvar.hvantk/skills/clinvar/tests/testdata/raw/clinvar/clinvar_20220403_chr20.vcf.bgz) — this is adequate because ClinVar parsing is INFO-field driven, not chromosome-dependent. Replace the file (re-bgzip if needed). A .tbi index is optional; hl.import_vcf(force=True) reads .bgz directly.pytest hvantk/skills/clinvar/tests -m hail --regenerate-snapshots.fixture: hvantk/skills/clinvar/tests/testdata/raw/clinvar/clinvar_20220403_chr20.vcf.bgzschema_snapshot: hvantk/skills/clinvar/tests/snapshots/schema.jsonrow_snapshot: hvantk/skills/clinvar/tests/snapshots/sample_rows.jsondrift_fingerprint: hvantk/skills/clinvar/tests/drift_fingerprint.jsontest_command: pytest hvantk/skills/clinvar/tests -m hail