Skip to content

feat(report): write per-feature HTML and PDF reports with lp_report - #66

Merged
oss6 merged 2 commits into
develfrom
feature/61/feature-report
Oct 28, 2026
Merged

oss6 merged 2 commits into
develfrom
feature/61/feature-report

Conversation

@oss6

@oss6 oss6 commented Oct 28, 2026

Copy link
Copy Markdown
Member

Add lp_report(), which turns a plot pipeline into a report of its features: each page draws the pipeline restricted to a feature, with a table of its annotations and of its detected peak in every sample. Pages are made per value of by (feature_id, name, or any annotation column), and the data is extracted once for the whole report, then narrowed with subset_features(), so large reports do not read the raw files again.

The HTML report is one self-contained file with the plots embedded and a searchable, sortable index linking to each page; the PDF report is one multi-page file with the index first and a page size option. sections toggles the annotation and peak tables and can add the MS2 spectra by precursor, features_per_page and ncol tile several features on a page, and theme styles the report ("plain", "clean", or "journal"). Features with no data are listed as empty, and a page that fails to render is marked as an error rather than stopping the report.

PDF reports need gridExtra and gtable, added to Suggests. A QC trend section is left for when #56 is implemented.

Closes #61.

oss6 added 2 commits October 28, 2026 10:31
Add lp_report(), which turns a plot pipeline into a report of its
features: each page draws the pipeline restricted to a feature, with a
table of its annotations and of its detected peak in every sample. Pages
are made per value of `by` (feature_id, name, or any annotation column),
and the data is extracted once for the whole report, then narrowed with
subset_features(), so large reports do not read the raw files again.

The HTML report is one self-contained file with the plots embedded and a
searchable, sortable index linking to each page; the PDF report is one
multi-page file with the index first and a page size option. `sections`
toggles the annotation and peak tables and can add the MS2 spectra by
precursor, `features_per_page` and `ncol` tile several features on a page,
and `theme` styles the report ("plain", "clean", or "journal"). Features
with no data are listed as empty, and a page that fails to render is
marked as an error rather than stopping the report.

PDF reports need gridExtra and gtable, added to Suggests. A QC trend
section is left for when #56 lands.

Closes #61.
The rt_diff baseline failed on the aarch64 Bioconductor builder: Obiwarp's
adjusted retention times differ there by up to ~5e-4 s. That is well within
the relative tolerance for rt_adj (~3000 s), but not for diff, the small
difference rt_adj - rt_raw, which is often below a second.

The baseline now leaves diff out, as rt_raw and rt_adj are still compared
against the recorded values, and a new test checks that diff is the shift
between the two columns on the data itself.
@oss6
oss6 merged commit c5976b6 into devel Oct 28, 2026
1 check passed
@oss6
oss6 deleted the feature/61/feature-report branch October 29, 2026 10:42
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.

Generate a per-feature HTML or PDF report

1 participant