Manual
MRMhub performs postprocessing, quality control, and reporting of targeted mass spectrometry data. Its core data structure is used by MRMhub’s data-exchange, processing, and plotting functions.
MRMhub’s data is structured around two levels: analyses, the individual measurements (often corresponding to MS injections), and features, the distinct signals extracted from the MS data. Each analysis–feature pair is a measurement, which can carry one or more feature variables such as peak area and retention time. A sample in this context is a physical sample that was measured (several analyses can come from one sample) and an analyte can be represented by several features (i.e., different transitions, isotopes and adducts). See also the Glossary.
The MRMhubExperiment data object
All data (measurements) and detailed metadata describing the analyses
and features, together with the intermediate and final processed data
for one experiment, are stored in a single object of the
MRMhubExperiment class. The object also records data
processing status. See The
MRMhubExperiment data object for details.
How a MRMhubExperiment object is used in a workflow
An MRMhubExperiment object is created at the start of a workflow.
Data and metadata are imported into it, and it is then used in all
subsequent processing, plotting, and reporting steps. Each
mrmhub function takes an MRMhubExperiment object as its
first argument, and processing functions return an updated
MRMhubExperiment object. This returned object is typically assigned back
to the same name, which is then passed to the next function. Plotting
functions instead return a plot (typically ggplot2 object).
MRMhubExperiment objects can also be used with the native R pipe
(|>), which forwards the object from one function to the
next.
mexp <- MRMhubExperiment()
mexp <- import_data_mrmhub(mexp, path = "data/results.tsv")
mexp <- normalize_by_istd(mexp)
# equivalently, chained with the R pipe:
mexp <- MRMhubExperiment() |>
import_data_mrmhub(path = "data/results.tsv") |>
normalize_by_istd()Core function groups
MRMhub’s public functions fall into four groups, and their names follow a consistent convention:
- Data exchange — read measured data and metadata into the object, and write results (tables, plots, reports) back out to disk.
- Data processing — the transforms that normalize, correct (drift, batch, isotopic interference), and quantify the measurements, and compute per-feature QC metrics.
- QC charts — return plots for visual inspection of the run order, normalization, corrections, calibration, and sample relationships.
- QC filtering — apply pass/fail thresholds to features and exclude features or analyses that fail QC.
For these functions arranged by pipeline stage, see the Function map. The Function reference lists every function with full parameter detail.
Next steps
- Glossary: definitions of the analytical terms used throughout the documentation
- The MRMhubExperiment data object: the tables, identifiers, and variables in detail
- Sample types & QC roles: the QC labels used throughout
- Lipidomics workflow: these functions in a real script
- Function reference: every function with full parameter detail