Repository navigation
feat(report): write per-feature HTML and PDF reports with lp_report - #66
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
sectionstoggles the annotation and peak tables and can add the MS2 spectra by precursor,features_per_pageandncoltile several features on a page, andthemestyles 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.