Skip to content

feat(app): add QMRA wiki library, pooling, and pooled-data exploration - #40

Merged
seanthimons merged 6 commits into
mainfrom
feat/app-library
Oct 29, 2026
Merged

seanthimons merged 6 commits into
mainfrom
feat/app-library

Conversation

@seanthimons

Copy link
Copy Markdown
Owner

Summary

  • Add Library and Pooling tabs for browsing QMRA wiki experiments, checking poolability, and sending selected data to Fit.
  • Preserve per-study metadata through pooling so Plots can colour observed points and Explore can inspect sub-study observations.
  • Reject mixed dose units during pooling and document the workflow and interpretation limits.

Testing

  • Rscript dev/run_tests.R — 516 tests passed.
  • Visually checked the pooled sub-study overlay plot.

Upload the QMRA wiki workbook (or use a 14-experiment sample), filter
experiments by normalised metadata, and plot preferred-model curves
faceted and coloured by pathogen group, outcome, dose unit, host, route,
or model. One fittable experiment can be sent to the Data and Fit tabs
with its study id, host, unit, and endpoint. Groundwork for #35.
The Data tab is now the single place to load data: delimited files and
the Ward example become the dataset Fit analyses, while an .xlsx QMRA
wiki workbook (or the bundled sample) is loaded for the Library tab,
which keeps exploration and send-to-Fit. A bad workbook reports its
error and keeps the previous one.

The Library plot no longer collapses in the fillable layout ("figure
margins too large"), and narrow facets get power-of-ten dose labels
and wrapped panel titles.
poolability_test(), fit_pooled_dose_response(), poolability_combinations(),
and group_datasets() now check dose_unit metadata before fitting. When any
dataset records a dose_unit, every dataset must record one and all must
name the same unit (ignoring case and surrounding spaces); otherwise the
error lists each dataset's unit. Datasets without unit metadata are not
checked. Hosts and endpoints are still not enforced. Refs #21.

BREAKING CHANGE: calls that pooled or tested datasets recording different
dose units, or a unit on only some datasets, now error instead of running.
Choose a pooling set on the Library tab and test it on the new Pooling
tab with singlehit's poolability_test() and fit_pooled_dose_response().
A written rationale is required before each run, and every run goes into
a session log (rationale, acknowledged warnings, p-values, workbook) that
counts unadjusted tests and downloads as CSV. Results show the LRT with a
low-power caveat, separate versus pooled fits, the spread of parameter
estimates, and the wiki's own pooled entry when one matches (21 + 23
reproduces the wiki's "21,23"). Data-driven grouping is not offered.

The checks live in one pool_rules table and are a deliberately loose,
tunable first cut: only data problems and dose units block; outcome,
host, route, and pathogen differences warn. Refs #35, #20.
- Add strain/isolate metadata and filters to the experiment library
- Add exploratory poolability grouping, logging, and data-informed set notices
- Send pooled experiments to Data and Fit; add Cryptosporidium sample data and pooling article
- Carry per-experiment dose groups into Plots and Explore
- Colour pooled observations by sub-study metadata and inspect fitted values
@seanthimons seanthimons changed the title Add QMRA wiki library, pooling, and pooled-data exploration feat(app): add QMRA wiki library, pooling, and pooled-data exploration Oct 28, 2026
@seanthimons
seanthimons merged commit b5dde17 into main Oct 29, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant