data = FileAttachment("dashboard/data.json").json()
k = data.kpis
fmt = (n) => (n == null ? "—" : n.toLocaleString("en-US"))
fmtP = (p) => (p == null ? "—" : p < 1e-3 ? p.toExponential(1) : p.toFixed(3))
phen = (id) => data.vocab.phenotype_labels[id] ?? id
stress = (id) => data.vocab.stressor_labels[id] ?? id
TIER = new Map([["high_priority_cross_study", "High priority"], ["multi_omics_convergence", "Multi-omics"], ["emerging", "Emerging"]])
clip = (v, n) => (v && v.length > n ? htl.html`<span title="${v}">${v.slice(0, n - 1).trimEnd()}…</span>` : v ?? "")
// "Calla B, Thompson NF, Burge CA (2026)" -> "Calla et al. (2026)"
shortCite = (c) => {
const m = (c ?? "").match(/^([^,(]+?)\s+[A-Z]{1,3}\b.*?(\(\d{4}[a-z]?\))/);
if (!m) return c ?? "";
const nAuthors = c.slice(0, c.indexOf(m[2])).split(",").length;
return `${m[1]}${nAuthors > 2 ? " et al." : nAuthors === 2 ? " and coauthor" : ""} ${m[2]}`;
}
// ["Disease resistance", "Disease susceptibility"] -> "Disease resistance / susceptibility"
joinLabels = (labels) => {
if (labels.length < 2) return labels.join("");
const first = labels[0].split(" ")[0];
return labels.every(l => l.startsWith(first + " "))
? `${first} ${labels.map(l => l.slice(first.length + 1).toLowerCase()).join(" / ")}`
: labels.join(" / ");
}
missing = Object.entries(data.artifacts_present).filter(([, v]) => !v).map(([n]) => n)AREE: progress and findings
html`<p class="dash-meta">Generated ${data.commit.date} from commit
<a href="${data.repo_url}/commit/${data.commit.sha}"><code>${data.commit.short}</code></a>.
AREE turns public oyster omics datasets into comparable resilience-biomarker evidence
(<a href="about.html">about the resource</a>). Every number is computed from the repository and the pipeline's outputs.
Simulated demo studies are excluded from the numbers and tables below unless marked.</p>
${missing.length ? html`<p><strong>Pipeline outputs missing from this build:</strong> ${missing.join(", ")}. Counts that depend on them read as zero.</p>` : ""}`html`<div class="kpi-grid">
<div class="kpi"><div class="kpi-label">Real studies</div>
<div class="kpi-value">${k.n_studies_real}</div>
<div class="kpi-note">${k.n_studies_simulated} simulated demo studies kept separate</div></div>
<div class="kpi"><div class="kpi-label">Comparisons harmonized</div>
<div class="kpi-value">${k.n_comparisons_real_harmonized} / ${k.n_comparisons_real}</div>
<div class="kpi-note">registered contrasts with evidence in the table</div></div>
<div class="kpi"><div class="kpi-label">Evidence records</div>
<div class="kpi-value">${fmt(k.n_evidence_records_real)}</div>
<div class="kpi-note">one row per gene × comparison</div></div>
<div class="kpi"><div class="kpi-label">High-priority candidates</div>
<div class="kpi-value">${fmt(k.n_candidates_real_high_priority)}</div>
<div class="kpi-note">from ${k.n_real_pools_k2plus} cross-study pool${k.n_real_pools_k2plus === 1 ? "" : "s"}</div></div>
</div>`What the evidence says so far
{
const pools = data.pools.filter(p => !p.simulated);
const classes = data.candidates.by_evidence_class.filter(d => !d.simulated);
const poolText = pools.length
? pools.map(p => `${p.studies.join(" and ")} pool on <em>${phen(p.phenotype)}</em>: ${fmt(p.n_features_k2plus)} genes measured in both, ${fmt(p.n_features_k2plus_significant)} significant after multiple-testing correction`).join("; ")
: "no cross-study pool has formed yet";
const classText = classes.map(d => `${fmt(d.n)} ${d.evidence_class.replace(/_/g, " ")}`).join(", ");
const gap = k.n_real_comparisons_with_resilience_phenotype === 0
? "No real comparison measures a resilience outcome yet."
: `${k.n_real_comparisons_with_resilience_phenotype} of ${k.n_comparisons_real} real comparisons measure a resilience outcome.`;
return html`<p>${poolText}. Ranked candidates by evidence class: ${classText}.</p>
<p>${gap} All real studies so far are RNA-seq pathogen challenges, so the ranked list reflects transcriptional
response to infection, not resistance. A candidate here is an association across the available evidence, not a
validated biomarker. The next curation step is a second stressor class and a study with a measured survival or
pathogen-load phenotype (<a href="candidate_studies.html">candidate studies</a>).</p>`;
}Top candidates
realStudies = data.studies.filter(s => !s.simulated)
// A column whose value is the same in every row is stated once above its table instead.
single = (rows, f) => { const vals = new Set(rows.map(f)); return vals.size === 1 ? [...vals][0] : null; }
topPhen = single(data.candidates.top_real, r => r.phenotype_label)
studyStress = single(realStudies, s => s.stressors.map(stress).join(", "))html`<p>Ranked by tier, then score${topPhen ? html`, all for <em>${topPhen}</em>` : ""}.
Click a gene to open its evidence card; hover a description to see it in full.</p>`Inputs.table(data.candidates.top_real, {
columns: ["feature_id_standardized", "gene_description", ...(topPhen ? [] : ["phenotype_label"]),
"tier", "k_studies", "pooled_effect", "adjusted_p_value"],
header: {feature_id_standardized: "Gene", gene_description: "Description", phenotype_label: "Phenotype",
tier: "Tier", k_studies: "Studies", pooled_effect: "log2FC", adjusted_p_value: "Adj. p"},
format: {
feature_id_standardized: (v, i, rows) => rows[i].card_page ? htl.html`<a href="${rows[i].card_page}">${v}</a>` : v,
gene_description: v => clip(v, 38),
tier: v => TIER.get(v) ?? v,
pooled_effect: v => (v == null ? "—" : v.toFixed(2)),
adjusted_p_value: fmtP
},
rows: 15, layout: "auto"
})Studies
html`<p>${realStudies.length} real ${realStudies.length === 1 ? "study" : "studies"}${studyStress ? html`, all <em>${studyStress.toLowerCase()}</em> experiments` : ""}.
Hover a citation for the full reference.</p>`Inputs.table(realStudies, {
columns: ["study_id", "citation", ...(studyStress ? [] : ["stressors"]), "phenotypes",
"n_comparisons_harmonized", "n_evidence_records"],
header: {study_id: "Study", citation: "Citation", stressors: "Stressor", phenotypes: "Phenotype",
n_comparisons_harmonized: "Harmonized", n_evidence_records: "Records"},
format: {
study_id: (v, i, rows) => htl.html`<a href="${data.repo_url}/blob/main/${rows[i].registry_file}">${v}</a>`,
citation: (v, i, rows) => rows[i].doi ? htl.html`<a href="https://doi.org/${rows[i].doi}" title="${v}">${shortCite(v)}</a>` : shortCite(v),
stressors: v => v.map(stress).join(", "),
phenotypes: v => joinLabels(v.map(phen)),
n_comparisons_harmonized: (v, i, rows) => `${v} of ${rows[i].n_comparisons}`,
n_evidence_records: fmt
},
rows: 10, layout: "auto"
})html`<p class="dash-meta">${data.tests.n_tests} automated tests, ${data.activity.n_commits} commits since ${data.activity.first_commit_date}.
Details: <a href="implementation_status.html">implementation status</a> ·
<a href="${data.repo_url}">source repository</a>.
Built by <code>aree build-dashboard</code> and <code>quarto render docs</code> on every push to <code>main</code>.</p>`