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

M

None beyond the fields every file needs.

Summary results only: one row per molecule, without the features it was measured from

M+S

quantification_method and small_molecule-quantification_unit; database[n] when the SML rows carry identifiers.

Features without identification, for example the output of feature finding and alignment

M+F

quantification_method and small_molecule_feature-quantification_unit.

Features and their alignment with a summary, but no identification evidence

M+S+F (discouraged: only for an intermediate file or a deliberate record of feature finding and alignment; see When M+S+F fits)

quantification_method, small_molecule-quantification_unit and small_molecule_feature-quantification_unit; database[n] when the SML rows carry identifiers.

Features with identification evidence, but no summary

M+F+E

quantification_method, small_molecule_feature-quantification_unit, id_confidence_measure[n] and database[n].

The full result: summary, features and identification evidence

M+S+F+E

All five: quantification_method, small_molecule-quantification_unit, small_molecule_feature-quantification_unit, id_confidence_measure[n] and database[n].

How the last column follows from the specification’s table:

  • quantification_method is required when an SML or SMF section is present.

  • small_molecule-quantification_unit is required when the SML section is present, and small_molecule_feature-quantification_unit when the SMF section is present.

  • id_confidence_measure[n] is required when the SME section is present.

  • database[n] is required when identification has been performed: when an SME section is present, or when SML rows 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.

The mzTab-M profiles as a lattice: M leads to M+S and M+F; M+S and M+F lead to M+S+F, marked discouraged; M+F leads to M+F+E; M+S+F and M+F+E lead to M+S+F+E. M+E and M+S+E stand apart and are marked not allowed.

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 SME row is reached only from a feature row, through the feature’s SME_ID_REFS column. Without the SMF section, 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 an SMF row, with retention_time_in_seconds set to null.

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.

Blocks of manual_null_MTD-only.mztab in file order: 3 COM lines and 50 MTD lines, no tables; the declared profile is M.

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.

Blocks of the lipidcompass example in file order: 1 COM line, 8304 MTD lines, 1 COM line, 13 MTD lines, 1 COM line, 3 MTD lines, 1 COM line, 1 MTD line, then the SML header and 281 rows; the declared profile is M+S.

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.

Blocks of the xcms MTBLS1820 example in file order: 560 MTD lines, then the SMF header and 2603 rows; the declared profile is M+F.
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.

Blocks of manual_null_null_lipidomics_v2.1.mztab in file order: 1 COM line, 60 MTD lines, 1 COM line, the SMF header and 4 rows, 2 COM lines, the SME header and 4 rows; the declared profile is M+F+E.

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:

Links between table rows of the lipidomics example: SMF 1 (adduct [M+H]1+, m/z 650.6432) refers to SME 1 (LacCer d18:1/12:0, input 1, rank 1); SMF 2, 3 and 4 (adduct null; m/z 252.2677, 264.2689 and 282.2788) refer to SME 2, 3 and 4, fragments of Cer d18:1/24:0 (input 2, rank 1).

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.

Blocks of the all-features example in file order: 4 COM lines, 145 MTD lines, 2 COM lines, the SML header and 1 row, 1 COM line, the SMF header and 2 rows, 1 COM line, the SME header and 2 rows; the declared profile is M+S+F+E.