number | string> = {
f: (r) => cellF(r, state.cell) ?? -1,
delta: (r) => (cellF(r, state.cell) ?? -1) - refF(state.cell),
- model: (r) => (isNeighbour(r) ? modelName(r.arm.model) : (r.arm.method ?? "")),
+ model: (r) => (isNeighbour(r) ? armModel(r) : (r.arm.method ?? "")),
scoring: (r) => r.arm.scoring ?? "",
k: (r) => r.arm.depth ?? 0,
time: (r) => r.created_at ?? "",
@@ -88,7 +97,7 @@ export default function DetailView({ view }: { view: PanelView }) {
| {colour ? : null} |
{r.id.slice(0, 8)} |
- {isNeighbour(r) ? modelName(r.arm.model) : armLabel(r)}
+ {isNeighbour(r) ? armModel(r) : armLabel(r)}
{r === ref ? ` (${t("referenceShort")})` : ""}
|
{r.arm.scoring ?? "—"} |
diff --git a/apps/web/lib/windowPanel.ts b/apps/web/lib/windowPanel.ts
index af3883b5..e33658f5 100644
--- a/apps/web/lib/windowPanel.ts
+++ b/apps/web/lib/windowPanel.ts
@@ -47,6 +47,8 @@ export type PanelArm = {
method: string | null;
depth: number | null;
exclude_self: boolean | null;
+ /** Which annotations it transferred; two donor policies of one model are two arms. */
+ donors?: "experimental" | "all" | null;
/** Who left the query's neighbourhood with it: its twins too ("sequence") or
* nobody ("accession"). Null when the run left the rule to the flag. */
self_exclusion?: string | null;
@@ -152,9 +154,19 @@ export function isNeighbour(r: SummaryResult): boolean {
}
/** The arm in full: "ESM-2 650M · embedding_only · k=1", or the method's name. */
+/**
+ * The model as the panel tells arms apart: the PLM, and "exp" when its donors were
+ * experimental annotations only. Keyed by the PLM alone, two donor policies of one
+ * model drew as one series and filtered as one model (2026-11-25).
+ */
+export function armModel(r: SummaryResult): string {
+ const name = modelName(r.arm.model);
+ return r.arm.donors === "experimental" ? `${name} · exp` : name;
+}
+
export function armLabel(r: SummaryResult): string {
if (!isNeighbour(r)) return methodName(r.arm.method) || r.prediction_set_id.slice(0, 8);
- const parts = [modelName(r.arm.model), r.arm.scoring ?? "candidates"];
+ const parts = [armModel(r), r.arm.scoring ?? "candidates"];
if (r.arm.depth != null) parts.push(`k=${r.arm.depth}`);
if (r.arm.self_exclusion === "accession") parts.push("self by accession");
return parts.join(" · ");
@@ -162,13 +174,17 @@ export function armLabel(r: SummaryResult): string {
/** Two arms that differ only in which proteins left with the query are two arms. */
export function sameExclusion(a: SummaryResult["arm"], b: SummaryResult["arm"]): boolean {
- return a.exclude_self === b.exclude_self && (a.self_exclusion ?? null) === (b.self_exclusion ?? null);
+ return (
+ a.exclude_self === b.exclude_self &&
+ (a.self_exclusion ?? null) === (b.self_exclusion ?? null) &&
+ (a.donors ?? null) === (b.donors ?? null)
+ );
}
/** The arm in a few characters, for rows and cells: "650M emb k=1". */
export function armShort(r: SummaryResult): string {
if (!isNeighbour(r)) return methodName(r.arm.method) || r.prediction_set_id.slice(0, 8);
- const model = modelName(r.arm.model).replace(/^ESM-2 /, "");
+ const model = armModel(r).replace(/^ESM-2 /, "");
const scoring = r.arm.scoring ? (SCORING_SHORT[r.arm.scoring] ?? r.arm.scoring) : "cand";
const self = r.arm.self_exclusion === "accession" ? " acc" : "";
return `${model} ${scoring}${r.arm.depth != null ? ` k=${r.arm.depth}` : ""}${self}`;
@@ -218,7 +234,7 @@ export function visibleResults(results: SummaryResult[], f: PanelFilters): Summa
if (r.arm.reading !== f.reading) return false;
if (!f.superseded && isSuperseded(r)) return false;
if (!isNeighbour(r)) return true;
- if (f.models.length && !f.models.includes(modelName(r.arm.model))) return false;
+ if (f.models.length && !f.models.includes(armModel(r))) return false;
if (f.scorings.length && !f.scorings.includes(r.arm.scoring ?? "")) return false;
if (f.depths.length && (r.arm.depth == null || !f.depths.includes(r.arm.depth))) return false;
return true;
@@ -236,7 +252,7 @@ export function referenceOf(shown: SummaryResult[], asked: string | null): Summa
export function modelsOf(results: SummaryResult[]): string[] {
const seen: string[] = [];
for (const r of results) {
- const name = isNeighbour(r) ? modelName(r.arm.model) : null;
+ const name = isNeighbour(r) ? armModel(r) : null;
if (name && !seen.includes(name)) seen.push(name);
}
return seen;
diff --git a/apps/web/messages/de.json b/apps/web/messages/de.json
index f8e75618..1ddf3178 100644
--- a/apps/web/messages/de.json
+++ b/apps/web/messages/de.json
@@ -1201,7 +1201,11 @@
},
"statDelta": "Delta-Proteine",
"statsTitle": "Statistiken des Sets",
- "title": "CAFA-Evaluierung"
+ "title": "CAFA-Evaluierung",
+ "strataCta": {
+ "title": "Ergebnisse nach Schicht",
+ "body": "Jeder Arm in den neun Zellen, aufgeteilt nach Sequenzidentität zum nächsten annotierten Protein und nach Länge, mit n in jedem Band."
+ }
},
"scoring": {
"title": "Scoring",
diff --git a/apps/web/messages/en.json b/apps/web/messages/en.json
index f4ee9b88..207b087f 100644
--- a/apps/web/messages/en.json
+++ b/apps/web/messages/en.json
@@ -1200,7 +1200,11 @@
},
"statDelta": "delta proteins",
"statsTitle": "Set stats",
- "title": "CAFA Evaluation"
+ "title": "CAFA Evaluation",
+ "strataCta": {
+ "title": "Results by stratum",
+ "body": "Every arm in the nine cells, opened by sequence identity to the nearest annotated protein and by length, with n in each band."
+ }
},
"scoring": {
"title": "Scoring Configs",
diff --git a/apps/web/messages/es.json b/apps/web/messages/es.json
index 40c66c5f..893a7d00 100644
--- a/apps/web/messages/es.json
+++ b/apps/web/messages/es.json
@@ -1200,7 +1200,11 @@
},
"statDelta": "proteínas del delta",
"statsTitle": "Estadísticas del conjunto",
- "title": "Evaluación CAFA"
+ "title": "Evaluación CAFA",
+ "strataCta": {
+ "title": "Resultados por estrato",
+ "body": "Cada brazo en las nueve celdas, abiertas por identidad de secuencia con la proteína anotada más cercana y por longitud, con n en cada banda."
+ }
},
"scoring": {
"title": "Configuraciones de scoring",
diff --git a/apps/web/messages/pt.json b/apps/web/messages/pt.json
index 812ee5ff..e8a106ca 100644
--- a/apps/web/messages/pt.json
+++ b/apps/web/messages/pt.json
@@ -1201,7 +1201,11 @@
},
"statDelta": "proteínas do delta",
"statsTitle": "Estatísticas do conjunto",
- "title": "Avaliação CAFA"
+ "title": "Avaliação CAFA",
+ "strataCta": {
+ "title": "Resultados por estrato",
+ "body": "Cada braço nas nove células, abertas por identidade de sequência com a proteína anotada mais próxima e por comprimento, com n em cada banda."
+ }
},
"scoring": {
"title": "Scoring",
diff --git a/apps/web/messages/zh.json b/apps/web/messages/zh.json
index f719c78a..f3bfd0bd 100644
--- a/apps/web/messages/zh.json
+++ b/apps/web/messages/zh.json
@@ -1201,7 +1201,11 @@
},
"statDelta": "差集蛋白数",
"statsTitle": "评估集统计",
- "title": "CAFA 评估"
+ "title": "CAFA 评估",
+ "strataCta": {
+ "title": "分层结果",
+ "body": "每个方法在九个单元格中的结果,按与最近已注释蛋白的序列一致性和长度分层,并给出每层的 n。"
+ }
},
"scoring": {
"title": "评分配置",
diff --git a/protea/services/_window_summary.py b/protea/services/_window_summary.py
index 2ff3ab5b..daaef111 100644
--- a/protea/services/_window_summary.py
+++ b/protea/services/_window_summary.py
@@ -27,6 +27,7 @@
from sqlalchemy.orm import Session
from protea.core._evaluation_leakage import FITTED_BACKENDS
+from protea.core.ia_regimes import EXPERIMENTAL_EVIDENCE
from protea.core.leakage_guard import Frame, release_ordinal, training_cut_verdict
#: The cells of a result, as the evaluator stores them: ``results[setting][aspect]``.
@@ -57,6 +58,8 @@
ps.meta ->> 'exclude_self_neighbour') AS exclude_self,
coalesce(cand.meta ->> 'self_exclusion',
ps.meta ->> 'self_exclusion') AS self_exclusion,
+ coalesce(cand.meta -> 'donor_policy' -> 'evidence_codes',
+ ps.meta -> 'donor_policy' -> 'evidence_codes') AS donor_codes,
j.payload ->> 'score_reading' AS job_reading
FROM evaluation_result r
JOIN prediction_set ps ON ps.id = r.prediction_set_id
@@ -120,6 +123,14 @@ def _cells(results: dict[str, Any]) -> dict[str, dict[str, Any]]:
return out
+def _donors(codes: list[str] | None) -> str | None:
+ """``experimental`` when the donor policy kept experimental codes only, ``all`` when it
+ kept any other, ``None`` without a recorded policy (a method's set, or an older one)."""
+ if not codes:
+ return None
+ return "experimental" if set(codes) <= set(EXPERIMENTAL_EVIDENCE) else "all"
+
+
def summary_row(row: dict[str, Any], frame: Frame | None = None) -> dict[str, Any]:
"""One result as the panel shows it, on the window ``frame`` spans.
@@ -156,6 +167,8 @@ def summary_row(row: dict[str, Any], frame: Frame | None = None) -> dict[str, An
# Who left with the query: its twins too ("sequence") or nobody
# ("accession"). None when the run left it to the flag.
"self_exclusion": row["self_exclusion"],
+ # Which annotations it transferred: two donor policies of one model are two arms.
+ "donors": _donors(row.get("donor_codes")),
"reading": (results.get("reading") or {}).get("score_reading")
or row["job_reading"]
or "raw",
diff --git a/tests/test_the_window_summary.py b/tests/test_the_window_summary.py
index 6309407f..d9e83357 100644
--- a/tests/test_the_window_summary.py
+++ b/tests/test_the_window_summary.py
@@ -127,6 +127,7 @@ def test_a_neighbour_arm_reads_its_cut_its_exclusion_and_its_reading() -> None:
"depth": 3,
"exclude_self": True,
"self_exclusion": None,
+ "donors": None,
"reading": "percentile_rank",
"leak": "not_fitted",
"training_release": None,
@@ -136,6 +137,16 @@ def test_a_neighbour_arm_reads_its_cut_its_exclusion_and_its_reading() -> None:
assert shown["strata"] is None
+def test_two_donor_policies_of_one_model_are_two_arms() -> None:
+ # 2026-11-25: the ablation ran each PLM with experimental donors and with every code
+ # but ND; keyed by the model alone, the panel drew them as one series.
+ experimental = ["EXP", "IDA", "IPI", "IMP"]
+ everything = ["EXP", "IDA", "IEA", "ISS", "TAS"]
+ assert summary_row(_row(donor_codes=experimental), FRAME)["arm"]["donors"] == "experimental"
+ assert summary_row(_row(donor_codes=everything), FRAME)["arm"]["donors"] == "all"
+ assert summary_row(_row(donor_codes=None), FRAME)["arm"]["donors"] is None
+
+
def test_an_arm_that_excluded_only_the_query_says_so() -> None:
arm = summary_row(_row(self_exclusion="accession"), FRAME)["arm"]
assert (arm["exclude_self"], arm["self_exclusion"]) == (True, "accession")