Anatomy of an mzTab-M 2.1 File
This page walks through one complete mzTab-M 2.1 file from top to bottom.
The file is examples/2.1/pending-validator/manual_null_null_all-features_v2.1.mztab.
It is small, but it uses almost every field of mzTab-M 2.1 and all four tables, so nearly every part of the format appears once.
The one metadata field it does not show is derivatization_agent[n], which belongs to derivatization workflows such as GC-MS and will be covered in a workflow chapter.
It is valid mzTab-M 2.1; it sits in pending-validator/ only because the reference validator, jmzTab-m, does not yet support all of its features.
The file describes a minimal study: proline measured in human liver cells (hepatocytes) before treatment and one day after. There are two samples, two assays and two MS runs, and two study variables ("day 0" and "day 1") in one study variable group, "time after treatment". The tables report one LC-MS feature of proline, which a spectral library search could not assign to L- or D-proline, and one feature that was not identified at all. All values are illustrative.
All mzTab lines on this page are copied from the file by a script; see the guide overview for how to read them. The page follows the file from top to bottom, but groups related metadata lines, so the order of the metadata parts differs slightly from the file.
File basics
An mzTab-M file is a plain-text file in which every line is one record. The format specification sets out the basic rules:
-
The file is UTF-8 encoded; the specification calls UTF-8 "the preferred encoding for mzTab files".
-
Fields are separated by the tab character (Unicode U+0009), never by spaces or commas.
-
Every line starts with a three-letter prefix, followed by a tab, that says what kind of line it is:
MTDfor metadata,SMHandSMLfor the header and rows of the small molecule (summary) table,SFHandSMFfor the small molecule feature table,SEHandSMEfor the small molecule evidence table, andCOMfor comments. -
Column labels and field names are case-sensitive:
SML_IDis notsml_id. -
Numbers use a dot as decimal separator and no thousands separator.
-
COMlines and empty lines may appear anywhere; most readers ignore them. The all-features file opens with fourCOMlines that describe the file, and puts one or twoCOMlines before each table to say what the table shows.
The sections always come in the same order.
In the words of the specification’s Profiles section: "Sections that ARE present MUST follow the table order MTD → SML → SMF → SME, with a blank line separating each."
Each table starts with its header line (SMH, SFH or SEH), which names the columns, and the header appears once per file.
Which tables are present depends on the file’s profile (see Mandatory metadata); the all-features file has all four.
The diagram in The SML, SMF and SME tables shows the blocks of the file in order, with the number of lines in each.
Within the metadata section, the fields follow a fixed order.
The metadata section of the schema reference says: "The fields in the metadata section MUST be reported in the order listed below."
The all-features file follows the order of the objects: sample[n] lines come before ms_run[n], assay[n], study_variable[n] and so on.
Mandatory metadata
The first metadata lines identify the file:
MTD mzTab-version 2.1.0-M
MTD mzTab-ID MINIMAL-ALL-FEATURES-2.1
MTD mzTab-profile M+S+F+E
MTD title Minimal mzTab-M 2.1.0 example exercising all features
MTD description Proline in human liver cells, before and one day after treatment.
mzTab-version-
The version of the format, here
2.1.0-M. The-Msuffix marks the metabolomics variant of mzTab. This field is required. mzTab-ID-
An identifier for the file, such as a repository accession or a laboratory identifier. It does not have to be globally unique, but it should mean something in its context. This field is required.
mzTab-profile-
Declares which tables the file contains.
M+S+F+Emeans metadata (M), small molecule summary (S), features (F) and evidence (E): all four tables. The field may be left out, for example in files written for mzTab-M 2.0, and then a validator infers the profile from the tables it finds. The specification asks new files to declare it: "New files SHOULD setmzTab-profileexplicitly." The profile also decides which other metadata becomes required; the specification lists these fields in Metadata fields whose requirement depends on the profile. To choose the profile for your own tool, see Which Profile Does My Workflow Produce?. titleanddescription-
A short title and a longer description of the study. Both are optional, but they are the first thing a person reads, so the example gives both.
Other required metadata fields belong to the parts described below: at least one software[n], ms_run[n], assay[n], study_variable[n], study_variable_group[n] and cv[n].
The schema reference marks each of them as mandatory.
The experimental design
The largest part of the metadata describes how the study was done: which samples were measured, in which runs, and how the measurements are grouped.
The objects refer to each other by their index, for example assay[1]-sample_ref points to sample[1].
The specification explains these objects in Recommendations for reporting replicates within experimental designs.
This diagram shows how the study variable group, study variables, assays and samples of the all-features file refer to each other:
Samples
A sample is the biological material that was analysed.
MTD sample[1] sample 1
MTD sample[1]-species[1] [NCBITaxon, NCBITaxon:9606, Homo sapiens, ]
MTD sample[1]-tissue[1] [BTO, BTO:0000759, liver, ]
MTD sample[1]-cell_type[1] [CL, CL:0000182, hepatocyte, ]
MTD sample[1]-description untreated hepatocytes
MTD sample[1]-custom[1] [NCIT, NCIT:C25150, Age, 42]
MTD sample[2] sample 2
MTD sample[2]-species[1] [NCBITaxon, NCBITaxon:9606, Homo sapiens, ]
MTD sample[2]-tissue[1] [BTO, BTO:0000759, liver, ]
MTD sample[2]-cell_type[1] [CL, CL:0000182, hepatocyte, ]
MTD sample[2]-disease[1] [DOID, DOID:9352, type 2 diabetes mellitus, ]
MTD sample[2]-description hepatocytes one day after treatment
MTD sample[2]-custom[1] [NCIT, NCIT:C25150, Age, 42]
Each sample[n] line gives the sample a name.
The other lines describe it with parameters from controlled vocabularies: species, tissue, cell type and disease.
A parameter is always written as [CV label, accession, name, value]; [NCBITaxon, NCBITaxon:9606, Homo sapiens, ] names the species with an empty value.
Anything the vocabulary fields do not cover goes into sample[n]-custom[n], here the age of the donor.
Samples are optional. The specification notes that many analysis tools do not know which samples were measured, so their exporters report assays and study variables only; the sample lines are usually added later by people who know the study. Two assays that refer to different samples are biological replicates; two assays that refer to the same sample are technical replicates.
Assays
An assay is one measurement of a sample.
MTD assay[1] assay 1
MTD assay[1]-custom[1] [, , injection order, 1]
MTD assay[1]-external_uri https://example.org/datasets/minimal-all-features/a_assay.txt?row=1
MTD assay[1]-sample_ref sample[1]
MTD assay[1]-ms_run_ref ms_run[1]
MTD assay[1]-protocol_refs protocol[1]
MTD assay[1]-parameters [, , injection volume, 5 uL]
MTD assay[2] assay 2
MTD assay[2]-custom[1] [, , injection order, 2]
MTD assay[2]-external_uri https://example.org/datasets/minimal-all-features/a_assay.txt?row=2
MTD assay[2]-sample_ref sample[2]
MTD assay[2]-ms_run_ref ms_run[2]
MTD assay[2]-protocol_refs protocol[1]
MTD assay[2]-parameters [, , injection volume, 5 uL]
Each assay refers to the sample it measured (sample_ref), the MS run that holds its data (ms_run_ref) and the protocols applied to it (protocol_refs).
In label-free LC-MS without pre-fractionation, as here, each assay has exactly one MS run.
external_uri links the assay to its row in an external description of the study, for example an ISA-Tab assay file.
custom and parameters hold further facts about the assay: the injection order and the injection volume.
The parameters here are user parameters, which have no vocabulary: [, , injection volume, 5 uL] leaves the CV label and the accession empty and gives only a name and a value.
MS runs and instruments
An MS run is one data file from the mass spectrometer.
MTD instrument[1]-name [MS, MS:1001911, Q Exactive, ]
MTD instrument[1]-source [MS, MS:1000073, electrospray ionization, ]
MTD instrument[1]-analyzer[1] [MS, MS:1000484, orbitrap, ]
MTD instrument[1]-detector [MS, MS:1000624, inductive detector, ]
MTD ms_run[1]-location file:///data/run1.mzML
MTD ms_run[1]-instrument_ref instrument[1]
MTD ms_run[1]-format [MS, MS:1000584, mzML format, ]
MTD ms_run[1]-id_format [MS, MS:1000768, Thermo nativeID format, ]
MTD ms_run[1]-fragmentation_method[1] [MS, MS:1000422, beam-type collision-induced dissociation, ]
MTD ms_run[1]-scan_polarity[1] [MS, MS:1000130, positive scan, ]
MTD ms_run[1]-hash de9f2c7fd25e1b3afad3e85a0bd17d9b100db4b3
MTD ms_run[1]-hash_method [MS, MS:1000569, SHA-1, ]
MTD ms_run[1]-usi_identifier mzspec:MSV000000000:run1
MTD ms_run[1]-parameters [MS, MS:1000031, instrument model, [MS, MS:1001911, Q Exactive, ]]
MTD ms_run[2]-location file:///data/run2.mzML
MTD ms_run[2]-instrument_ref instrument[1]
MTD ms_run[2]-format [MS, MS:1000584, mzML format, ]
MTD ms_run[2]-id_format [MS, MS:1000768, Thermo nativeID format, ]
MTD ms_run[2]-fragmentation_method[1] [MS, MS:1000422, beam-type collision-induced dissociation, ]
MTD ms_run[2]-scan_polarity[1] [MS, MS:1000130, positive scan, ]
MTD ms_run[2]-hash 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
MTD ms_run[2]-hash_method [MS, MS:1000569, SHA-1, ]
MTD ms_run[2]-usi_identifier mzspec:MSV000000000:run2
MTD ms_run[2]-parameters [MS, MS:1000031, instrument model, [MS, MS:1001911, Q Exactive, ]]
The instrument[1] lines describe the mass spectrometer: its model, ion source, analyser and detector.
Each ms_run[n] names its data file in location as a URI and refers to the instrument it was measured on.
format and id_format say how to read the file and how its spectra are named.
The id format matters later: the evidence table refers to a spectrum as ms_run[1]:controllerType=0 controllerNumber=1 scan=1234, which is written in the "Thermo nativeID format" declared here.
hash and hash_method let a reader check that a file is the one that was analysed.
usi_identifier gives the run’s identifier in a public repository.
scan_polarity is positive for both runs; results from positive and negative mode usually go into separate files (see Support for positive and negative modes).
Study variables and study variable groups
A study variable is a group of assays whose results are reported together, for example one level of a treatment. A study variable group is the factor that the study variables are levels of.
MTD study_variable[1] day 0
MTD study_variable[1]-assay_refs assay[1]
MTD study_variable[1]-ms_run_refs ms_run[1]
MTD study_variable[1]-average_function [MS, MS:1002962, mean, ]
MTD study_variable[1]-variation_function [MS, MS:1002885, standard error, ]
MTD study_variable[1]-description Hepatocytes day 0 after treatment
MTD study_variable[2] day 1
MTD study_variable[2]-assay_refs assay[2]
MTD study_variable[2]-ms_run_refs ms_run[2]
MTD study_variable[2]-average_function [MS, MS:1002962, mean, ]
MTD study_variable[2]-variation_function [MS, MS:1002885, standard error, ]
MTD study_variable[2]-description Hepatocytes day 1 after treatment
MTD study_variable_group[1] [, , time after treatment, ]
MTD study_variable_group[1]-description Time after treatment
MTD study_variable_group[1]-type [STATO, STATO:0000228, ordinal variable, ]
MTD study_variable_group[1]-datatype xsd:integer
MTD study_variable_group[1]-unit [UO, UO:0000033, day, ]
MTD study_variable_group[1]-study_variable_refs study_variable[1]|study_variable[2]
Here the factor is "time after treatment", and its two levels are the study variables "day 0" and "day 1".
Each study variable lists its assays (assay_refs) and states how the assay values were combined: average_function (the mean) and variation_function (the standard error).
The group describes the factor itself: its type (an ordinal variable), datatype (an integer), unit (days) and the study variables that belong to it.
Study variable groups are new in mzTab-M 2.1, and a file needs at least one.
The specification’s section Recommendations for reporting multifactorial experimental designs says: "At least one study_variable_group MUST be defined."
A study with two factors, such as treatment and time, has two groups.
study_variable_group[1]-study_variable_refs holds a list.
List items are separated by |.
We recommend writing the bare | without spaces around it, as the example does; whether spaces are allowed is an open discussion (#175).
Protocols
Protocols describe the steps of sample preparation, data acquisition or data processing.
MTD sample_processing[1] [MSIO, MSIO:0000146, centrifugation, ]
MTD protocol[1]-name extraction
MTD protocol[1]-type [MSIO, MSIO:0000141, metabolite extraction, ]
MTD protocol[1]-description Cells were extracted with cold methanol and the supernatant was collected after centrifugation.
MTD protocol[1]-parameters [, , extraction solvent, [CHEBI, CHEBI:17790, methanol, ]]|[, , extraction temperature, -20 C]
sample_processing[n] lists processing steps as single parameters.
A protocol[n] describes one step in more detail: its name, its type, a free-text description and its parameters.
Assays point to the protocols applied to them through protocol_refs.
A parameter value can itself be a parameter: the extraction solvent is given as the ChEBI term for methanol.
Provenance
The next metadata lines say who produced the results, with which software, and where to find more.
MTD software[1] [MS, MS:1001582, XCMS, 4.4.0]
MTD software[1]-setting[1] ppm = 5
MTD publication[1] pubmed:30688441|doi:10.1021/acs.analchem.8b04310
MTD contact[1]-name Josiah Carberry
MTD contact[1]-affiliation Example University
MTD contact[1]-email josiah.carberry@example.org
MTD contact[1]-orcid 0000-0002-1825-0097
MTD uri[1] https://example.org/datasets/minimal-all-features
MTD external_study_uri[1] https://example.org/datasets/minimal-all-features/i_Investigation.txt
MTD custom[1] [, , study design, minimal example]
-
software[n]names the software and its version; it is required, andsoftware[n]-setting[n]records the settings used. -
publication[n]lists the publications about the study aspubmed:ordoi:identifiers, separated by|. -
contact[n]gives the name, affiliation, e-mail address and ORCID of a contact person. -
uri[n]points to the dataset, andexternal_study_uri[n]to a fuller description of the study, here an ISA-Tab investigation file (see Referencing external resources). -
custom[n]holds any further parameter about the analysis.
The instrument, which is also part of the provenance, is described with the MS runs in The experimental design.
Controlled vocabularies and databases
Parameters refer to their vocabulary only by a short label, such as MS in [MS, MS:1001911, Q Exactive, ].
The cv[n] lines tell a reader what each label stands for: the vocabulary’s full name, the version that was used and where to get it.
MTD cv[1]-label MS
MTD cv[1]-full_name PSI-MS controlled vocabulary
MTD cv[1]-version 4.2.6
MTD cv[1]-uri https://raw.githubusercontent.com/HUPO-PSI/psi-ms-CV/master/psi-ms.obo
MTD database[1] [MIRIAM, MIR:00100079, HMDB, ]
MTD database[1]-prefix hmdb
MTD database[1]-version 5.0
MTD database[1]-uri https://hmdb.ca
The snippet shows the first of eleven vocabularies; the file also declares UO, NCBITaxon, BTO, CL, DOID, NCIT, STATO, MSIO, CHEBI and PRIDE.
The schema reference requires at least one cv[n] entry, with label, full name, version and URI, and describes the cv[n] entries as the controlled vocabularies "used in the mzTab file".
A reader can only look up a term if it knows the vocabulary and its version, so we recommend declaring every vocabulary whose label appears in your file.
The specification lists the vocabularies commonly used with mzTab-M in The PSI Mass Spectrometry Controlled Vocabulary (CV).
User parameters such as [, , injection order, 1] have no label and need no entry.
This example does not follow that recommendation everywhere: its database[1] uses the label MIRIAM, and the file has no cv[n] entry for it.
The specification does not say whether registry labels such as MIRIAM need a cv[n] entry, and G-MTD-11 is a recommendation, not a rule.
database[n] declares each database that identifiers in the tables come from.
Its prefix, here hmdb, is the part before the colon in identifiers such as hmdb:HMDB0000162, and version and uri say which release of the database was searched.
A database[n] entry is required when the file reports identifications (see Metadata fields whose requirement depends on the profile).
Quantification and identification metadata
The last metadata lines explain how the numbers in the tables are to be read.
MTD quantification_method [MS, MS:1001834, LC-MS label-free quantitation analysis, ]
MTD small_molecule-quantification_unit [PRIDE, PRIDE:0000330, Arbitrary quantification unit, ]
MTD small_molecule_feature-quantification_unit [MS, MS:1001844, MS1 feature area, ]
MTD small_molecule-identification_reliability [MS, MS:1002896, compound identification confidence level, ]
MTD id_confidence_measure[1] [MS, MS:1002890, fragmentation score, ]
MTD colunit-small_molecule opt_global_cv_MS:1002476_ion_mobility_drift_time=[UO, UO:0000028, millisecond, ]
MTD colunit-small_molecule_feature opt_ms_run[1]_cv_MS:1002476_ion_mobility_drift_time=[UO, UO:0000028, millisecond, ]
MTD colunit-small_molecule_evidence opt_global_mass_error=[UO, UO:0000169, parts per million, ]
quantification_method-
How the abundances were obtained, here label-free LC-MS quantitation. It is required whenever the file has an SML or SMF table.
small_molecule-quantification_unitandsmall_molecule_feature-quantification_unit-
The unit of the abundance columns in the SML and SMF tables: arbitrary units for the summary, MS1 feature area for the features. Each is required when its table is present.
small_molecule-identification_reliability-
The scale of the
reliabilitycolumn in the SML table. Here it is the "compound identification confidence level" (MS:1002896), a five-level scale from 0 (pure compound, full stereochemistry) to 4 (unknown compound). Without this line,reliabilityuses the MSI scale from 1 to 4. id_confidence_measure[n]-
The scores used to rank identifications, here a fragmentation score. The SME column
id_confidence_measure[1]holds the value ofid_confidence_measure[1]for each evidence row, and the SML columnsbest_id_confidence_measureandbest_id_confidence_valuereport the best of them. At least one is required when the file has an SME table. colunit-small_molecule,colunit-small_molecule_featureandcolunit-small_molecule_evidence-
The unit of a column that is not an abundance column, written as
column name=unit parameter. Here they give the units of three optional columns: milliseconds for the ion mobility drift time and parts per million for the mass error. The schema reference says that this field "MUST NOT be used to define a unit for quantification columns"; abundance units come from the quantification unit fields above.
The specification lists which of these fields each profile requires in Metadata fields whose requirement depends on the profile.
The SML, SMF and SME tables
After the metadata come the three tables. Each has a different job:
-
The small molecule summary table (SML) reports the molecules the study found and their abundance per assay and per study variable. It is what most readers want.
-
The small molecule feature table (SMF) reports what was measured: signals with a mass-to-charge ratio, a retention time and an abundance per assay.
-
The small molecule evidence table (SME) reports how each identification was made: which spectrum was matched to which database entry, with which score.
This diagram shows the blocks of the all-features file in order, with the number of lines in each:
The rows refer to each other by ID.
An SML row lists its features in SMF_ID_REFS, and an SMF row lists its evidence in SME_ID_REFS:
The rows are explained one at a time below. Each is shown as a table of columns and values; the raw line, for copying, is behind the "Raw line" toggle.
SML row 1: proline
| Column | Value |
|---|---|
SML_ID |
|
SMF_ID_REFS |
|
database_identifier |
|
chemical_formula |
|
smiles |
|
inchi |
|
chemical_name |
|
uri |
|
theoretical_neutral_mass |
|
adduct_ions |
|
reliability |
|
best_id_confidence_measure |
|
best_id_confidence_value |
|
abundance_assay[1] |
|
abundance_assay[2] |
|
abundance_study_variable[1] |
|
abundance_study_variable[2] |
|
abundance_variation_study_variable[1] |
|
abundance_variation_study_variable[2] |
|
opt_global_cv_MS:1002476_ion_mobility_drift_time |
|
Raw line
SMH SML_ID SMF_ID_REFS database_identifier chemical_formula smiles inchi chemical_name uri theoretical_neutral_mass adduct_ions reliability best_id_confidence_measure best_id_confidence_value abundance_assay[1] abundance_assay[2] abundance_study_variable[1] abundance_study_variable[2] abundance_variation_study_variable[1] abundance_variation_study_variable[2] opt_global_cv_MS:1002476_ion_mobility_drift_time
SML 1 1 hmdb:HMDB0000162|hmdb:HMDB0003411 C5H9NO2|C5H9NO2 OC(=O)[C@@H]1CCCN1|OC(=O)[C@H]1CCCN1 InChI=1S/C5H9NO2/c7-5(8)4-2-1-3-6-4/h4,6H,1-3H2,(H,7,8)/t4-/m0/s1|InChI=1S/C5H9NO2/c7-5(8)4-2-1-3-6-4/h4,6H,1-3H2,(H,7,8)/t4-/m1/s1 L-Proline|D-Proline https://hmdb.ca/metabolites/HMDB0000162|https://hmdb.ca/metabolites/HMDB0003411 115.0633|115.0633 [M+H]1+ 2 [MS, MS:1002890, fragmentation score, ] 0.92 152340.5 98765.0 152340.5 98765.0 NaN NaN 18.2
-
SML_IDidentifies the row, andSMF_ID_REFSpoints to feature 1. -
The identifier columns, from
database_identifiertotheoretical_neutral_mass, each hold two values separated by|: one for L-proline and one for D-proline. Ambiguous identifications explains why. -
adduct_ionslists the adducts in which the molecule was detected, here the protonated molecule[M+H]1+. -
reliabilityis2on the scale declared insmall_molecule-identification_reliability. -
best_id_confidence_measureandbest_id_confidence_valuegive the best score among the evidence rows: the fragmentation score 0.92 of SME row 1. -
abundance_assay[n]has one column per assay.abundance_study_variable[n]has one column per study variable and holds the mean of its assays. Each study variable here has a single assay, so the mean equals the assay value. -
abundance_variation_study_variable[n]holds the standard error, which cannot be calculated from a single value; it is thereforeNaN(see Missing values: null and NaN). -
The last column is an optional column; see Optional columns.
SMF row 1: the proline feature
| Column | Value |
|---|---|
SMF_ID |
|
SME_ID_REFS |
|
SME_ID_REF_ambiguity_code |
|
adduct_ion |
|
isotopomer |
|
exp_mass_to_charge |
|
charge |
|
retention_time_in_seconds |
|
retention_time_in_seconds_start |
|
retention_time_in_seconds_end |
|
abundance_assay[1] |
|
abundance_assay[2] |
|
opt_ms_run[1]_cv_MS:1002476_ion_mobility_drift_time |
|
Raw line
SFH SMF_ID SME_ID_REFS SME_ID_REF_ambiguity_code adduct_ion isotopomer exp_mass_to_charge charge retention_time_in_seconds retention_time_in_seconds_start retention_time_in_seconds_end abundance_assay[1] abundance_assay[2] opt_ms_run[1]_cv_MS:1002476_ion_mobility_drift_time
SMF 1 1|2 1 [M+H]1+ null 116.0703 1 95.4 92.1 99.0 152340.5 98765.0 18.2
-
SME_ID_REFSpoints to two evidence rows, andSME_ID_REF_ambiguity_code1says why there are two: see Ambiguous identifications. -
adduct_ionis the adduct assumed for this feature,[M+H]1+, andchargeis1. -
isotopomerisnullbecause the feature is de-isotoped: it stands for the molecule, not for one isotope peak. -
exp_mass_to_chargeis the measured m/z.retention_time_in_secondsis the retention time at the apex, and the_startand_endcolumns give the elution window. -
abundance_assay[n]has one column per assay, in the unit set bysmall_molecule_feature-quantification_unit. SMF tables have no study variable columns.
SMF row 2: an unidentified feature
| Column | Value |
|---|---|
SMF_ID |
|
SME_ID_REFS |
|
SME_ID_REF_ambiguity_code |
|
adduct_ion |
|
isotopomer |
|
exp_mass_to_charge |
|
charge |
|
retention_time_in_seconds |
|
retention_time_in_seconds_start |
|
retention_time_in_seconds_end |
|
abundance_assay[1] |
|
abundance_assay[2] |
|
opt_ms_run[1]_cv_MS:1002476_ion_mobility_drift_time |
|
Raw line
SFH SMF_ID SME_ID_REFS SME_ID_REF_ambiguity_code adduct_ion isotopomer exp_mass_to_charge charge retention_time_in_seconds retention_time_in_seconds_start retention_time_in_seconds_end abundance_assay[1] abundance_assay[2] opt_ms_run[1]_cv_MS:1002476_ion_mobility_drift_time
SMF 2 null null null null 245.1102 null 310.8 307.5 314.2 4210.0 null null
This feature was measured but not identified.
Its SME_ID_REFS is null, so its SME_ID_REF_ambiguity_code is null too.
Nothing is known about its adduct, isotopomer or charge, so these are null as well; in mzTab-M 2.1 the SMF charge may be null.
It has an abundance in assay 1, but none in assay 2 and no drift time, so those cells are null.
No SML row refers to this feature: the file reports it without summarising it as a molecule.
SME row 1: evidence for L-proline
| Column | Value |
|---|---|
SME_ID |
|
evidence_input_id |
|
database_identifier |
|
chemical_formula |
|
smiles |
|
inchi |
|
chemical_name |
|
uri |
|
derivatized_form |
|
adduct_ion |
|
exp_mass_to_charge |
|
charge |
|
theoretical_mass_to_charge |
|
spectra_ref |
|
identification_method |
|
ms_level |
|
id_confidence_measure[1] |
|
rank |
|
opt_global_mass_error |
|
opt_global_cv_MS:1003260_related_spectrum_USI |
|
Raw line
SEH SME_ID evidence_input_id database_identifier chemical_formula smiles inchi chemical_name uri derivatized_form adduct_ion exp_mass_to_charge charge theoretical_mass_to_charge spectra_ref identification_method ms_level id_confidence_measure[1] rank opt_global_mass_error opt_global_cv_MS:1003260_related_spectrum_USI
SME 1 1 hmdb:HMDB0000162 C5H9NO2 OC(=O)[C@@H]1CCCN1 InChI=1S/C5H9NO2/c7-5(8)4-2-1-3-6-4/h4,6H,1-3H2,(H,7,8)/t4-/m0/s1 L-Proline https://hmdb.ca/metabolites/HMDB0000162 null [M+H]1+ 116.0703 1 116.0706 ms_run[1]:controllerType=0 controllerNumber=1 scan=1234 [MS, MS:1001031, spectral library search, ] [MS, MS:1000511, ms level, 2] 0.92 1 -2.6 mzspec:MSV000000000:run1:scan:1234
-
evidence_input_idnames the input data that was searched, here the MS2 spectrum; rows with the same value come from the same input. -
The identifier columns hold one candidate each. The example uses SME as the caption of the specification’s figure on evidence describes it: each row is one possible identification, so the two candidates appear as two rows rather than as
|lists. -
derivatized_formisnullbecause no derivatized form was analysed. -
theoretical_mass_to_chargeis the m/z expected for the candidate with the given adduct and charge, to compare withexp_mass_to_charge. -
spectra_refpoints to the spectrum:ms_run[1]followed by the spectrum’s ID in the id format declared forms_run[1]. -
identification_method(a spectral library search) andms_level(MS2) say how the candidate was found. -
id_confidence_measure[1]is the fragmentation score declared asid_confidence_measure[1]in the metadata, andrankorders the candidates for one input, starting at 1. -
The last two columns are optional columns: the mass error in ppm, and the USI of the matched library spectrum (see Referencing query and library spectra).
SME row 2: evidence for D-proline
| Column | Value |
|---|---|
SME_ID |
|
evidence_input_id |
|
database_identifier |
|
chemical_formula |
|
smiles |
|
inchi |
|
chemical_name |
|
uri |
|
derivatized_form |
|
adduct_ion |
|
exp_mass_to_charge |
|
charge |
|
theoretical_mass_to_charge |
|
spectra_ref |
|
identification_method |
|
ms_level |
|
id_confidence_measure[1] |
|
rank |
|
opt_global_mass_error |
|
opt_global_cv_MS:1003260_related_spectrum_USI |
|
Raw line
SEH SME_ID evidence_input_id database_identifier chemical_formula smiles inchi chemical_name uri derivatized_form adduct_ion exp_mass_to_charge charge theoretical_mass_to_charge spectra_ref identification_method ms_level id_confidence_measure[1] rank opt_global_mass_error opt_global_cv_MS:1003260_related_spectrum_USI
SME 2 1 hmdb:HMDB0003411 C5H9NO2 OC(=O)[C@H]1CCCN1 InChI=1S/C5H9NO2/c7-5(8)4-2-1-3-6-4/h4,6H,1-3H2,(H,7,8)/t4-/m1/s1 D-Proline https://hmdb.ca/metabolites/HMDB0003411 null [M+H]1+ 116.0703 1 116.0706 ms_run[1]:controllerType=0 controllerNumber=1 scan=1234 [MS, MS:1001031, spectral library search, ] [MS, MS:1000511, ms level, 2] 0.88 2 -2.6 mzspec:MSV000000000:run1:scan:1234
This row matches the same spectrum (evidence_input_id 1, the same spectra_ref) to D-proline.
It scores lower, 0.88 against 0.92, and so has rank 2.
Ambiguous identifications
L- and D-proline are stereoisomers: they have the same formula and the same mass, and a library search of one MS2 spectrum cannot tell them apart. The file records this ambiguity at all three levels. The specification describes the rules in Ambiguity in identification.
In the evidence table, one spectrum gives two results, one row per candidate:
SEH SME_ID evidence_input_id database_identifier chemical_formula smiles inchi chemical_name uri derivatized_form adduct_ion exp_mass_to_charge charge theoretical_mass_to_charge spectra_ref identification_method ms_level id_confidence_measure[1] rank opt_global_mass_error opt_global_cv_MS:1003260_related_spectrum_USI
SME 1 1 hmdb:HMDB0000162 C5H9NO2 OC(=O)[C@@H]1CCCN1 InChI=1S/C5H9NO2/c7-5(8)4-2-1-3-6-4/h4,6H,1-3H2,(H,7,8)/t4-/m0/s1 L-Proline https://hmdb.ca/metabolites/HMDB0000162 null [M+H]1+ 116.0703 1 116.0706 ms_run[1]:controllerType=0 controllerNumber=1 scan=1234 [MS, MS:1001031, spectral library search, ] [MS, MS:1000511, ms level, 2] 0.92 1 -2.6 mzspec:MSV000000000:run1:scan:1234
SME 2 1 hmdb:HMDB0003411 C5H9NO2 OC(=O)[C@H]1CCCN1 InChI=1S/C5H9NO2/c7-5(8)4-2-1-3-6-4/h4,6H,1-3H2,(H,7,8)/t4-/m1/s1 D-Proline https://hmdb.ca/metabolites/HMDB0003411 null [M+H]1+ 116.0703 1 116.0706 ms_run[1]:controllerType=0 controllerNumber=1 scan=1234 [MS, MS:1001031, spectral library search, ] [MS, MS:1000511, ms level, 2] 0.88 2 -2.6 mzspec:MSV000000000:run1:scan:1234
Both rows have the same evidence_input_id, which marks them as results for the same input, and rank orders them by score.
In the feature table, SMF row 1 refers to both evidence rows (SME_ID_REFS is 1|2), and SME_ID_REF_ambiguity_code says what the two references mean.
The specification defines three codes:
1-
The same input data gives results for different identifications, so ambiguity remains. This is the case here.
2-
Different input data, or different searches, support the same identification, so there is no ambiguity.
3-
Different input data support the identification, and ambiguity remains.
When SME_ID_REFS holds one value or none, the code is null.
In the summary table, SML row 1 lists both candidates in each identifier column, separated by |, in the same order in every column: L-Proline|D-Proline, hmdb:HMDB0000162|hmdb:HMDB0003411, and so on.
The specification states that "The number of elements separated by | characters MUST be identical in all columns where data is reported", so that the n-th value of each column describes the same candidate.
Missing values: null and NaN
A table cell is never empty. The specification’s section Encoding missing values, zeroes, nulls, infinity and calculation errors says: "In the table-based sections there MUST NOT be any empty cells." Two special values take the place of a number:
null-
There is no data. Write it exactly as
null, in lower case and without quotes. In the all-features file, SMF row 2 usesnullfor its unknown evidence references, adduct and charge, and for its abundance in assay 2. Not every field may benull. The schema reference says which ones in each field’s "Is Nullable" entry, but where that entry disagrees with the field’s description and the JSON schema, the description and the JSON schema decide. The SMFchargeused above and the SMLbest_id_confidence_valueare such cases: their entry says FALSE, but both allownull(see G-VAL-03). NaN-
There is data, but the number cannot be calculated. In SML row 1,
abundance_variation_study_variable[1]and[2]areNaN: each study variable has a single assay, and a standard error cannot be calculated from one value.nullwould be wrong here, because it would say that the value was not reported.
Infinity (INF) is never used.
Scientific notation, such as 1.5E5, is not allowed either: numbers are plain decimals like 152340.5.
The specification says: "Scientific notation and infinity is explicitly not supported."
Whether scientific notation should be allowed is an open discussion (#178).
When a molecule was not found in an assay, an exporter has to choose between null and 0.
The specification expects export software to decide, "based on best understanding of the case in hand".
For the SML abundance columns, the schema reference adds guidance (abundance_assay[n], abundance_study_variable[n]): "“null” SHOULD be used to report missing quantities, while zero SHOULD be used to indicate a present but not reliably quantifiable value (e.g. below a minimum noise threshold)."
For the SMF abundance_assay[n] it says only: "Null or zero values may be reported as appropriate."
What 0 should mean, and how to report limits of detection and quantification, is an open discussion (#173).
Optional columns
A table may have more columns than the specification defines. These optional columns come after all the defined columns, and their names say what they belong to. The specification describes them in Adding optional columns: "These column headers MUST start with the prefix “opt_” followed by the identifier of the object they reference: assay, study variable, MS run or “global” (if the value relates to all replicates)."
The all-features file has four optional columns:
| Column | Table | Meaning |
|---|---|---|
|
SML |
Drift time of the molecule, for all assays ( |
|
SMF |
Drift time of the feature, measured in |
|
SME |
Mass error of the identification. |
|
SME |
USI of the matched library spectrum. |
opt_global_…-
The value applies to the row as a whole, across all assays.
opt_ms_run[1]_…-
The value belongs to one MS run. SMF row 2 has no drift time, so its value is
null. The same pattern works withassay[n]andstudy_variable[n]. - CV-named columns
-
After the object,
cv_followed by a vocabulary accession and the term name (spaces replaced by_) gives the column a defined meaning:cv_MS:1002476_ion_mobility_drift_timeis the PSI-MS term "ion mobility drift time". colunit-*-
An optional column with a unit has a
colunit-small_molecule,colunit-small_molecule_featureorcolunit-small_molecule_evidenceline in the metadata (see Quantification and identification metadata). In the example, all three columns that carry a number have one.
The specification warns that a column name alone does not fix its meaning: "It MUST not be assumed that optional columns having the same name in different mzTab files contain the same type of information." A CV-named column avoids this, because the accession points to a definition that every reader can look up. We recommend CV-named columns wherever a suitable term exists, as for the drift time and the library spectrum USI; the mass error column shows the other kind, whose meaning a reader can only guess from its name and unit.