Which Profile Does My Workflow Produce?
Every mzTab-M 2.1 file has a profile.
The profile says which of the three tables the file contains: the small molecule summary (S, the SML lines), the features (F, the SMF lines) and the evidence (E, the SME lines).
The metadata section (M) is always there.
A file declares its profile in the mzTab-profile field, and the profile decides which validation rules apply and which further metadata fields become required.
This page helps you, as the developer of an exporter, pick the profile that matches what your tool produces.
The rules come from the Profiles section of the specification; the tables each profile contains are listed in the profile table of the schema reference.
That table does not list M+S+F yet (see When M+S+F fits).
Decision table
Find the row that describes the output of your tool. The last column lists the metadata fields that the profile makes required, on top of the fields every file needs (see Mandatory metadata). The fields come from the specification’s table Metadata fields whose requirement depends on the profile, which states each rule in terms of the table a field describes.
| What your tool produces | Profile | MTD fields that become required |
|---|---|---|
Metadata only: the experimental design, but no results yet |
|
None beyond the fields every file needs. |
Summary results only: one row per molecule, without the features it was measured from |
|
|
Features without identification, for example the output of feature finding and alignment |
|
|
Features and their alignment with a summary, but no identification evidence |
|
|
Features with identification evidence, but no summary |
|
|
The full result: summary, features and identification evidence |
|
All five: |
How the last column follows from the specification’s table:
-
quantification_methodis required when anSMLorSMFsection is present. -
small_molecule-quantification_unitis required when theSMLsection is present, andsmall_molecule_feature-quantification_unitwhen theSMFsection is present. -
id_confidence_measure[n]is required when theSMEsection is present. -
database[n]is required when identification has been performed: when anSMEsection is present, or whenSMLrows carry identifiers.
The specification’s table names the profiles for each field but does not list M+S+F; the M+S+F row above applies the same rules to the two tables that profile contains.
A field that the profile does not require may still be given.
If it describes a table the file does not contain, the specification says that "a validator SHOULD accept the file but emit an informational message noting the profile/content mismatch".
Three of the examples below do this: the M, M+S and M+F examples.
Declare the profile explicitly, and leave out the tables your profile does not contain.
The specification is strict about the second point: "Sections that are NOT required by the declared profile MUST be omitted entirely — no header line and no rows. An empty table (header line only, no rows) is NOT a substitute for omitting the section."
So a tool that found no features declares a profile without F (for example M) and writes no SFH line, rather than a header with no rows below it.
How the profiles relate
The profiles form a lattice: each arrow adds one table, and each profile contains the tables of every profile below it. The specification draws the same lattice in Profile inclusion lattice.
Because a richer profile contains the poorer ones, the specification allows a validator to be set to a minimum such as "`M+F` or richer", which accepts M+F, M+S+F, M+F+E and M+S+F+E files alike: all of them contain features.
Why M+E and M+S+E are not allowed
Evidence rows (SME) cannot stand on their own.
The specification excludes the two combinations that have evidence but no features, "because they would contain cross-references that cannot be resolved":
M+E(metadata and evidence)-
An
SMErow is reached only from a feature row, through the feature’sSME_ID_REFScolumn. Without theSMFsection, nothing points to the evidence. The specification adds that no realistic workflow produces evidence without features: even a direct-infusion identification observes a mass, and mzTab-M records that observation as anSMFrow, withretention_time_in_secondsset tonull. M+S+E(metadata, summary and evidence)-
A summary row points to features through
SMF_ID_REFS, but it has no column that points to evidence. Without features in between, there is no path from a summary row to the evidence for it.
If your tool has identifications but no features, write one feature row for each observed ion and let it refer to the evidence; the file then has profile M+F+E, or M+S+F+E with a summary.
When M+S+F fits
M+S+F has a summary and features but no evidence.
Like M+S, it records no identification evidence.
The specification calls it "permitted but discouraged".
A file may declare it, but it is meant for two cases only:
-
an intermediate file, for example the output of one step of a pipeline before the evidence table is added, and
-
a deliberate record of feature finding and alignment, with a summary, that does not record evidence for identification.
For anything else, choose M+S if your tool reports a summary only, M+F if it reports features without identification and without a summary, or M+S+F+E if it has features and identifications.
The specification does not reflect this decision of the working group yet.
Its Profiles section says "Five profiles are defined", the profile table of the schema reference begins "Five profiles are defined:" and omits M+S+F, and the schema’s list of values for mzTab-profile does not include it.
The same paragraph of the specification that calls M+S+F "permitted but discouraged" goes on to say that it is kept only for backwards compatibility and is not recommended for new files, which leaves no room for the deliberate record described above.
Aligning all of these with the working group’s decision is tracked in #177.
No example file uses M+S+F yet.
One example per profile
Each profile except M+S+F has an example file in the examples/2.1/ folder of the repository.
The diagrams show the blocks of each file in order, with the number of lines in each block and the declared profile.
M: metadata only
manual_null_MTD-only.mztab is a hand-written file that declares the design of a study and reports no results yet.
It consists of comment and metadata lines only.
It also gives quantification_method and a database[1] entry ("no database"), which the M profile does not require; quantification_method describes the SML or SMF tables, which the file does not have, so a validator accepts it with an informational message.
M+S: summary only
lipidcompass-script_226ea96_MTD_SML_LCS-00001-01_v2.1.mztab reports lipid concentrations from the Singapore Integrative Omics Study, as its title and description say; its first comment line notes that the values were read from a supplementary table.
It has many samples and assays, which makes the metadata section long, and one SML row per lipid.
It has no features and no evidence.
The file also gives small_molecule_feature-quantification_unit and id_confidence_measure[1], which describe the SMF and SME tables it does not contain.
That is the kind of mismatch a validator accepts with an informational message.
M+F: features without identification
xcms+MsIO_0.0.11_MTBLS1820_onlySMF_v2.1.mztab holds the features that XCMS found in the MetaboLights study MTBLS1820, with an abundance for each assay.
It has no summary rows and no identifications.
This file is a tool export, written by xcms with the MsIO package, and is shown as found.
It gives small_molecule-quantification_unit although an M+F file has no SML section.
The specification uses exactly this case as its example of a profile/content mismatch, which a validator accepts with an informational message.
Tool exports in examples/ are changed only together with the tool’s authors.
|
M+S+F: summary and features, no evidence
There is no example file for M+S+F yet; see When M+S+F fits.
M+F+E: features with evidence, no summary
manual_null_null_lipidomics_v2.1.mztab is a small hand-written lipidomics file: one targeted measurement of sphingolipids (quantification method: SRM), with four features and four evidence rows.
Without a summary table, every evidence row is reached from a feature.
Feature 1 has the adduct [M+H]1+ and refers to evidence row 1, which is named "LacCer d18:1/12:0".
Features 2 to 4 give their adduct as null; each refers to one evidence row (2 to 4) that names a fragment of Cer d18:1/24:0:
M+S+F+E: the full result
manual_null_null_all-features_v2.1.mztab is the file the Anatomy of an mzTab-M 2.1 File page walks through.
It has all four sections: one summary row, two features and two evidence rows.