just_dna_enricher.cli.clinvar_commands¶
just_dna_enricher.cli.clinvar_commands ¶
ClinVar and its ClinVar-shaped sibling PubMind: the clinvar and pubmind groups (RM260 split this
out of the former single-file cli.py).
clinvar_build_ ¶
clinvar_build_(
vcf: Path | None = typer.Option(
None,
"--vcf",
exists=True,
dir_okay=False,
help="Local ClinVar VCF (.vcf.gz). Omit and pass --download to fetch from NCBI.",
),
download: bool = typer.Option(
False,
"--download",
help="Download the NCBI ClinVar GRCh38 VCF into --out first.",
),
out: Path = typer.Option(
repro_out("clinvar"),
"--out",
file_okay=False,
help="Output snapshot directory (writes data/*.parquet + release.json).",
),
) -> None
Convert a ClinVar VCF into the per-chromosome parquet snapshot the resolver reads.
Source code in enricher/src/just_dna_enricher/cli/clinvar_commands.py
clinvar_publish_ ¶
clinvar_publish_(
snapshot_dir: Path = typer.Argument(
...,
exists=True,
file_okay=False,
help="Built snapshot directory (data/*.parquet + release.json).",
),
repo_id: str | None = typer.Option(
None,
"--repo",
help=f"Target HF dataset (owner/name). Default: {DEFAULT_CLINVAR_REPO_ID}.",
),
commit_message: str | None = typer.Option(
None, "--message", "-m", help="Commit message."
),
dry_run: bool = typer.Option(
False,
"--dry-run",
help="Show what would be uploaded. Reads the repo's file list; uploads nothing.",
),
) -> None
Create-or-update the dataset repo and upload the built ClinVar snapshot (publisher/dev).
Source code in enricher/src/just_dna_enricher/cli/clinvar_commands.py
pubmind_build_ ¶
pubmind_build_(
table: Path | None = typer.Option(
None,
"--table",
exists=True,
dir_okay=False,
help="Local hg38_pubmind_db.txt.gz. Omit and pass --download to fetch it from ANNOVAR.",
),
download: bool = typer.Option(
False,
"--download",
help="Download the ANNOVAR-distributed PubMind table into --out first.",
),
out: Path = typer.Option(
repro_out("pubmind"),
"--out",
file_okay=False,
help="Output snapshot directory (writes data/pubmind.parquet + release.json).",
),
use: str = typer.Option(
"unstated",
"--use",
help="Declared use: unstated | non-commercial | commercial.",
),
) -> None
Reduce the ANNOVAR-distributed PubMind table to the parquet snapshot the checks read.
--use is the declared-use gate, as on clinpgx build (RM320). The table is CC BY-NC-ND 4.0,
answered in writing by WGLab on 2026-09-28, so it forbids sale: commercial refuses, unstated
skips and asks for a declaration, non-commercial proceeds. Until that answer the terms were
unknown, the gate answered the same way for every declaration, and the command carried no flag.
NoDerivatives is why the snapshot this writes may not be passed on — see pubmind publish.
Source code in enricher/src/just_dna_enricher/cli/clinvar_commands.py
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | |
pubmind_publish_ ¶
Refuse to publish the PubMind snapshot, and say why.
The command exists in order to refuse. A missing one reads as an oversight somebody will helpfully add, and the reason belongs where a reader looks for it rather than only in a design document.
Source code in enricher/src/just_dna_enricher/cli/clinvar_commands.py
clinvar_citations_ ¶
clinvar_citations_(
out: Path = typer.Option(
...,
"--out",
file_okay=False,
help="Existing ClinVar snapshot dir.",
),
citations_txt: Path | None = typer.Option(
None,
"--citations",
exists=True,
dir_okay=False,
help="Local var_citations.txt.",
),
download: bool = typer.Option(
False,
"--download",
help="Fetch var_citations.txt first.",
),
url: str = typer.Option(
DEFAULT_CITATIONS_URL,
"--url",
help="Source for --download.",
),
) -> None
Add ClinVar's literature links to a snapshot: data/citations.parquet ([dev], needs polars).
Separate from clinvar build because ClinVar publishes citations separately from the VCF — which
is precisely why a drafted gene panel could not compile without this: studies.csv is mandatory
and the VCF carries no PMIDs. Written beside the snapshot, so an existing cache keeps its bytes.