parameters$heatmap_quantilessets which pixel quantiles get a heatmap section, defaulting to the0.25, 0.5, 0.75, 0.95, 0.98that were previously hard-coded, so an existing config renders exactly as before. The useful set depends on the chemistry -- a feature confined to a few pixels shows at the 95th and not at the median, a diffuse one the other way round -- and it is also the lever to pull ifheatmap_scale: "both"makes a report longer than you want, since two quantiles on two scales is usually more informative than five on one.parameters$heatmap_scalealso accepts"both", which draws each quantile section twice -- once on the shared scale and once per-feature -- under sub-headings that say what each one can and cannot be used for. The two answer sequential questions rather than competing ones: the shared panel says which features separate the groups, the per-feature panel says what one feature's profile looks like. Reading them in that order also guards against the per-feature panel's failure mode, where a feature with no group effect is drawn just as vividly as the strongest one."both"is a report setting;contributionHm()itself still draws one heatmap.contributionHm()gainsscale."shared"(default, unchanged behaviour) keeps every feature on one colour scale so features can be compared with each other;"feature"normalises each feature by its own extreme, so every column fills the ramp whatever its actual spread. The second is the reading [quantileHm()] gives, but keeping the group-mean hue and the contribution opacity -- use it to look along one feature, never across features. The legend states which scale is in force. Exposed in the study YAML asparameters$heatmap_scale, and checked byvalidateConfig().- Documented the colour system on both heatmaps.
?quantileHmpreviously mentioned only that z-scores are "clipped to [-1, 1]" and never said the z-scoring is per feature, so nothing warned a reader that its colours are not comparable between features. ?contributionHmgains a section on comparing features with each other: one cap for the panel versus one per column, that"shared"ranks by effect size rather than fold change, that the group-mean z-score is bounded at +/- 1 for a balanced design so the cap can be read as a fraction of the separation the design can show, and the two limits on that comparison (the deviation is estimated from few samples, and is pooled across groups so the scale compresses at the top).?quantileHmgains a section explaining why it has noscaleargument: it colours the per-sample z-score, which is standardised per feature before anything is drawn, so no choice of colour limits can restore a comparison between features.contributionHm()escapes this by colouring the group mean of those z-scores, which is not renormalised per feature.?quantileHmnow records that a feature with no variance across samples is drawn at the bottom of the ramp rather than as missing, so an entirely single-coloured column should be checked against the values. (The behaviour itself is unchanged in this release.)
Changes in response to the Bioconductor package review (Contributions #115).
-
Function names are now camelCase throughout, following the Bioconductor style guidance. The convention applied is: acronyms upper case (
MRM,MSI,SNR,NA), other abbreviations camel (Hm,Cal). Renamed:align_features()toalignFeatures(),bind_panels()tobindPanels(),build_feature_meta()tobuildFeatureMeta(),combine_MSIs()tocombineMSIs(),contribution_hm()tocontributionHm(),create_cal_curve()tocreateCalCurve(),createMSIDatamatrix()tocreateMSIDataMatrix(),generate_txt_images()togenerateTxtImages(),int2snr()toint2SNR(),plot_cal_coverage()toplotCalCoverage(),quant_palettes()toquantPalettes(),quantile_hm()toquantileHm(),read_mrm()toreadMRM(),remove_blank_mzs()toremoveBlankMzs(),run_example()torunExample(),run_study()torunStudy(),select_tissue_pixels()toselectTissuePixels(),stitch_acquisitions()tostitchAcquisitions(),summarise_cal_levels()tosummariseCalLevels(),trim_MSI()totrimMSI(),validate_config()tovalidateConfig(), andzero2na()tozero2NA(). The S3 classquant_validationis nowquantValidation.No deprecated aliases are provided. The package has never appeared in a Bioconductor release, so there are no downstream users to protect and Bioconductor's deprecation cycle does not apply. Existing scripts must be updated. The S4 class
quant_MSImagingExperimentis unchanged. -
Argument checking made consistent. The exported plain functions that did not validate their inputs now do:
alignFeatures(),bindPanels(),trimMSI(),buildFeatureMeta(), and the summarising helper shared byquantileHm()andcontributionHm(). Checks test forMSImagingExperiment, whichquant_MSImagingExperimentextends, so both are accepted.buildFeatureMeta()previously returned a full-height frame ofNArows when the ion library lackedprecursor_mz/product_mz; it now errors. -
?alignFeaturesdocumentedobj1andobj2asquant_MSImagingExperimentwhen the code has always accepted anyMSImagingExperiment. The documentation was wrong and has been corrected. -
Fixed two warnings emitted during report generation.
out-of-range values treated as 0 in coercion to rawcame from rmarkdown's resource discovery: passingintermediates_dir=tormarkdown::render()makes it render a preview copy of the template with a.mdextension, which skips knitr, so an unexpandedsprintfplaceholder in an HTML attribute reachedutils::URLdecode(). The tag is now built withpaste0(). The pandocDiv ... unclosed, closing implicitlywarning came from HTML block fences emitted without surrounding blank lines, whose parse depended on themarkdown_in_html_blocksextension; the fences are now padded, and the statements between them are guarded so an error cannot skip a closing tag. -
The sample-contribution key on
contributionHm()is drawn in neutral grey and labelled low / high. It previously used the top colour of the fill palette, so red meant both "high z-score" and "contributed to the group mean". -
Long feature-class and sample-group legend labels are wrapped, and the report heatmap device is no longer capped at a width that silently cropped the right-hand legends off wide studies.
- Added
contributionHm(), a heatmap that encodes the group mean as hue and each sample's agreement with it as opacity, so a group mean resting on one replicate is visible rather than hidden. - Added
stitchAcquisitions()for assembling several acquisitions of one section into a single image. - Fixed the
combinecheck invalidateConfig(), which referenced the wrong object and sat in the ion-library block rather than the samples block.
- Transitions are now matched to the ion library at unit resolution
(
mz_tolerancedefault0.4, was0.05). A triple quadrupole running MRM selects Q1 and Q3 at unit resolution, so a product ion written as308.1and one written as308.3are the same measurement; matching more tightly than the instrument resolves made annotation depend on how many decimal places were typed into the library. Applies toreadMRM(),buildFeatureMeta(),alignFeatures()andbindPanels(). Precursor and product must still both agree. ambiguitygains a"combine"mode, now the default. A transition matching several library entries is named for all of them, joined with" || "-- e.g."LTC4 || 14_15-LTC4", isomers 0.03 Da apart on the product ion that no acquisition can separate. Annotation columns come from the closest entry."error","warn"and"nearest"are unchanged.- Combining across entries of differing
Typeis refused: one feature cannot be both analyte and internal standard. - Fixed the
showmethods export, which was declared in NAMESPACE without the generic being imported frommethods.
- Fixed
runExample()/generateTxtImages(): trimming empty background borders no longer removes the last background pixels when the tissue fills a perfect rectangle, which had leftint2SNR()with nothing to reference. - Fixed the HTML report for single-acquisition studies: the run-to-group map is now built in an always-run chunk, so single-sample reports render.
- Report heatmap now shows the sample-group colour legend (the group colour bar was previously drawn without a key). Legends are merged into one column, which also avoids a ComplexHeatmap drawing error seen with multiple annotations.
- Added
show()methods for thecalibrationInfo,tissueInfoandquant_MSImagingExperimentclasses. - Enabled R-universe build checking.
- Vignette, help-page and package-title clarifications; documentation tidy-up.
- First Bioconductor submission.
- Added per-analyte SNR overrides (
snr_overrides) and per-reportSNR_usedreporting. - Added
bindPanels()for coordinate-matched merging of cross-panel / cross-polarity acquisitions of the same tissue. - Added
buildFeatureMeta()to join ion-library metadata to features by m/z. - Coordinate-aware tissue masks (
selectTissuePixels()now writesx/y), portable across MRM panels of the same sample. - Consolidated
readMRM()to handle single- and multi-analyte imaging folders. - Calibration (
summariseCalLevels(),createCalCurve(),int2conc()) can be driven from the study YAML via acalibration:block.