PGx star alleles: pgx star-allele call (PGX-011..021), probe masks vs 1000G, GeT-RM validation (K-029)
- simurg/pgx/star.py: solver-free diplotype enumeration incl. CN forms (deletion, xN), wildcards, array-equivalence classes, raw_score/score with CPIC frequency priors; calibrated error model (spec PGX-012 amended). - pipeline/pgx_star.py: DB gene models, SNV + PGx CN VCF evidence, masks, diplotype_summary.tsv + pgx_calls.json. - scripts/pgx: derive_masks.py (array vs 1000G 30x over HTTPS, GS calibration), getrm_truth.py, validate_star_getrm.py. - GSA v4 PGx demo vs GeT-RM (16 CEPH): 100/109 gene calls; CYP2D6/2C19/2C9 41/45 (docs/validation/V2_pgx_star.md). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01814GKVzZVL3FuF3DeiZXhv
This commit is contained in:
1 parent
bf9fdaa2f3
commit
d91c8ea576
15 files changed
+1168
-5
No files matched your search
@@ -838,6 +838,37 @@ def pgx_db_build_cmd(
|
||||
run_guarded(rep, lambda: run_db_build(o, rep))
|
||||
|
||||
|
||||
pgx_star_app = typer.Typer(help="Star-allele calling (PGX-011).")
|
||||
pgx_app.add_typer(pgx_star_app, name="star-allele")
|
||||
|
||||
|
||||
@pgx_star_app.command("call")
|
||||
def pgx_star_call_cmd(
|
||||
vcfs: Annotated[list[Path], typer.Option("--vcfs", help="Folder(s) with SNV + PGx CN VCFs (repeatable).")],
|
||||
db: Annotated[Path, typer.Option("--db", help="PGx DB from pgx db build (required).")],
|
||||
out: Annotated[Path, typer.Option("--out", help="Output folder (required).")],
|
||||
population: Annotated[str, typer.Option("--population", help="Frequency prior population.")] = "global",
|
||||
max_candidates: Annotated[int, typer.Option("--max-candidates", min=1)] = 10,
|
||||
feasible_ratio: Annotated[float, typer.Option("--feasible-ratio", min=0.0, max=1.0)] = 0.5,
|
||||
low_gs: Annotated[float, typer.Option("--low-gs")] = 0.15,
|
||||
no_cn: Annotated[bool, typer.Option("--no-cn", help="Run without PGx CN VCFs.")] = False,
|
||||
allow_foreign_vcf: Annotated[bool, typer.Option("--allow-foreign-vcf")] = False,
|
||||
gene: Annotated[list[str] | None, typer.Option("--gene", help="Restrict to gene(s).")] = None,
|
||||
force: ForceOpt = False,
|
||||
log_json: LogJson = False,
|
||||
debug: Debug = False,
|
||||
quiet: Quiet = False,
|
||||
) -> None:
|
||||
"""Call star-allele diplotypes (CLI-033, PGX-012 ... PGX-021)."""
|
||||
from simurg.pipeline.pgx_star import StarOptions, run_star_call
|
||||
|
||||
rep = _reporter("pgx star-allele call", out, log_json, debug, quiet)
|
||||
o = StarOptions(vcfs=vcfs, db=db, out=out, population=population, max_candidates=max_candidates,
|
||||
feasible_ratio=feasible_ratio, low_gs=low_gs, no_cn=no_cn, allow_foreign_vcf=allow_foreign_vcf,
|
||||
genes=gene or [], force=force) # fmt: skip
|
||||
run_guarded(rep, lambda: run_star_call(o, rep))
|
||||
|
||||
|
||||
@pgx_cn_app.command("train")
|
||||
def pgx_cn_train_cmd(
|
||||
gtcs: Annotated[Path, typer.Option("--gtcs", help="Folder searched recursively for training GTCs (required).")],
|
||||
|
||||
Reference in new issue
Block a user