v2 CN: cn annotate (JSON report, ISCN 2020, cytobands, genes) and the annotation bundle builder
cn call now records per-chromosome and sample statistics (percent het, LRR stats, BAF deviations, robust LogR dev, call rate) in the sidecar; cn annotate writes <sample>.cyto.json (CYTO-033) with ISCN microarray/traditional strings (CYTO-034), bands and RefSeq gene lists (CYTO-035), LOH summaries, weighted median CN (CYTO-026); annotation bundle from UCSC cytoBand + ncbiRefSeq (CYTO-036, IN-054). Tests for ISCN strings, gene overlap, sidecar-missing error and an end-to-end call+annotate.
This commit is contained in:
1 parent
615a6139bf
commit
0bf5576049
6 files changed
+428
-2
No files matched your search
@@ -767,6 +767,32 @@ def cn_call_cmd(
|
||||
run_guarded(rep, lambda: run_cn_call(opts, rep))
|
||||
|
||||
|
||||
@cn_app.command("annotate")
|
||||
def cn_annotate_cmd(
|
||||
vcfs: Annotated[Path, typer.Option("--vcfs", help="Output folder of cn call (required).")],
|
||||
bundle: Annotated[
|
||||
Path | None, typer.Option("--annotation-bundle", help="Bundle from scripts/build_annotation_bundle.sh.")
|
||||
] = None,
|
||||
out: Annotated[Path | None, typer.Option("--out", help="Output folder (default: --vcfs).")] = None,
|
||||
min_qual: Annotated[int, typer.Option("--min-qual", min=0, max=60)] = 20,
|
||||
size_basis: Annotated[str, typer.Option("--size-basis", help="effective|raw")] = "effective",
|
||||
iscn_min_size: Annotated[int, typer.Option("--iscn-min-size", min=0, help="bp")] = 0,
|
||||
force: ForceOpt = False,
|
||||
log_json: LogJson = False,
|
||||
debug: Debug = False,
|
||||
quiet: Quiet = False,
|
||||
) -> None:
|
||||
"""cn call output -> per-sample JSON report with ISCN 2020 strings, cytobands and genes (CLI-029)."""
|
||||
from simurg.pipeline.cn import CnAnnotateOptions, run_cn_annotate
|
||||
|
||||
if size_basis not in ("effective", "raw"):
|
||||
raise typer.BadParameter("--size-basis effective|raw")
|
||||
rep = _reporter("cn annotate", out or vcfs, log_json, debug, quiet)
|
||||
opts = CnAnnotateOptions(vcfs=vcfs, bundle=bundle, out=out, min_qual=min_qual, size_basis=size_basis,
|
||||
iscn_min_size=iscn_min_size, force=force) # fmt: skip
|
||||
run_guarded(rep, lambda: run_cn_annotate(opts, rep))
|
||||
|
||||
|
||||
# --------------------------------------------------------------------------------------------------------
|
||||
methyl_app = typer.Typer(help="Methylation arrays: control QC, detection, beta values (MET-001).")
|
||||
app.add_typer(methyl_app, name="methyl")
|
||||
|
||||
Reference in new issue
Block a user