Skip to contents

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.

MRMhubExperimentDATAdataset_orig: original imported datadataset: annotated and processed datadataset_filtered: QC-filtered outputmetrics_qc: QC metrics per featureMETADATAannot_analyses: sample/run annotationsannot_features: feature annotationsannot_istds: ISTD concentrationsannot_batches / annot_qcconcentrations / …STATUS AND FLAGSis_istd_normalized, is_quantitated, var_drift_corrected, var_batch_corrected, …Functions take MRMhubExperiment in and return updated MRMhubExperiment

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