@extantape/onephylogeny-react 0.0.0-stage → 0.1.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +75 -0
- package/README.md +6 -2
- package/dist/canvas.d.ts +19 -0
- package/dist/canvas.js +132 -0
- package/dist/chunk-RIXPX6T6.js +884 -0
- package/dist/chunk-YY252G72.js +89 -0
- package/dist/icons.d.ts +80 -0
- package/dist/icons.js +8 -0
- package/dist/index.d.ts +160 -0
- package/dist/index.js +48 -0
- package/package.json +64 -3
- package/src/styles.css +63 -0
|
@@ -0,0 +1,884 @@
|
|
|
1
|
+
// src/network.tsx
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
var GROUP_COLORS = ["#2a78d6", "#eb6834", "#1baf7a", "#eda100", "#e87ba4", "#008300", "#6250d6"];
|
|
4
|
+
var OVERFLOW = "#8a8f98";
|
|
5
|
+
var colorFor = (panel, id) => GROUP_COLORS[panel.groups.findIndex((g) => g.id === id)] ?? OVERFLOW;
|
|
6
|
+
function layoutNetwork(n, size = 520) {
|
|
7
|
+
const ids = n.nodes.map((x) => x.id);
|
|
8
|
+
const pos = new Map(ids.map((id, i) => [id, { x: size / 2 + size / 3 * Math.cos(2 * Math.PI * i / Math.max(ids.length, 1)), y: size / 2 + size / 3 * Math.sin(2 * Math.PI * i / Math.max(ids.length, 1)) }]));
|
|
9
|
+
if (ids.length < 2) return new Map(ids.map((id) => [id, { x: size / 2, y: size / 2 }]));
|
|
10
|
+
const unit = size / (2 + Math.sqrt(ids.length) * 2);
|
|
11
|
+
for (let iter = 0; iter < 400; iter++) {
|
|
12
|
+
const cool = 1 - iter / 400;
|
|
13
|
+
const force = new Map(ids.map((id) => [id, { x: 0, y: 0 }]));
|
|
14
|
+
for (let i = 0; i < ids.length; i++) for (let j = i + 1; j < ids.length; j++) {
|
|
15
|
+
const a = pos.get(ids[i]), b = pos.get(ids[j]);
|
|
16
|
+
const dx = a.x - b.x, dy = a.y - b.y, d = Math.max(Math.hypot(dx, dy), 1);
|
|
17
|
+
const push = unit * unit / d / d;
|
|
18
|
+
force.get(ids[i]).x += dx * push;
|
|
19
|
+
force.get(ids[i]).y += dy * push;
|
|
20
|
+
force.get(ids[j]).x -= dx * push;
|
|
21
|
+
force.get(ids[j]).y -= dy * push;
|
|
22
|
+
}
|
|
23
|
+
for (const e of n.edges) {
|
|
24
|
+
const a = pos.get(e.a), b = pos.get(e.b);
|
|
25
|
+
const dx = b.x - a.x, dy = b.y - a.y, d = Math.max(Math.hypot(dx, dy), 1);
|
|
26
|
+
const pull = (d - unit * Math.min(e.steps, 6)) / d / 2;
|
|
27
|
+
force.get(e.a).x += dx * pull;
|
|
28
|
+
force.get(e.a).y += dy * pull;
|
|
29
|
+
force.get(e.b).x -= dx * pull;
|
|
30
|
+
force.get(e.b).y -= dy * pull;
|
|
31
|
+
}
|
|
32
|
+
for (const id of ids) {
|
|
33
|
+
const p = pos.get(id), f = force.get(id);
|
|
34
|
+
const len = Math.hypot(f.x, f.y) || 1;
|
|
35
|
+
const step = Math.min(len, 20 * cool);
|
|
36
|
+
p.x = Math.min(size - 24, Math.max(24, p.x + f.x / len * step));
|
|
37
|
+
p.y = Math.min(size - 24, Math.max(24, p.y + f.y / len * step));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return pos;
|
|
41
|
+
}
|
|
42
|
+
function fitLayout(pos, size, pad) {
|
|
43
|
+
const xs = [...pos.values()].map((p) => p.x), ys = [...pos.values()].map((p) => p.y);
|
|
44
|
+
const [x0, x1, y0, y1] = [Math.min(...xs), Math.max(...xs), Math.min(...ys), Math.max(...ys)];
|
|
45
|
+
const scale = Math.min((size - 2 * pad) / Math.max(x1 - x0, 1), (size - 2 * pad) / Math.max(y1 - y0, 1));
|
|
46
|
+
const ox = (size - (x1 - x0) * scale) / 2, oy = (size - (y1 - y0) * scale) / 2;
|
|
47
|
+
return new Map([...pos].map(([id, p]) => [id, { x: ox + (p.x - x0) * scale, y: oy + (p.y - y0) * scale }]));
|
|
48
|
+
}
|
|
49
|
+
function Pie({ x, y, r, slices }) {
|
|
50
|
+
const total = slices.reduce((s, x2) => s + x2.value, 0);
|
|
51
|
+
if (slices.length === 1) return /* @__PURE__ */ jsx("circle", { cx: x, cy: y, r, fill: slices[0].color, className: "ophy-net-node" });
|
|
52
|
+
let a0 = -Math.PI / 2;
|
|
53
|
+
return /* @__PURE__ */ jsx("g", { className: "ophy-net-node", children: slices.map((s, i) => {
|
|
54
|
+
const a1 = a0 + 2 * Math.PI * s.value / total;
|
|
55
|
+
const large = a1 - a0 > Math.PI ? 1 : 0;
|
|
56
|
+
const d = `M${x},${y} L${x + r * Math.cos(a0)},${y + r * Math.sin(a0)} A${r},${r} 0 ${large} 1 ${x + r * Math.cos(a1)},${y + r * Math.sin(a1)} Z`;
|
|
57
|
+
a0 = a1;
|
|
58
|
+
return /* @__PURE__ */ jsx("path", { d, fill: s.color }, i);
|
|
59
|
+
}) });
|
|
60
|
+
}
|
|
61
|
+
function HaplotypeNetworkFigure({ network, panel, size = 520 }) {
|
|
62
|
+
const label = (id) => panel.groups.find((g) => g.id === id)?.label ?? id;
|
|
63
|
+
const total = network.nodes.reduce((s, n) => s + n.records.length, 0);
|
|
64
|
+
const radius = (k) => 4 + 4 * Math.sqrt(k);
|
|
65
|
+
const biggest = Math.max(0, ...network.nodes.map((n) => radius(n.records.length)));
|
|
66
|
+
const pos = network.nodes.length > 1 ? fitLayout(layoutNetwork(network, size), size, biggest + 6) : layoutNetwork(network, size);
|
|
67
|
+
const groups = panel.groups.filter((g) => network.nodes.some((n) => n.byGroup[g.id]));
|
|
68
|
+
return /* @__PURE__ */ jsxs("figure", { className: "ophy-network", children: [
|
|
69
|
+
/* @__PURE__ */ jsx("ul", { className: "ophy-legend", "aria-label": "Groups", children: groups.map((g) => /* @__PURE__ */ jsxs("li", { children: [
|
|
70
|
+
/* @__PURE__ */ jsx("span", { className: "ophy-swatch", style: { background: colorFor(panel, g.id) }, "aria-hidden": "true" }),
|
|
71
|
+
g.label
|
|
72
|
+
] }, g.id)) }),
|
|
73
|
+
/* @__PURE__ */ jsxs("svg", { viewBox: `0 0 ${size} ${size}`, role: "img", "aria-label": `Haplotype network for window ${network.window}: ${network.nodes.length} haplotypes from ${total} records, ${network.edges.length} links. The table below has the same numbers.`, children: [
|
|
74
|
+
network.edges.map((e) => {
|
|
75
|
+
const a = pos.get(e.a), b = pos.get(e.b);
|
|
76
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
77
|
+
/* @__PURE__ */ jsx("line", { x1: a.x, y1: a.y, x2: b.x, y2: b.y, className: "ophy-net-edge" }),
|
|
78
|
+
e.steps > 1 && /* @__PURE__ */ jsx("text", { x: (a.x + b.x) / 2, y: (a.y + b.y) / 2, className: "ophy-net-steps", textAnchor: "middle", dy: "-3", children: e.steps })
|
|
79
|
+
] }, `${e.a}-${e.b}`);
|
|
80
|
+
}),
|
|
81
|
+
network.nodes.map((n) => {
|
|
82
|
+
const p = pos.get(n.id);
|
|
83
|
+
const slices = Object.entries(n.byGroup).map(([g, value]) => ({ color: colorFor(panel, g), value }));
|
|
84
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
85
|
+
/* @__PURE__ */ jsx("title", { children: `${n.id}: ${n.records.length} records (${Object.entries(n.byGroup).map(([g, k]) => `${label(g)} ${k}`).join(", ")})` }),
|
|
86
|
+
/* @__PURE__ */ jsx("circle", { cx: p.x, cy: p.y, r: radius(n.records.length) + 2, className: "ophy-net-ring" }),
|
|
87
|
+
/* @__PURE__ */ jsx(Pie, { x: p.x, y: p.y, r: radius(n.records.length), slices })
|
|
88
|
+
] }, n.id);
|
|
89
|
+
})
|
|
90
|
+
] }),
|
|
91
|
+
/* @__PURE__ */ jsxs("figcaption", { className: "ophy-muted", children: [
|
|
92
|
+
"Records covering window ",
|
|
93
|
+
network.window,
|
|
94
|
+
" whole (",
|
|
95
|
+
network.columns,
|
|
96
|
+
" columns)",
|
|
97
|
+
network.partial ? `; ${network.partial} partial records left out` : "",
|
|
98
|
+
". Circle area counts records, not animals or population frequency. Links join the closest haplotypes; numbers are differing sites. This is not a tree."
|
|
99
|
+
] }),
|
|
100
|
+
/* @__PURE__ */ jsxs("details", { children: [
|
|
101
|
+
/* @__PURE__ */ jsx("summary", { children: "As a table" }),
|
|
102
|
+
/* @__PURE__ */ jsxs("table", { className: "ophy-table", children: [
|
|
103
|
+
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
104
|
+
/* @__PURE__ */ jsx("th", { children: "Haplotype" }),
|
|
105
|
+
/* @__PURE__ */ jsx("th", { children: "Records" }),
|
|
106
|
+
groups.map((g) => /* @__PURE__ */ jsx("th", { children: g.label }, g.id))
|
|
107
|
+
] }) }),
|
|
108
|
+
/* @__PURE__ */ jsx("tbody", { children: network.nodes.map((n) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
109
|
+
/* @__PURE__ */ jsx("th", { scope: "row", children: n.id }),
|
|
110
|
+
/* @__PURE__ */ jsx("td", { children: n.records.length }),
|
|
111
|
+
groups.map((g) => /* @__PURE__ */ jsx("td", { children: n.byGroup[g.id] ?? 0 }, g.id))
|
|
112
|
+
] }, n.id)) })
|
|
113
|
+
] }),
|
|
114
|
+
/* @__PURE__ */ jsxs("table", { className: "ophy-table", children: [
|
|
115
|
+
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
116
|
+
/* @__PURE__ */ jsx("th", { children: "Link" }),
|
|
117
|
+
/* @__PURE__ */ jsx("th", { children: "Differing sites" })
|
|
118
|
+
] }) }),
|
|
119
|
+
/* @__PURE__ */ jsx("tbody", { children: network.edges.map((e) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
120
|
+
/* @__PURE__ */ jsxs("th", { scope: "row", children: [
|
|
121
|
+
e.a,
|
|
122
|
+
" to ",
|
|
123
|
+
e.b
|
|
124
|
+
] }),
|
|
125
|
+
/* @__PURE__ */ jsx("td", { children: e.steps })
|
|
126
|
+
] }, `${e.a}-${e.b}`)) })
|
|
127
|
+
] })
|
|
128
|
+
] })
|
|
129
|
+
] });
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// src/regionmap.tsx
|
|
133
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
134
|
+
var ECOREGIONS_CREDIT = "Ecoregions: Dinerstein et al. 2017, BioScience 67: 534\u2013545, RESOLVE Ecoregions 2017, CC BY 4.0.";
|
|
135
|
+
var polygons = (g) => !g ? [] : g.type === "Polygon" ? [g.coordinates] : g.coordinates;
|
|
136
|
+
function bbox(f) {
|
|
137
|
+
let [x0, y0, x1, y1] = [Infinity, Infinity, -Infinity, -Infinity];
|
|
138
|
+
for (const poly of polygons(f.geometry)) for (const [x, y] of poly[0] ?? []) {
|
|
139
|
+
x0 = Math.min(x0, x);
|
|
140
|
+
y0 = Math.min(y0, y);
|
|
141
|
+
x1 = Math.max(x1, x);
|
|
142
|
+
y1 = Math.max(y1, y);
|
|
143
|
+
}
|
|
144
|
+
return [x0, y0, x1, y1];
|
|
145
|
+
}
|
|
146
|
+
function RegionMap({ panel, ecoregions, width = 560 }) {
|
|
147
|
+
const owner = /* @__PURE__ */ new Map();
|
|
148
|
+
for (const g of panel.groups) for (const id of g.ecoregions ?? []) owner.set(id, [...owner.get(id) ?? [], g.id]);
|
|
149
|
+
const byId = new Map(ecoregions.features.map((f) => [f.properties.ECO_ID, f]));
|
|
150
|
+
const tagged = [...owner.keys()].map((id) => byId.get(id)).filter((f) => Boolean(f?.geometry));
|
|
151
|
+
const missing = [...owner.keys()].filter((id) => !byId.get(id)?.geometry);
|
|
152
|
+
const groups = panel.groups.filter((g) => g.ecoregions?.length);
|
|
153
|
+
if (!tagged.length) return /* @__PURE__ */ jsx2("p", { className: "ophy-muted", children: "No group is tagged with an ecoregion that these outlines have, so there is no map to draw." });
|
|
154
|
+
const boxes = tagged.map(bbox);
|
|
155
|
+
const [bx0, by0, bx1, by1] = [Math.min(...boxes.map((b) => b[0])), Math.min(...boxes.map((b) => b[1])), Math.max(...boxes.map((b) => b[2])), Math.max(...boxes.map((b) => b[3]))];
|
|
156
|
+
const mx = Math.max((bx1 - bx0) * 0.12, 1), my = Math.max((by1 - by0) * 0.12, 1);
|
|
157
|
+
const [vx0, vy0, vx1, vy1] = [bx0 - mx, by0 - my, bx1 + mx, by1 + my];
|
|
158
|
+
const k = Math.cos((vy0 + vy1) / 2 * Math.PI / 180);
|
|
159
|
+
const scale = width / ((vx1 - vx0) * k);
|
|
160
|
+
const height = Math.round((vy1 - vy0) * scale);
|
|
161
|
+
const project = ([x, y]) => `${((x - vx0) * k * scale).toFixed(1)},${((vy1 - y) * scale).toFixed(1)}`;
|
|
162
|
+
const pathOf = (f) => polygons(f.geometry).map((poly) => poly.map((ring) => `M${ring.map(project).join("L")}Z`).join("")).join("");
|
|
163
|
+
const context = ecoregions.features.filter((f) => f.geometry && !owner.has(f.properties.ECO_ID)).filter((f) => {
|
|
164
|
+
const b = bbox(f);
|
|
165
|
+
return b[2] >= vx0 && b[0] <= vx1 && b[3] >= vy0 && b[1] <= vy1;
|
|
166
|
+
});
|
|
167
|
+
const colorOf = (gid) => GROUP_COLORS[panel.groups.findIndex((g) => g.id === gid)] ?? "#8a8f98";
|
|
168
|
+
const labelOf = (gid) => panel.groups.find((g) => g.id === gid)?.label ?? gid;
|
|
169
|
+
return /* @__PURE__ */ jsxs2("figure", { className: "ophy-regionmap", children: [
|
|
170
|
+
/* @__PURE__ */ jsx2("ul", { className: "ophy-legend", "aria-label": "Groups", children: groups.map((g) => /* @__PURE__ */ jsxs2("li", { children: [
|
|
171
|
+
/* @__PURE__ */ jsx2("span", { className: "ophy-swatch", style: { background: colorOf(g.id) }, "aria-hidden": "true" }),
|
|
172
|
+
g.label
|
|
173
|
+
] }, g.id)) }),
|
|
174
|
+
/* @__PURE__ */ jsxs2("svg", { viewBox: `0 0 ${width} ${height}`, role: "img", "aria-label": `Map of the ecoregions behind ${groups.length} groups: ${groups.map((g) => `${g.label}, ${g.ecoregions.length} ecoregions`).join("; ")}. The table below lists them.`, children: [
|
|
175
|
+
context.map((f) => /* @__PURE__ */ jsx2("path", { d: pathOf(f), className: "ophy-map-context", children: /* @__PURE__ */ jsx2("title", { children: f.properties.ECO_NAME }) }, f.properties.ECO_ID)),
|
|
176
|
+
tagged.map((f) => {
|
|
177
|
+
const gs = owner.get(f.properties.ECO_ID);
|
|
178
|
+
return /* @__PURE__ */ jsx2("path", { d: pathOf(f), fill: colorOf(gs[0]), className: `ophy-map-region${gs.length > 1 ? " ophy-map-shared" : ""}`, children: /* @__PURE__ */ jsx2("title", { children: `${f.properties.ECO_NAME}: ${gs.map(labelOf).join(" and ")}` }) }, f.properties.ECO_ID);
|
|
179
|
+
})
|
|
180
|
+
] }),
|
|
181
|
+
/* @__PURE__ */ jsxs2("figcaption", { className: "ophy-muted", children: [
|
|
182
|
+
"Whole ecoregions tagged by the panel's curators for each group's region; never sampling sites. An ecoregion shared by two groups is outlined in black. A sampled population, not proof of where any animal was collected. ",
|
|
183
|
+
ECOREGIONS_CREDIT,
|
|
184
|
+
missing.length ? ` Not in these outlines: ${missing.join(", ")}.` : ""
|
|
185
|
+
] }),
|
|
186
|
+
/* @__PURE__ */ jsxs2("details", { children: [
|
|
187
|
+
/* @__PURE__ */ jsx2("summary", { children: "As a table" }),
|
|
188
|
+
/* @__PURE__ */ jsxs2("table", { className: "ophy-table", children: [
|
|
189
|
+
/* @__PURE__ */ jsx2("thead", { children: /* @__PURE__ */ jsxs2("tr", { children: [
|
|
190
|
+
/* @__PURE__ */ jsx2("th", { children: "Group" }),
|
|
191
|
+
/* @__PURE__ */ jsx2("th", { children: "Ecoregions" })
|
|
192
|
+
] }) }),
|
|
193
|
+
/* @__PURE__ */ jsx2("tbody", { children: groups.map((g) => /* @__PURE__ */ jsxs2("tr", { children: [
|
|
194
|
+
/* @__PURE__ */ jsx2("th", { scope: "row", children: g.label }),
|
|
195
|
+
/* @__PURE__ */ jsx2("td", { children: g.ecoregions.map((id) => byId.get(id)?.properties.ECO_NAME ?? `ID ${id}`).join("; ") })
|
|
196
|
+
] }, g.id)) })
|
|
197
|
+
] })
|
|
198
|
+
] })
|
|
199
|
+
] });
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// src/comparison.tsx
|
|
203
|
+
import { useId, useState } from "react";
|
|
204
|
+
import {
|
|
205
|
+
CLAIM_CHANGE_TEXT,
|
|
206
|
+
claimName,
|
|
207
|
+
claimsText,
|
|
208
|
+
claimStateText,
|
|
209
|
+
gateChangeText,
|
|
210
|
+
OUTCOME_COLUMNS,
|
|
211
|
+
outcomeCells,
|
|
212
|
+
outcomeTables,
|
|
213
|
+
otherFieldsShown,
|
|
214
|
+
recordsText,
|
|
215
|
+
schemeText,
|
|
216
|
+
settingsText,
|
|
217
|
+
sideText,
|
|
218
|
+
warningsText
|
|
219
|
+
} from "@extantape/onephylogeny-core";
|
|
220
|
+
import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
221
|
+
function ComparisonView({ comparison, initiallyShowSame = false }) {
|
|
222
|
+
const [showSame, setShowSame] = useState(initiallyShowSame);
|
|
223
|
+
const toggle = useId();
|
|
224
|
+
const { runs: r, labels } = comparison;
|
|
225
|
+
const group = (id) => labels.groups[id] ?? id;
|
|
226
|
+
const rec = r.records;
|
|
227
|
+
const same = r.claims.filter((c) => c.change === "same").length;
|
|
228
|
+
const claims = r.claims.filter((c) => showSame || c.change !== "same");
|
|
229
|
+
const warnings = warningsText(comparison);
|
|
230
|
+
const tables = outcomeTables(comparison.outcomes);
|
|
231
|
+
return /* @__PURE__ */ jsxs3("section", { className: "ophy-comparison", "aria-label": `Version ${r.a.version} compared with version ${r.b.version}`, children: [
|
|
232
|
+
/* @__PURE__ */ jsx3("p", { className: "ophy-muted", children: "What differs between the two versions. It doesn't say which is better: choosing the best-looking run after comparing isn't a test." }),
|
|
233
|
+
/* @__PURE__ */ jsxs3("ul", { children: [
|
|
234
|
+
/* @__PURE__ */ jsxs3("li", { children: [
|
|
235
|
+
/* @__PURE__ */ jsx3("strong", { children: "A" }),
|
|
236
|
+
": version ",
|
|
237
|
+
r.a.version,
|
|
238
|
+
". ",
|
|
239
|
+
sideText(r.a)
|
|
240
|
+
] }),
|
|
241
|
+
/* @__PURE__ */ jsxs3("li", { children: [
|
|
242
|
+
/* @__PURE__ */ jsx3("strong", { children: "B" }),
|
|
243
|
+
": version ",
|
|
244
|
+
r.b.version,
|
|
245
|
+
". ",
|
|
246
|
+
sideText(r.b)
|
|
247
|
+
] })
|
|
248
|
+
] }),
|
|
249
|
+
warnings.map((w) => /* @__PURE__ */ jsx3("p", { className: "ophy-warning", role: "note", children: w }, w)),
|
|
250
|
+
/* @__PURE__ */ jsx3("p", { children: settingsText(r) }),
|
|
251
|
+
/* @__PURE__ */ jsx3("h4", { children: "Records" }),
|
|
252
|
+
/* @__PURE__ */ jsx3("p", { children: recordsText(rec) }),
|
|
253
|
+
rec.onlyA.length > 0 && /* @__PURE__ */ jsxs3("p", { children: [
|
|
254
|
+
"Only in A: ",
|
|
255
|
+
rec.onlyA.join(", "),
|
|
256
|
+
"."
|
|
257
|
+
] }),
|
|
258
|
+
rec.onlyB.length > 0 && /* @__PURE__ */ jsxs3("p", { children: [
|
|
259
|
+
"Only in B: ",
|
|
260
|
+
rec.onlyB.join(", "),
|
|
261
|
+
"."
|
|
262
|
+
] }),
|
|
263
|
+
rec.changedGroup.length > 0 && /* @__PURE__ */ jsxs3("table", { className: "ophy-table", children: [
|
|
264
|
+
/* @__PURE__ */ jsx3("caption", { children: "Records that changed group" }),
|
|
265
|
+
/* @__PURE__ */ jsx3("thead", { children: /* @__PURE__ */ jsxs3("tr", { children: [
|
|
266
|
+
/* @__PURE__ */ jsx3("th", { scope: "col", children: "Record" }),
|
|
267
|
+
/* @__PURE__ */ jsx3("th", { scope: "col", children: "Group in A" }),
|
|
268
|
+
/* @__PURE__ */ jsx3("th", { scope: "col", children: "Group in B" })
|
|
269
|
+
] }) }),
|
|
270
|
+
/* @__PURE__ */ jsx3("tbody", { children: rec.changedGroup.map((x) => /* @__PURE__ */ jsxs3("tr", { children: [
|
|
271
|
+
/* @__PURE__ */ jsx3("th", { scope: "row", children: x.record }),
|
|
272
|
+
/* @__PURE__ */ jsx3("td", { children: group(x.a) }),
|
|
273
|
+
/* @__PURE__ */ jsx3("td", { children: group(x.b) })
|
|
274
|
+
] }, x.record)) })
|
|
275
|
+
] }),
|
|
276
|
+
rec.changedEvidence.map((f) => /* @__PURE__ */ jsxs3("details", { children: [
|
|
277
|
+
/* @__PURE__ */ jsxs3("summary", { children: [
|
|
278
|
+
f.records.length,
|
|
279
|
+
" ",
|
|
280
|
+
f.records.length === 1 ? "record" : "records",
|
|
281
|
+
" changed ",
|
|
282
|
+
f.field
|
|
283
|
+
] }),
|
|
284
|
+
/* @__PURE__ */ jsxs3("table", { className: "ophy-table", children: [
|
|
285
|
+
/* @__PURE__ */ jsxs3("caption", { children: [
|
|
286
|
+
f.field,
|
|
287
|
+
" in each version"
|
|
288
|
+
] }),
|
|
289
|
+
/* @__PURE__ */ jsx3("thead", { children: /* @__PURE__ */ jsxs3("tr", { children: [
|
|
290
|
+
/* @__PURE__ */ jsx3("th", { scope: "col", children: "Record" }),
|
|
291
|
+
/* @__PURE__ */ jsx3("th", { scope: "col", children: "A" }),
|
|
292
|
+
/* @__PURE__ */ jsx3("th", { scope: "col", children: "B" })
|
|
293
|
+
] }) }),
|
|
294
|
+
/* @__PURE__ */ jsx3("tbody", { children: f.records.map((x) => /* @__PURE__ */ jsxs3("tr", { children: [
|
|
295
|
+
/* @__PURE__ */ jsx3("th", { scope: "row", children: x.record }),
|
|
296
|
+
/* @__PURE__ */ jsx3("td", { children: x.a ?? "None" }),
|
|
297
|
+
/* @__PURE__ */ jsx3("td", { children: x.b ?? "None" })
|
|
298
|
+
] }, x.record)) })
|
|
299
|
+
] })
|
|
300
|
+
] }, f.field)),
|
|
301
|
+
/* @__PURE__ */ jsx3("h4", { children: "Claims" }),
|
|
302
|
+
/* @__PURE__ */ jsxs3("p", { children: [
|
|
303
|
+
claimsText(r),
|
|
304
|
+
" ",
|
|
305
|
+
same > 0 && /* @__PURE__ */ jsxs3("label", { htmlFor: toggle, children: [
|
|
306
|
+
/* @__PURE__ */ jsx3("input", { id: toggle, type: "checkbox", checked: showSame, onChange: (e) => setShowSame(e.target.checked) }),
|
|
307
|
+
" Show unchanged claims"
|
|
308
|
+
] })
|
|
309
|
+
] }),
|
|
310
|
+
claims.length > 0 && /* @__PURE__ */ jsxs3("table", { className: "ophy-table", children: [
|
|
311
|
+
/* @__PURE__ */ jsxs3("caption", { children: [
|
|
312
|
+
showSame ? "Every claim" : "Claims that changed",
|
|
313
|
+
", with each version's outcome"
|
|
314
|
+
] }),
|
|
315
|
+
/* @__PURE__ */ jsx3("thead", { children: /* @__PURE__ */ jsxs3("tr", { children: [
|
|
316
|
+
/* @__PURE__ */ jsx3("th", { scope: "col", children: "Claim" }),
|
|
317
|
+
/* @__PURE__ */ jsx3("th", { scope: "col", children: "Change" }),
|
|
318
|
+
/* @__PURE__ */ jsx3("th", { scope: "col", children: "A" }),
|
|
319
|
+
/* @__PURE__ */ jsx3("th", { scope: "col", children: "B" })
|
|
320
|
+
] }) }),
|
|
321
|
+
/* @__PURE__ */ jsx3("tbody", { children: claims.map((c) => {
|
|
322
|
+
const others = otherFieldsShown(c);
|
|
323
|
+
return /* @__PURE__ */ jsxs3("tr", { children: [
|
|
324
|
+
/* @__PURE__ */ jsx3("th", { scope: "row", children: claimName(c, labels) }),
|
|
325
|
+
/* @__PURE__ */ jsx3("td", { children: CLAIM_CHANGE_TEXT[c.change] }),
|
|
326
|
+
/* @__PURE__ */ jsx3("td", { children: claimStateText(c.before, c, labels) }),
|
|
327
|
+
/* @__PURE__ */ jsxs3("td", { children: [
|
|
328
|
+
claimStateText(c.after, c, labels),
|
|
329
|
+
(c.gates.length > 0 || others.length > 0) && /* @__PURE__ */ jsxs3("ul", { className: "ophy-muted", children: [
|
|
330
|
+
c.gates.map((g) => /* @__PURE__ */ jsx3("li", { children: gateChangeText(g) }, g.gate)),
|
|
331
|
+
others.length > 0 && /* @__PURE__ */ jsxs3("li", { children: [
|
|
332
|
+
"Also differs in ",
|
|
333
|
+
others.join(", "),
|
|
334
|
+
"."
|
|
335
|
+
] })
|
|
336
|
+
] })
|
|
337
|
+
] })
|
|
338
|
+
] }, `${c.a}|${c.b}|${c.window}`);
|
|
339
|
+
}) })
|
|
340
|
+
] }),
|
|
341
|
+
/* @__PURE__ */ jsx3("h4", { children: "Validation outcomes" }),
|
|
342
|
+
tables.length === 0 ? /* @__PURE__ */ jsx3("p", { children: "Neither version has outcomes by window." }) : /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
343
|
+
/* @__PURE__ */ jsx3("p", { className: "ophy-muted", children: "Each version's own counts, side by side. Each count is out of its tests, with an exact 95% interval; tests from one site or study aren't independent, so the true uncertainty is wider. Two intervals that overlap don't show the versions differ." }),
|
|
344
|
+
tables.map((t) => {
|
|
345
|
+
const differs = t.pairs.filter((p) => !p.same).map((p) => group(p.group));
|
|
346
|
+
const title = `${labels.windows[t.window] ?? t.window}, ${schemeText(t.scheme)}`;
|
|
347
|
+
return /* @__PURE__ */ jsxs3("table", { className: "ophy-table", children: [
|
|
348
|
+
/* @__PURE__ */ jsxs3("caption", { children: [
|
|
349
|
+
title,
|
|
350
|
+
". ",
|
|
351
|
+
differs.length ? `Differs for ${differs.join(", ")}.` : "The same in both versions."
|
|
352
|
+
] }),
|
|
353
|
+
/* @__PURE__ */ jsx3("thead", { children: /* @__PURE__ */ jsxs3("tr", { children: [
|
|
354
|
+
/* @__PURE__ */ jsx3("th", { scope: "col", children: "Group and version" }),
|
|
355
|
+
OUTCOME_COLUMNS.map((h) => /* @__PURE__ */ jsx3("th", { scope: "col", children: h }, h))
|
|
356
|
+
] }) }),
|
|
357
|
+
/* @__PURE__ */ jsx3("tbody", { children: t.pairs.flatMap((p) => [["a", r.a.version, p.a], ["b", r.b.version, p.b]].map(([side, v, row]) => /* @__PURE__ */ jsxs3("tr", { children: [
|
|
358
|
+
/* @__PURE__ */ jsxs3("th", { scope: "row", children: [
|
|
359
|
+
group(p.group),
|
|
360
|
+
", version ",
|
|
361
|
+
v
|
|
362
|
+
] }),
|
|
363
|
+
outcomeCells(row).map((x, i) => /* @__PURE__ */ jsx3("td", { children: x }, OUTCOME_COLUMNS[i]))
|
|
364
|
+
] }, `${p.group}|${side}`))) })
|
|
365
|
+
] }, `${t.scheme}|${t.window}`);
|
|
366
|
+
})
|
|
367
|
+
] }),
|
|
368
|
+
/* @__PURE__ */ jsx3("p", { className: "ophy-muted", children: "These are counts on a reference panel, not calibrated probabilities, and there is no overall score." })
|
|
369
|
+
] });
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
// src/index.tsx
|
|
373
|
+
import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
374
|
+
var STATUS = {
|
|
375
|
+
consistent: { label: "Consistent", mark: "\u25CF" },
|
|
376
|
+
excluded_within_panel: { label: "Excluded within this panel", mark: "\xD7" },
|
|
377
|
+
not_evaluable: { label: "Not evaluable", mark: "\u2013" },
|
|
378
|
+
inconclusive: { label: "Inconclusive", mark: "?" }
|
|
379
|
+
};
|
|
380
|
+
var statusLabel = (status, labels) => labels?.[status] ?? STATUS[status].label;
|
|
381
|
+
function StatusBadge({ status, labels }) {
|
|
382
|
+
return /* @__PURE__ */ jsxs4("span", { className: `ophy-status ophy-status-${status}`, children: [
|
|
383
|
+
/* @__PURE__ */ jsx4("span", { "aria-hidden": "true", children: STATUS[status].mark }),
|
|
384
|
+
" ",
|
|
385
|
+
statusLabel(status, labels)
|
|
386
|
+
] });
|
|
387
|
+
}
|
|
388
|
+
var groupLabel = (panel, id) => panel.groups.find((g) => g.id === id)?.label ?? id;
|
|
389
|
+
var ORDER = ["consistent", "inconclusive", "excluded_within_panel", "not_evaluable"];
|
|
390
|
+
function summarizeResult(result, panel) {
|
|
391
|
+
const named = (status) => result.findings.filter((f) => f.status === status).map((f) => groupLabel(panel, f.group));
|
|
392
|
+
const consistent = named("consistent");
|
|
393
|
+
const untested = result.candidatesNotEvaluated.map((g) => groupLabel(panel, g));
|
|
394
|
+
if (result.findings.every((f) => f.status === "not_evaluable")) return "Not enough comparable data to evaluate any group";
|
|
395
|
+
const unknown = untested.length ? ` Not evaluated: ${untested.join(", ")}.` : "";
|
|
396
|
+
if (consistent.length === 1) return `Consistent with ${consistent[0]}.${unknown}`;
|
|
397
|
+
if (consistent.length) return `Can't separate: ${consistent.join(", ")}.${unknown}`;
|
|
398
|
+
if (result.novelty.closest) return `No evaluated group fits. Closest is ${groupLabel(panel, result.novelty.closest)}, which may mean an unsampled population.${unknown}`;
|
|
399
|
+
return "Inconclusive against this panel";
|
|
400
|
+
}
|
|
401
|
+
function CoverageBars({ panel, queryAligned, queryLabel = "This sample" }) {
|
|
402
|
+
const L = panel.reference.length;
|
|
403
|
+
const rowH = 26;
|
|
404
|
+
const labelW = 190;
|
|
405
|
+
const W = 700;
|
|
406
|
+
const x = (p) => labelW + p / L * (W - labelW - 8);
|
|
407
|
+
const queryWindows = [];
|
|
408
|
+
if (queryAligned) {
|
|
409
|
+
let start = -1;
|
|
410
|
+
for (let i = 0; i <= queryAligned.length; i++) {
|
|
411
|
+
const has = i < queryAligned.length && /[ACGTRYSWKMBDHVacgt]/.test(queryAligned[i]);
|
|
412
|
+
if (has && start < 0) start = i;
|
|
413
|
+
if (!has && start >= 0) {
|
|
414
|
+
queryWindows.push({ start, end: i });
|
|
415
|
+
start = -1;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
const rows = [...queryAligned ? [{ id: "__q", label: queryLabel, windows: queryWindows }] : [], ...panel.groups.map((g) => ({ id: g.id, label: g.label, windows: g.coverage.flatMap((c) => c.columnsAtDepth.map(([start, end]) => ({ start, end }))) }))];
|
|
420
|
+
const H = rows.length * rowH + 24;
|
|
421
|
+
return /* @__PURE__ */ jsxs4("svg", { className: "ophy-coverage", viewBox: `0 0 ${W} ${H}`, role: "img", "aria-label": `Coverage of each group across ${L} reference columns`, children: [
|
|
422
|
+
rows.map((r, i) => /* @__PURE__ */ jsxs4("g", { transform: `translate(0 ${i * rowH})`, children: [
|
|
423
|
+
/* @__PURE__ */ jsx4("text", { x: labelW - 8, y: 16, textAnchor: "end", className: "ophy-coverage-label", children: r.label }),
|
|
424
|
+
/* @__PURE__ */ jsx4("rect", { x: x(0), y: 7, width: x(L) - x(0), height: 12, rx: 3, className: "ophy-coverage-track" }),
|
|
425
|
+
r.windows.map((w) => /* @__PURE__ */ jsx4("rect", { x: x(w.start), y: 7, width: Math.max(2, x(w.end) - x(w.start)), height: 12, rx: 3, className: r.id === "__q" ? "ophy-coverage-query" : "ophy-coverage-group", children: /* @__PURE__ */ jsx4("title", { children: `${r.label}: columns ${w.start + 1} to ${w.end}` }) }, w.start))
|
|
426
|
+
] }, r.id)),
|
|
427
|
+
/* @__PURE__ */ jsx4("text", { x: x(0), y: H - 6, className: "ophy-coverage-axis", children: "1" }),
|
|
428
|
+
/* @__PURE__ */ jsx4("text", { x: x(L), y: H - 6, textAnchor: "end", className: "ophy-coverage-axis", children: L })
|
|
429
|
+
] });
|
|
430
|
+
}
|
|
431
|
+
var PAIR_REASON = {
|
|
432
|
+
"decisive-sites": "Decisive sites agree",
|
|
433
|
+
"group-not-evaluable": "At least one group can't be compared here",
|
|
434
|
+
"no-sites-covered": "This sequence covers no site that separates them",
|
|
435
|
+
"too-few-decisive-sites": "Too few separating sites covered",
|
|
436
|
+
"sites-disagree": "Separating sites disagree",
|
|
437
|
+
"thin-group": "Sites favor one side, but the other has too few independent sites to rule out"
|
|
438
|
+
};
|
|
439
|
+
var PAIR_STATE = { resolved: "Resolved", not_resolved: "Not resolved", not_evaluable: "Not evaluable" };
|
|
440
|
+
function PairTable({ result, panel }) {
|
|
441
|
+
if (!result.pairs.length) return null;
|
|
442
|
+
return /* @__PURE__ */ jsxs4("table", { className: "ophy-table", children: [
|
|
443
|
+
/* @__PURE__ */ jsx4("thead", { children: /* @__PURE__ */ jsxs4("tr", { children: [
|
|
444
|
+
/* @__PURE__ */ jsx4("th", { children: "Pair" }),
|
|
445
|
+
/* @__PURE__ */ jsx4("th", { children: "State" }),
|
|
446
|
+
/* @__PURE__ */ jsx4("th", { children: "Sites covered" }),
|
|
447
|
+
/* @__PURE__ */ jsx4("th", { children: "Why" })
|
|
448
|
+
] }) }),
|
|
449
|
+
/* @__PURE__ */ jsx4("tbody", { children: result.pairs.map((p) => /* @__PURE__ */ jsxs4("tr", { children: [
|
|
450
|
+
/* @__PURE__ */ jsxs4("th", { scope: "row", children: [
|
|
451
|
+
groupLabel(panel, p.a),
|
|
452
|
+
" / ",
|
|
453
|
+
groupLabel(panel, p.b)
|
|
454
|
+
] }),
|
|
455
|
+
/* @__PURE__ */ jsxs4("td", { children: [
|
|
456
|
+
PAIR_STATE[p.state],
|
|
457
|
+
p.favors ? `: favors ${groupLabel(panel, p.favors)}` : ""
|
|
458
|
+
] }),
|
|
459
|
+
/* @__PURE__ */ jsxs4("td", { children: [
|
|
460
|
+
p.sitesCovered,
|
|
461
|
+
" (",
|
|
462
|
+
p.forA,
|
|
463
|
+
" and ",
|
|
464
|
+
p.forB,
|
|
465
|
+
p.neither ? `, ${p.neither} neither` : "",
|
|
466
|
+
")"
|
|
467
|
+
] }),
|
|
468
|
+
/* @__PURE__ */ jsx4("td", { children: PAIR_REASON[p.reasonCode] })
|
|
469
|
+
] }, `${p.a}|${p.b}`)) })
|
|
470
|
+
] });
|
|
471
|
+
}
|
|
472
|
+
function ResultView({ result, panel, queryAligned, labels }) {
|
|
473
|
+
const findings = [...result.findings].sort((a, b) => ORDER.indexOf(a.status) - ORDER.indexOf(b.status));
|
|
474
|
+
return /* @__PURE__ */ jsxs4("section", { className: "ophy-result", children: [
|
|
475
|
+
/* @__PURE__ */ jsx4("h3", { children: summarizeResult(result, panel) }),
|
|
476
|
+
/* @__PURE__ */ jsxs4("p", { className: "ophy-muted", children: [
|
|
477
|
+
"Tested against ",
|
|
478
|
+
panel.id,
|
|
479
|
+
" version ",
|
|
480
|
+
panel.version,
|
|
481
|
+
", over ",
|
|
482
|
+
result.overlap,
|
|
483
|
+
" columns."
|
|
484
|
+
] }),
|
|
485
|
+
result.outOfValidatedScope.length > 0 && /* @__PURE__ */ jsxs4("p", { className: "ophy-warning", children: [
|
|
486
|
+
"Outside what this panel has been validated for: ",
|
|
487
|
+
result.outOfValidatedScope.join(". "),
|
|
488
|
+
"."
|
|
489
|
+
] }),
|
|
490
|
+
/* @__PURE__ */ jsx4(CoverageBars, { panel, ...queryAligned ? { queryAligned } : {} }),
|
|
491
|
+
/* @__PURE__ */ jsxs4("table", { className: "ophy-table", children: [
|
|
492
|
+
/* @__PURE__ */ jsx4("thead", { children: /* @__PURE__ */ jsxs4("tr", { children: [
|
|
493
|
+
/* @__PURE__ */ jsx4("th", { children: "Group" }),
|
|
494
|
+
/* @__PURE__ */ jsx4("th", { children: "Status" }),
|
|
495
|
+
/* @__PURE__ */ jsx4("th", { children: "Why" }),
|
|
496
|
+
/* @__PURE__ */ jsx4("th", { children: "Nearest records" })
|
|
497
|
+
] }) }),
|
|
498
|
+
/* @__PURE__ */ jsx4("tbody", { children: findings.map((f) => /* @__PURE__ */ jsxs4("tr", { children: [
|
|
499
|
+
/* @__PURE__ */ jsx4("th", { scope: "row", children: groupLabel(panel, f.group) }),
|
|
500
|
+
/* @__PURE__ */ jsx4("td", { children: /* @__PURE__ */ jsx4(StatusBadge, { status: f.status, ...labels ? { labels } : {} }) }),
|
|
501
|
+
/* @__PURE__ */ jsx4("td", { children: f.reason }),
|
|
502
|
+
/* @__PURE__ */ jsx4("td", { children: f.evidence.join(", ") || "\u2013" })
|
|
503
|
+
] }, f.group)) })
|
|
504
|
+
] }),
|
|
505
|
+
/* @__PURE__ */ jsx4(PairTable, { result, panel }),
|
|
506
|
+
result.novelty.neitherSideSites > 0 && /* @__PURE__ */ jsxs4("p", { className: "ophy-muted", children: [
|
|
507
|
+
result.novelty.neitherSideSites,
|
|
508
|
+
" separating sites hold a base matching neither group."
|
|
509
|
+
] }),
|
|
510
|
+
result.caveats.length > 0 && /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
511
|
+
/* @__PURE__ */ jsx4("h4", { children: "What this can't tell you" }),
|
|
512
|
+
/* @__PURE__ */ jsx4("ul", { className: "ophy-caveats", children: result.caveats.map((c) => /* @__PURE__ */ jsx4("li", { children: c }, c)) })
|
|
513
|
+
] })
|
|
514
|
+
] });
|
|
515
|
+
}
|
|
516
|
+
function LineageCard({ result, panel, marker, title = "Maternal lineage", note = "Not evidence of where this animal was collected.", href }) {
|
|
517
|
+
return /* @__PURE__ */ jsxs4("aside", { className: "ophy-card", children: [
|
|
518
|
+
/* @__PURE__ */ jsx4("div", { className: "ophy-card-title", children: title }),
|
|
519
|
+
/* @__PURE__ */ jsx4("div", { className: "ophy-card-value", children: summarizeResult(result, panel) }),
|
|
520
|
+
/* @__PURE__ */ jsxs4("div", { className: "ophy-muted", children: [
|
|
521
|
+
"Based on ",
|
|
522
|
+
marker,
|
|
523
|
+
", compared with panel version ",
|
|
524
|
+
panel.version,
|
|
525
|
+
". ",
|
|
526
|
+
note
|
|
527
|
+
] }),
|
|
528
|
+
href && /* @__PURE__ */ jsx4("a", { href, children: "See how we reached this" })
|
|
529
|
+
] });
|
|
530
|
+
}
|
|
531
|
+
function PanelSummary({ panel }) {
|
|
532
|
+
return /* @__PURE__ */ jsxs4("section", { children: [
|
|
533
|
+
/* @__PURE__ */ jsxs4("table", { className: "ophy-table", children: [
|
|
534
|
+
/* @__PURE__ */ jsx4("thead", { children: /* @__PURE__ */ jsxs4("tr", { children: [
|
|
535
|
+
/* @__PURE__ */ jsx4("th", { children: "Group" }),
|
|
536
|
+
/* @__PURE__ */ jsx4("th", { children: "Region" }),
|
|
537
|
+
/* @__PURE__ */ jsx4("th", { children: "Records" }),
|
|
538
|
+
/* @__PURE__ */ jsx4("th", { children: "Can show location" }),
|
|
539
|
+
/* @__PURE__ */ jsx4("th", { children: "Comparable in" }),
|
|
540
|
+
/* @__PURE__ */ jsx4("th", { children: "Records still needed" })
|
|
541
|
+
] }) }),
|
|
542
|
+
/* @__PURE__ */ jsx4("tbody", { children: panel.groups.map((g) => /* @__PURE__ */ jsxs4("tr", { children: [
|
|
543
|
+
/* @__PURE__ */ jsx4("th", { scope: "row", children: g.label }),
|
|
544
|
+
/* @__PURE__ */ jsx4("td", { children: g.region ?? "\u2013" }),
|
|
545
|
+
/* @__PURE__ */ jsx4("td", { children: g.evidence.length }),
|
|
546
|
+
/* @__PURE__ */ jsx4("td", { children: g.evidence.filter((e) => e.use === "lineage-and-location").length }),
|
|
547
|
+
/* @__PURE__ */ jsx4("td", { children: g.coverage.filter((c) => c.columnsAtDepth.length).map((c) => c.window).join(", ") || "Nowhere yet" }),
|
|
548
|
+
/* @__PURE__ */ jsx4("td", { children: g.coverage.filter((c) => c.recordsNeeded).map((c) => `${c.recordsNeeded} in ${c.window}`).join(", ") || "\u2013" })
|
|
549
|
+
] }, g.id)) })
|
|
550
|
+
] }),
|
|
551
|
+
/* @__PURE__ */ jsx4(CoverageBars, { panel }),
|
|
552
|
+
/* @__PURE__ */ jsx4("h4", { children: "What separates each pair" }),
|
|
553
|
+
/* @__PURE__ */ jsxs4("table", { className: "ophy-table", children: [
|
|
554
|
+
/* @__PURE__ */ jsx4("thead", { children: /* @__PURE__ */ jsxs4("tr", { children: [
|
|
555
|
+
/* @__PURE__ */ jsx4("th", { children: "Pair" }),
|
|
556
|
+
/* @__PURE__ */ jsx4("th", { children: "Window" }),
|
|
557
|
+
/* @__PURE__ */ jsx4("th", { children: "Sites" }),
|
|
558
|
+
/* @__PURE__ */ jsx4("th", { children: "Records" }),
|
|
559
|
+
/* @__PURE__ */ jsx4("th", { children: "Sites per side" })
|
|
560
|
+
] }) }),
|
|
561
|
+
/* @__PURE__ */ jsx4("tbody", { children: panel.pairs.map((p) => /* @__PURE__ */ jsxs4("tr", { children: [
|
|
562
|
+
/* @__PURE__ */ jsxs4("th", { scope: "row", children: [
|
|
563
|
+
groupLabel(panel, p.a),
|
|
564
|
+
" / ",
|
|
565
|
+
groupLabel(panel, p.b)
|
|
566
|
+
] }),
|
|
567
|
+
/* @__PURE__ */ jsx4("td", { children: p.window }),
|
|
568
|
+
/* @__PURE__ */ jsx4("td", { children: p.state === "not_evaluable" ? "Not evaluable" : p.sites.length }),
|
|
569
|
+
/* @__PURE__ */ jsxs4("td", { children: [
|
|
570
|
+
p.records.a,
|
|
571
|
+
" and ",
|
|
572
|
+
p.records.b
|
|
573
|
+
] }),
|
|
574
|
+
/* @__PURE__ */ jsxs4("td", { children: [
|
|
575
|
+
p.blocks.a,
|
|
576
|
+
" and ",
|
|
577
|
+
p.blocks.b
|
|
578
|
+
] })
|
|
579
|
+
] }, `${p.a}|${p.b}|${p.window}`)) })
|
|
580
|
+
] }),
|
|
581
|
+
panel.notCovered.length > 0 && /* @__PURE__ */ jsxs4("p", { children: [
|
|
582
|
+
/* @__PURE__ */ jsx4("strong", { children: "Not covered:" }),
|
|
583
|
+
" ",
|
|
584
|
+
panel.notCovered.join(", ")
|
|
585
|
+
] }),
|
|
586
|
+
/* @__PURE__ */ jsxs4("p", { className: "ophy-muted", children: [
|
|
587
|
+
"Checksum ",
|
|
588
|
+
panel.checksum
|
|
589
|
+
] })
|
|
590
|
+
] });
|
|
591
|
+
}
|
|
592
|
+
var pct = (a, b) => b ? `${a} of ${b}` : "\u2013";
|
|
593
|
+
var SCHEME = {
|
|
594
|
+
"leave-one-record-out": "Each record (leak check only)",
|
|
595
|
+
"leave-one-haplotype-out": "Each exact haplotype",
|
|
596
|
+
"leave-one-block-out": "Each site (the default claim)",
|
|
597
|
+
"leave-one-study-out": "Each study",
|
|
598
|
+
"leave-one-group-out": "Each whole group"
|
|
599
|
+
};
|
|
600
|
+
function ClaimsView({ claims, panel }) {
|
|
601
|
+
const label = (id) => panel ? groupLabel(panel, id) : id;
|
|
602
|
+
const passed = claims.filter((c) => c.passed);
|
|
603
|
+
return /* @__PURE__ */ jsxs4("section", { children: [
|
|
604
|
+
/* @__PURE__ */ jsx4("h4", { children: "Claims tested" }),
|
|
605
|
+
/* @__PURE__ */ jsxs4("p", { children: [
|
|
606
|
+
passed.length,
|
|
607
|
+
" of ",
|
|
608
|
+
claims.length,
|
|
609
|
+
" passed every gate. All are exploratory until tested on data that didn't shape this method."
|
|
610
|
+
] }),
|
|
611
|
+
/* @__PURE__ */ jsxs4("table", { className: "ophy-table", children: [
|
|
612
|
+
/* @__PURE__ */ jsx4("thead", { children: /* @__PURE__ */ jsxs4("tr", { children: [
|
|
613
|
+
/* @__PURE__ */ jsx4("th", { children: "Pair" }),
|
|
614
|
+
/* @__PURE__ */ jsx4("th", { children: "Window" }),
|
|
615
|
+
/* @__PURE__ */ jsx4("th", { children: "Sites" }),
|
|
616
|
+
/* @__PURE__ */ jsx4("th", { children: "Result" }),
|
|
617
|
+
/* @__PURE__ */ jsx4("th", { children: "Stopped by" })
|
|
618
|
+
] }) }),
|
|
619
|
+
/* @__PURE__ */ jsx4("tbody", { children: claims.map((c) => {
|
|
620
|
+
const failed = c.gates.filter((g) => g.ran && !g.passed);
|
|
621
|
+
return /* @__PURE__ */ jsxs4("tr", { children: [
|
|
622
|
+
/* @__PURE__ */ jsxs4("th", { scope: "row", children: [
|
|
623
|
+
label(c.a),
|
|
624
|
+
" / ",
|
|
625
|
+
label(c.b)
|
|
626
|
+
] }),
|
|
627
|
+
/* @__PURE__ */ jsx4("td", { children: c.window }),
|
|
628
|
+
/* @__PURE__ */ jsxs4("td", { children: [
|
|
629
|
+
c.sites.a,
|
|
630
|
+
" and ",
|
|
631
|
+
c.sites.b
|
|
632
|
+
] }),
|
|
633
|
+
/* @__PURE__ */ jsx4("td", { children: c.passed ? `Passed, ${c.minColumns}+ columns` : "Not validated" }),
|
|
634
|
+
/* @__PURE__ */ jsx4("td", { children: failed.map((g) => g.detail).join(". ") || "\u2013" })
|
|
635
|
+
] }, `${c.a}|${c.b}|${c.window}`);
|
|
636
|
+
}) })
|
|
637
|
+
] })
|
|
638
|
+
] });
|
|
639
|
+
}
|
|
640
|
+
var counted = (c) => c ? `${c.count} of ${c.of} (${Math.round(c.lower * 100)}% to ${Math.round(c.upper * 100)}%)` : "No tests";
|
|
641
|
+
function OutcomeTable({ rows, caption, label }) {
|
|
642
|
+
return /* @__PURE__ */ jsxs4("table", { className: "ophy-table", children: [
|
|
643
|
+
/* @__PURE__ */ jsx4("caption", { children: caption }),
|
|
644
|
+
/* @__PURE__ */ jsx4("thead", { children: /* @__PURE__ */ jsxs4("tr", { children: [
|
|
645
|
+
/* @__PURE__ */ jsx4("th", { scope: "col", children: "Group" }),
|
|
646
|
+
/* @__PURE__ */ jsx4("th", { scope: "col", children: "Records" }),
|
|
647
|
+
/* @__PURE__ */ jsx4("th", { scope: "col", children: "Not testable" }),
|
|
648
|
+
/* @__PURE__ */ jsx4("th", { scope: "col", children: "Sites" }),
|
|
649
|
+
/* @__PURE__ */ jsx4("th", { scope: "col", children: "Named" }),
|
|
650
|
+
/* @__PURE__ */ jsx4("th", { scope: "col", children: "True group kept" }),
|
|
651
|
+
/* @__PURE__ */ jsx4("th", { scope: "col", children: "Wrong" }),
|
|
652
|
+
/* @__PURE__ */ jsx4("th", { scope: "col", children: "Unresolved" }),
|
|
653
|
+
/* @__PURE__ */ jsx4("th", { scope: "col", children: "Not evaluable" })
|
|
654
|
+
] }) }),
|
|
655
|
+
/* @__PURE__ */ jsx4("tbody", { children: rows.map((r) => /* @__PURE__ */ jsxs4("tr", { children: [
|
|
656
|
+
/* @__PURE__ */ jsx4("th", { scope: "row", children: label(r.group) }),
|
|
657
|
+
/* @__PURE__ */ jsx4("td", { children: r.records }),
|
|
658
|
+
/* @__PURE__ */ jsx4("td", { children: r.notTestable }),
|
|
659
|
+
/* @__PURE__ */ jsx4("td", { children: r.sites }),
|
|
660
|
+
/* @__PURE__ */ jsx4("td", { children: counted(r.namedTruth) }),
|
|
661
|
+
/* @__PURE__ */ jsx4("td", { children: counted(r.truthKept) }),
|
|
662
|
+
/* @__PURE__ */ jsx4("td", { children: counted(r.wrong) }),
|
|
663
|
+
/* @__PURE__ */ jsx4("td", { children: r.outcomes.unresolved }),
|
|
664
|
+
/* @__PURE__ */ jsx4("td", { children: r.outcomes.notEvaluable })
|
|
665
|
+
] }, `${r.window}|${r.group}`)) })
|
|
666
|
+
] });
|
|
667
|
+
}
|
|
668
|
+
function OutcomesView({ windows, studyOut, panel }) {
|
|
669
|
+
if (!windows && !studyOut) return null;
|
|
670
|
+
const label = (id) => panel ? groupLabel(panel, id) : id;
|
|
671
|
+
const windowLabel = (id) => panel?.windows.find((w) => w.id === id)?.label ?? id;
|
|
672
|
+
const studyWindows = studyOut ? [...new Set(studyOut.totals.map((r) => r.window))] : [];
|
|
673
|
+
return /* @__PURE__ */ jsxs4("section", { children: [
|
|
674
|
+
/* @__PURE__ */ jsx4("h4", { children: "Outcomes by window" }),
|
|
675
|
+
/* @__PURE__ */ jsx4("p", { className: "ophy-muted", children: "Each test lands in exactly one outcome. Counts come with exact 95% intervals on the number of tests; tests from one site or study aren't independent, so the true uncertainty is wider." }),
|
|
676
|
+
windows?.windows.map((w) => /* @__PURE__ */ jsxs4("div", { children: [
|
|
677
|
+
/* @__PURE__ */ jsx4(OutcomeTable, { rows: w.rows, caption: `${w.label}, holding out each site (${w.separatingSites} separating column${w.separatingSites === 1 ? "" : "s"})`, label }),
|
|
678
|
+
w.separatingSites === 0 && /* @__PURE__ */ jsx4("p", { className: "ophy-warning", children: "No column in this window separates any two groups, so no result here can name a group." })
|
|
679
|
+
] }, w.window)),
|
|
680
|
+
studyOut && studyWindows.map((id) => /* @__PURE__ */ jsx4(OutcomeTable, { rows: studyOut.totals.filter((r) => r.window === id), caption: `${windowLabel(id)}, holding out each study (${studyOut.studies.length} studies)`, label }, `study-${id}`)),
|
|
681
|
+
studyOut && studyOut.recordsWithoutStudy > 0 && /* @__PURE__ */ jsxs4("p", { className: "ophy-muted", children: [
|
|
682
|
+
studyOut.recordsWithoutStudy,
|
|
683
|
+
" records name no study, so they stay in every panel and are never tested here."
|
|
684
|
+
] }),
|
|
685
|
+
[...windows?.diagnostics ?? [], ...studyOut?.diagnostics ?? []].filter((d) => d.severity !== "info").map((d, i) => /* @__PURE__ */ jsx4("p", { className: "ophy-warning", children: d.message }, `${d.code}-${i}`))
|
|
686
|
+
] });
|
|
687
|
+
}
|
|
688
|
+
function ValidationView({ blocks, groups, ladder, claims, panel, windows, studyOut }) {
|
|
689
|
+
const noEvidence = groups.groups.reduce((sum, g) => sum + g.notEvaluable, 0);
|
|
690
|
+
return /* @__PURE__ */ jsxs4("section", { children: [
|
|
691
|
+
/* @__PURE__ */ jsx4("h4", { children: "Holding out each sampling site" }),
|
|
692
|
+
/* @__PURE__ */ jsxs4("table", { className: "ophy-table", children: [
|
|
693
|
+
/* @__PURE__ */ jsx4("thead", { children: /* @__PURE__ */ jsxs4("tr", { children: [
|
|
694
|
+
/* @__PURE__ */ jsx4("th", { children: "Group" }),
|
|
695
|
+
/* @__PURE__ */ jsx4("th", { children: "Sites" }),
|
|
696
|
+
/* @__PURE__ */ jsx4("th", { children: "True group consistent" }),
|
|
697
|
+
/* @__PURE__ */ jsx4("th", { children: "Only the true group" }),
|
|
698
|
+
/* @__PURE__ */ jsx4("th", { children: "Only the true group, all others compared" }),
|
|
699
|
+
/* @__PURE__ */ jsx4("th", { children: "True group excluded" }),
|
|
700
|
+
/* @__PURE__ */ jsx4("th", { children: "Inconclusive" }),
|
|
701
|
+
/* @__PURE__ */ jsx4("th", { children: "Not evaluable" })
|
|
702
|
+
] }) }),
|
|
703
|
+
/* @__PURE__ */ jsx4("tbody", { children: blocks.groups.map((g) => {
|
|
704
|
+
const s = blocks.sites?.find((x) => x.group === g.group);
|
|
705
|
+
return /* @__PURE__ */ jsxs4("tr", { children: [
|
|
706
|
+
/* @__PURE__ */ jsx4("th", { scope: "row", children: g.group }),
|
|
707
|
+
/* @__PURE__ */ jsx4("td", { children: s ? `${s.sitesRight} of ${s.sites} right${s.interval ? `, ${s.interval[0].toFixed(2)} to ${s.interval[1].toFixed(2)}` : ""}` : "\u2013" }),
|
|
708
|
+
/* @__PURE__ */ jsx4("td", { children: pct(g.includedTruth, g.tested) }),
|
|
709
|
+
/* @__PURE__ */ jsx4("td", { children: pct(g.onlyTruth, g.tested) }),
|
|
710
|
+
/* @__PURE__ */ jsx4("td", { children: pct(g.onlyTruthAllEvaluated, g.tested) }),
|
|
711
|
+
/* @__PURE__ */ jsx4("td", { children: pct(g.excludedTruth, g.tested) }),
|
|
712
|
+
/* @__PURE__ */ jsx4("td", { children: pct(g.inconclusive, g.tested) }),
|
|
713
|
+
/* @__PURE__ */ jsx4("td", { children: pct(g.notEvaluable, g.tested) })
|
|
714
|
+
] }, g.group);
|
|
715
|
+
}) })
|
|
716
|
+
] }),
|
|
717
|
+
blocks.untestedGroups.length > 0 && /* @__PURE__ */ jsxs4("p", { className: "ophy-warning", children: [
|
|
718
|
+
"Not tested, because all their records come from one site: ",
|
|
719
|
+
blocks.untestedGroups.join(", "),
|
|
720
|
+
"."
|
|
721
|
+
] }),
|
|
722
|
+
blocks.diagnostics.map((d) => /* @__PURE__ */ jsx4("p", { className: "ophy-warning", children: d.message }, d.code)),
|
|
723
|
+
/* @__PURE__ */ jsx4("h4", { children: "Removing each whole group" }),
|
|
724
|
+
/* @__PURE__ */ jsxs4("p", { children: [
|
|
725
|
+
groups.falseConsistent ?? 0,
|
|
726
|
+
" of ",
|
|
727
|
+
groups.tested,
|
|
728
|
+
" records were wrongly called consistent with a remaining group. Lower is better, and this is how the panel behaves when a sample's true population is missing.",
|
|
729
|
+
noEvidence > 0 ? ` ${noEvidence} of them couldn't be compared with any remaining group, so they say nothing either way.` : ""
|
|
730
|
+
] }),
|
|
731
|
+
ladder && ladder.length > 0 && /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
732
|
+
/* @__PURE__ */ jsx4("h4", { children: "What was held out" }),
|
|
733
|
+
/* @__PURE__ */ jsx4("p", { className: "ophy-muted", children: "Each row answers a different question, so these are never averaged." }),
|
|
734
|
+
/* @__PURE__ */ jsxs4("table", { className: "ophy-table", children: [
|
|
735
|
+
/* @__PURE__ */ jsx4("thead", { children: /* @__PURE__ */ jsxs4("tr", { children: [
|
|
736
|
+
/* @__PURE__ */ jsx4("th", { children: "Held out" }),
|
|
737
|
+
/* @__PURE__ */ jsx4("th", { children: "Tested" }),
|
|
738
|
+
/* @__PURE__ */ jsx4("th", { children: "True group consistent" }),
|
|
739
|
+
/* @__PURE__ */ jsx4("th", { children: "True group excluded" }),
|
|
740
|
+
/* @__PURE__ */ jsx4("th", { children: "Not evaluable" })
|
|
741
|
+
] }) }),
|
|
742
|
+
/* @__PURE__ */ jsx4("tbody", { children: ladder.map((r) => /* @__PURE__ */ jsxs4("tr", { children: [
|
|
743
|
+
/* @__PURE__ */ jsx4("th", { scope: "row", children: SCHEME[r.scheme] }),
|
|
744
|
+
/* @__PURE__ */ jsx4("td", { children: r.tested }),
|
|
745
|
+
/* @__PURE__ */ jsx4("td", { children: r.groups.reduce((n, g) => n + g.includedTruth, 0) }),
|
|
746
|
+
/* @__PURE__ */ jsx4("td", { children: r.groups.reduce((n, g) => n + g.excludedTruth, 0) }),
|
|
747
|
+
/* @__PURE__ */ jsx4("td", { children: r.groups.reduce((n, g) => n + g.notEvaluable, 0) })
|
|
748
|
+
] }, r.scheme)) })
|
|
749
|
+
] })
|
|
750
|
+
] }),
|
|
751
|
+
/* @__PURE__ */ jsx4(OutcomesView, { ...windows ? { windows } : {}, ...studyOut ? { studyOut } : {}, ...panel ? { panel } : {} }),
|
|
752
|
+
claims && /* @__PURE__ */ jsx4(ClaimsView, { claims, ...panel ? { panel } : {} }),
|
|
753
|
+
/* @__PURE__ */ jsx4("p", { className: "ophy-muted", children: "These are simple counts on a small reference panel, and they aren't calibrated probabilities." })
|
|
754
|
+
] });
|
|
755
|
+
}
|
|
756
|
+
function EventLog({ events }) {
|
|
757
|
+
return /* @__PURE__ */ jsx4("ol", { className: "ophy-log", "aria-label": "Run log", children: events.map((e, i) => /* @__PURE__ */ jsxs4("li", { className: `ophy-log-${e.level}`, children: [
|
|
758
|
+
/* @__PURE__ */ jsx4("time", { children: e.at.slice(11, 19) }),
|
|
759
|
+
" ",
|
|
760
|
+
/* @__PURE__ */ jsx4("span", { className: "ophy-log-step", children: e.step }),
|
|
761
|
+
" ",
|
|
762
|
+
e.message
|
|
763
|
+
] }, i)) });
|
|
764
|
+
}
|
|
765
|
+
function parseNewickForDisplay(text) {
|
|
766
|
+
let i = 0;
|
|
767
|
+
const s = text.trim().replace(/;$/, "");
|
|
768
|
+
const node = () => {
|
|
769
|
+
const children = [];
|
|
770
|
+
if (s[i] === "(") {
|
|
771
|
+
i++;
|
|
772
|
+
children.push(node());
|
|
773
|
+
while (s[i] === ",") {
|
|
774
|
+
i++;
|
|
775
|
+
children.push(node());
|
|
776
|
+
}
|
|
777
|
+
if (s[i] !== ")") throw new Error("Unbalanced Newick text");
|
|
778
|
+
i++;
|
|
779
|
+
}
|
|
780
|
+
let label = "";
|
|
781
|
+
while (i < s.length && !",():".includes(s[i])) label += s[i++];
|
|
782
|
+
let length = 0;
|
|
783
|
+
if (s[i] === ":") {
|
|
784
|
+
i++;
|
|
785
|
+
let num = "";
|
|
786
|
+
while (i < s.length && !",()".includes(s[i])) num += s[i++];
|
|
787
|
+
length = Number(num) || 0;
|
|
788
|
+
}
|
|
789
|
+
return { label, length, children };
|
|
790
|
+
};
|
|
791
|
+
return node();
|
|
792
|
+
}
|
|
793
|
+
function TreeFigure({ newick, labelFor, thresholds }) {
|
|
794
|
+
const root = parseNewickForDisplay(newick);
|
|
795
|
+
const tips = [];
|
|
796
|
+
let maxX = 0;
|
|
797
|
+
const pos = /* @__PURE__ */ new Map();
|
|
798
|
+
const walk = (n, x) => {
|
|
799
|
+
maxX = Math.max(maxX, x);
|
|
800
|
+
let y;
|
|
801
|
+
if (!n.children.length) {
|
|
802
|
+
y = tips.length;
|
|
803
|
+
tips.push(n);
|
|
804
|
+
} else {
|
|
805
|
+
const ys = n.children.map((c) => walk(c, x + c.length));
|
|
806
|
+
y = (ys[0] + ys[ys.length - 1]) / 2;
|
|
807
|
+
}
|
|
808
|
+
pos.set(n, { x, y });
|
|
809
|
+
return y;
|
|
810
|
+
};
|
|
811
|
+
walk(root, 0);
|
|
812
|
+
const rowH = 18;
|
|
813
|
+
const treeW = 460;
|
|
814
|
+
const labelW = 300;
|
|
815
|
+
const px = (x) => 12 + (maxX ? x / maxX : 0) * treeW;
|
|
816
|
+
const py = (y) => 14 + y * rowH;
|
|
817
|
+
const lines = [];
|
|
818
|
+
const labels = [];
|
|
819
|
+
const pass = (label) => {
|
|
820
|
+
if (!thresholds?.length) return false;
|
|
821
|
+
const parts = label.split("/").map(Number);
|
|
822
|
+
return parts.length === thresholds.length && parts.every((v, k) => v >= thresholds[k]);
|
|
823
|
+
};
|
|
824
|
+
for (const [n, p] of pos) {
|
|
825
|
+
for (const c of n.children) {
|
|
826
|
+
const q = pos.get(c);
|
|
827
|
+
lines.push({ key: `${p.x}-${q.y}-${q.x}`, d: `M${px(p.x)} ${py(p.y)}V${py(q.y)}H${px(q.x)}` });
|
|
828
|
+
}
|
|
829
|
+
if (n.children.length && n.label) labels.push({ key: `s${p.x}${p.y}`, x: px(p.x) + 3, y: py(p.y) - 3, text: n.label, passes: pass(n.label) });
|
|
830
|
+
}
|
|
831
|
+
return /* @__PURE__ */ jsxs4("svg", { className: "ophy-tree", viewBox: `0 0 ${treeW + labelW + 24} ${tips.length * rowH + 24}`, role: "img", "aria-label": `Tree with ${tips.length} tips`, children: [
|
|
832
|
+
lines.map((l) => /* @__PURE__ */ jsx4("path", { d: l.d, className: "ophy-tree-edge" }, l.key)),
|
|
833
|
+
labels.map((l) => /* @__PURE__ */ jsx4("text", { x: l.x, y: l.y, className: l.passes ? "ophy-tree-support ophy-tree-supported" : "ophy-tree-support", children: l.text }, l.key)),
|
|
834
|
+
tips.map((t) => {
|
|
835
|
+
const p = pos.get(t);
|
|
836
|
+
return /* @__PURE__ */ jsx4("text", { x: px(p.x) + 6, y: py(p.y) + 4, className: "ophy-tree-tip", children: labelFor?.(t.label) ?? t.label }, t.label);
|
|
837
|
+
})
|
|
838
|
+
] });
|
|
839
|
+
}
|
|
840
|
+
function OutgroupLadderView({ steps, suggested, caveat }) {
|
|
841
|
+
return /* @__PURE__ */ jsxs4("section", { children: [
|
|
842
|
+
/* @__PURE__ */ jsx4("ol", { className: "ophy-ladder", children: steps.map((s) => /* @__PURE__ */ jsxs4("li", { className: s.taxon.name === suggested ? "ophy-ladder-suggested" : "", children: [
|
|
843
|
+
/* @__PURE__ */ jsx4("strong", { children: s.taxon.name }),
|
|
844
|
+
" ",
|
|
845
|
+
/* @__PURE__ */ jsxs4("span", { className: "ophy-muted", children: [
|
|
846
|
+
"(",
|
|
847
|
+
s.taxon.rank || "no rank",
|
|
848
|
+
")"
|
|
849
|
+
] }),
|
|
850
|
+
": ",
|
|
851
|
+
s.records,
|
|
852
|
+
" records, ",
|
|
853
|
+
s.species.length,
|
|
854
|
+
" species",
|
|
855
|
+
s.sufficient ? "" : ". Not enough, so looking further out"
|
|
856
|
+
] }, s.taxon.name)) }),
|
|
857
|
+
/* @__PURE__ */ jsx4("p", { className: "ophy-muted", children: caveat })
|
|
858
|
+
] });
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
export {
|
|
862
|
+
GROUP_COLORS,
|
|
863
|
+
layoutNetwork,
|
|
864
|
+
fitLayout,
|
|
865
|
+
HaplotypeNetworkFigure,
|
|
866
|
+
ECOREGIONS_CREDIT,
|
|
867
|
+
RegionMap,
|
|
868
|
+
ComparisonView,
|
|
869
|
+
statusLabel,
|
|
870
|
+
StatusBadge,
|
|
871
|
+
summarizeResult,
|
|
872
|
+
CoverageBars,
|
|
873
|
+
PairTable,
|
|
874
|
+
ResultView,
|
|
875
|
+
LineageCard,
|
|
876
|
+
PanelSummary,
|
|
877
|
+
ClaimsView,
|
|
878
|
+
OutcomesView,
|
|
879
|
+
ValidationView,
|
|
880
|
+
EventLog,
|
|
881
|
+
parseNewickForDisplay,
|
|
882
|
+
TreeFigure,
|
|
883
|
+
OutgroupLadderView
|
|
884
|
+
};
|