mrmhub 0.9.2
New features
mzTab-M import & export
New
save_dataset_mztab()writes a processedMRMhubExperimentto the HUPO-PSI mzTab-M 2.0.0-M standard format (the format expected by repositories such as MetaboLights). Each analysis becomes an assay, each feature a Small Molecule Feature (SMF) row grouped into Small Molecule Summary (SML) rows by analyte. The abundance variable is selectable viavariable(default"conc", with fall-back to raw intensity for unquantified data), and the metadata header can be enriched withinstrument,contactandpublication. Output is validator-passing against the official LIFS mzTab-M validator.New
import_data_mztab()imports mzTab-M files produced by other tools (e.g. Lipid Data Analyzer, MS-DIAL, MZmine). EachSMFbecomes a feature and each assay an analysis; per-assay abundances are imported asfeature_intensity, with feature identities andstudy_variablegrouping (asbatch_id) carried over where available.Both directions are pure R and add no runtime dependency. See the Import & Export mzTab-M recipe article.
Handling of analytical sequence gaps in plot_runscatter() and plot_rla_boxplot()
These functions gain the following new arguments to handle gaps in the analytical sequence:
remove_gaps— ifTRUE, gaps in the data (mainly caused by unannotated analysis results) are removed and indicated by vertical lines and index labels. The gap lines can be customised viagap_line_color,gap_line_width,gap_label_size, andgap_scale.collapse_excluded— ifTRUE, gaps in the x-axis caused by QC types that were not selected are collapsed. This is useful when plotting only samples or a subset of QC types.
Support for long feature names in plot_runscatter() and plot_responsecurves()
-
label_wrapandlabel_wrap_widthallow longfeature_idstrip labels to be wrapped across multiple lines. Setlabel_wrap = TRUEto enable wrapping; uselabel_wrap_widthto control the maximum line width in characters (default:25).
Plotting multiple response curves per feature in plot_responsecurves()
plot_responsecurves() gains the following new arguments:
curve_layout— one of"overlay","rows", or"cols"."overlay"plots all curves in the same panel;"rows"splits each curve into a separate row with features in columns;"cols"splits each curve into a separate column with features in rows. Usefixed_scale_curves = TRUEto fix the y-axis upper limit to the maximum value across all curves for each feature.r2_vstep— adjusts the vertical spacing between R² labels of different curves whencurve_layout = "overlay".