From ed279bd9f6672f245297af01d0644ba6169b78eb Mon Sep 17 00:00:00 2001 From: Jiahui Chen Date: Thu, 8 Oct 2026 10:46:31 -0500 Subject: [PATCH] Report: BV-BRC-only evidence is not available, not zero, on sequence-only runs (#90) On the --from-fasta route there is no BV-BRC genome, so four score components (virulence_amr, drug_target, essential, human_homolog_penalty) had no possible source but scored 0 like "checked and false". M2 now records them under not_available in m2_pdb/run.json (with the route), the runner reports them as not available instead of claiming BV-BRC rows were used, and the full report shows a not-available note in its header. A provider that ran (--human-homology, --essentiality) clears its component. Co-Authored-By: Claude Opus 5.5 --- docs/01-m1-genome.md | 2 ++ s2f/full_report/render.py | 20 +++++++++++ s2f/m2_triage/__main__.py | 9 +++++ s2f/m2_triage/availability.py | 45 ++++++++++++++++++++++++ s2f/run.py | 7 ++++ tests/test_not_available.py | 66 +++++++++++++++++++++++++++++++++++ 6 files changed, 149 insertions(+) create mode 100644 s2f/m2_triage/availability.py create mode 100644 tests/test_not_available.py diff --git a/docs/01-m1-genome.md b/docs/01-m1-genome.md index 2972878..57c52dc 100644 --- a/docs/01-m1-genome.md +++ b/docs/01-m1-genome.md @@ -18,6 +18,8 @@ BV-BRC is used. Specialty genes, subsystems, coordinates, contigs and the taxonomy tree are recorded under `not_available`, never as empty lists, and `genome.annotation_route` is `"fasta"`. The organism comes only from `--organism`; FASTA headers are never parsed for one. + M2 then lists the score components nothing could measure under `not_available` in + `m2_pdb/run.json`, the runner prints them, and the full report shows them in its header (#90). ## Outputs diff --git a/s2f/full_report/render.py b/s2f/full_report/render.py index 61ba44b..72cd42c 100644 --- a/s2f/full_report/render.py +++ b/s2f/full_report/render.py @@ -747,6 +747,7 @@ def build_page(report: dict[str, Any], m2_run: dict[str, Any] | None = None) -> out.append(f"{esc(note)}") elif note: out.append(f"
{esc(note)}
") + out.extend(_not_available_note(genome, m2_run)) out.append("") out.append("