Skip to contents

Imports quantitative results from an mzTab-M file (e.g. produced by Lipid Data Analyzer, MS-DIAL or MZmine) into an MRMhubExperiment. Each Small Molecule Feature (SMF) becomes an mrmhub feature and each assay an analysis; the per-assay abundances are imported as feature_intensity.

Usage

import_data_mztab(data = NULL, path, import_metadata = TRUE, silent = FALSE)

Arguments

data

An MRMhubExperiment object (e.g. from MRMhubExperiment()).

path

Path to a .mzTab file, or a directory of them.

import_metadata

If TRUE (default), derive analysis/feature metadata (incl. batch_id, formula, neutral mass) from the imported data via import_metadata_from_data().

silent

Suppress messages.

Value

The updated MRMhubExperiment.

Details

mzTab-M is a quantification report, so an import is necessarily partial: the single reported abundance per feature is mapped to feature_intensity, and feature identities (name, formula, neutral mass, m/z, retention time) are taken from the SMF/SML sections where available. Internal-standard relationships, QC-type assignments and calibration metadata are not part of mzTab-M and must be supplied afterwards with add_metadata(). study_variable group membership is imported best-effort as batch_id (mzTab-M has no analytical-batch concept).

Identifier normalization

All imported identifiers are whitespace-normalized on import: leading and trailing spaces are removed and internal runs of whitespace are collapsed to a single space (for example "QC 01" becomes "QC 01"). Raw-data file extensions (.mzML, .d, .raw, .wiff, .wiff2, .lcd, .chrom, case-insensitive) are stripped from analysis_id.

The same normalization is applied to both the data and the metadata, which is what lets an analysis_id typed into metadata match the one derived from a data-file name instead of silently failing to join. A consequence is that two identifiers differing only by whitespace collapse to one and are then reported as duplicates.

Examples

if (FALSE) { # \dontrun{
mexp <- MRMhubExperiment()
mexp <- import_data_mztab(mexp, "LDA_export.mzTab")
} # }