just_dna_enricher.cli.clinvar_gkm_commands¶
just_dna_enricher.cli.clinvar_gkm_commands ¶
ClinVar-GKM: the clinvar-gkm group — build the indel witness, ask whether it is current, look one up
(RM305). Its own group rather than a clinvar subcommand, because it is ClinGen's transformation under
its own SourceRow, not a second surface of ClinVar.
clinvar_gkm_build_ ¶
clinvar_gkm_build_(
out: Path = typer.Option(
repro_out("clinvar_gkm"),
"--out",
file_okay=False,
help="Output snapshot directory (writes data/*.parquet, LICENSE.txt and release.json).",
),
allele: Path | None = typer.Option(
None,
"--allele",
exists=True,
dir_okay=False,
help="An allele.parquet you already hold.",
),
variation: Path | None = typer.Option(
None,
"--variation",
exists=True,
dir_okay=False,
help="A variation.parquet you already hold.",
),
manifest: Path | None = typer.Option(
None,
"--manifest",
exists=True,
dir_okay=False,
help="The parquet/manifest.json the two files are verified against. Required with --allele/--variation.",
),
keep_downloads: bool = typer.Option(
False,
"--keep-downloads",
help="Keep the ~5 GB of downloaded Parquet under <out>/_downloads.",
),
) -> None
Download ClinVar-GKM's allele and variation Parquet whole, verify both against the set's manifest, and keep the net insertions and deletions on GRCh38 with their VRS id, VCF spelling, ClinVar variation and rsID.
The source overwrites its one Parquet set every week, so the snapshot pins (source_release,
sha256) and a file that does not match the manifest is refused. With local files, all three of
--allele, --variation and --manifest are needed: a file with nothing to verify it against cannot
be labelled with a release.
Source code in enricher/src/just_dna_enricher/cli/clinvar_gkm_commands.py
clinvar_gkm_currency_ ¶
clinvar_gkm_currency_(
snapshot: Path | None = typer.Argument(
None,
exists=True,
file_okay=False,
help="Snapshot directory (default: the resolved cache).",
),
) -> None
Ask the source whether the snapshot is current. Three answers, kept apart: a newer Parquet set exists (rebuild), the set was overwritten under the same release (rebuild), or the set itself lags the newest weekly release (nothing to do but wait). Exits 1 only when a rebuild would help.
Source code in enricher/src/just_dna_enricher/cli/clinvar_gkm_commands.py
clinvar_gkm_lookup_ ¶
clinvar_gkm_lookup_(
key: str = typer.Argument(
...,
help="A VRS id, an rsID, or a one-ALT chrom:start:ref:alt key.",
),
snapshot: Path | None = typer.Option(
None, "--snapshot", exists=True, file_okay=False
),
) -> None
Where the witness places one allele. Nothing found means not witnessed, never placed wrong.