- Mass spectrometry-based proteomics generates large amounts of data that must be stored, processed, interpreted, and exchanged between different software applications. Specialized data formats are required to represent experimental mass spectrometry measurements, peptide and protein identification results, and summarized quantitative information. Three important formats developed through the Proteomics Standards Initiative (PSI) of the Human Proteome Organization (HUPO) are mzML, mzIdentML, and mzTab. They serve complementary purposes in proteomics workflows. mzML stores mass spectrometry data, mzIdentML represents peptide and protein identification results, and mzTab provides a more accessible tabular representation of identification and quantitative results.
- The mzML format is an XML-based standard designed to store and exchange mass spectrometry data. It was developed to provide a common representation of experimental data generated by different mass spectrometers and acquisition platforms. Before the adoption of mzML, instrument manufacturers and software developers often used proprietary formats, making it difficult to transfer data between applications. mzML addresses this problem by providing a standardized structure for representing mass spectra, chromatograms, instrument information, experimental settings, and associated metadata.
- An mzML file commonly uses the .mzML extension and is organized into XML elements and attributes. Its main components include information about the file, software, instrument configuration, data processing, samples, experimental runs, spectra, and chromatograms. The mzML root element contains the overall document structure. The cvList element identifies controlled vocabularies used to describe mass spectrometry concepts, while elements such as fileDescription, softwareList, instrumentConfigurationList, dataProcessingList, sampleList, and run provide information about the experiment and its organization.
- One of the most important components of mzML is the spectrumList element, which contains individual mass spectra. Each spectrum is represented by a spectrum element with attributes such as an identifier and an index. Spectrum metadata may include the MS level, scan time, polarity, precursor information, and instrument-related parameters. The binaryDataArrayList element stores numerical arrays, commonly including mass-to-charge ratios (m/z) and corresponding intensity values. These arrays are typically encoded in binary form to reduce file size and improve storage efficiency.
- A simplified mzML spectrum structure may look like this:
<?xml version=”1.0″ encoding=”UTF-8″?>
<mzML xmlns=”http://psi.hupo.org/ms/mzml”
version=”1.1.0″
id=”example”>
<run id=”example_run”>
<spectrumList count=”1″>
<spectrum index=”0″ id=”scan=1″>
<cvParam
accession=”MS:1000511″
name=”ms level”
value=”1″/>
<binaryDataArrayList count=”2″>
<binaryDataArray>
<cvParam
accession=”MS:1000514″
name=”m/z array”
value=””/>
<!– Encoded binary m/z values –>
</binaryDataArray>
<binaryDataArray>
<cvParam
accession=”MS:1000515″
name=”intensity array”
value=””/>
<!– Encoded binary intensity values –>
</binaryDataArray>
</binaryDataArrayList>
</spectrum>
</spectrumList>
</run>
</mzML>
- This example illustrates the general organization of a spectrum rather than a complete, independently valid mzML document. Real mzML files require additional metadata and correctly encoded binary arrays. The controlled vocabulary parameters identify the type of information stored in each element. For example, the MS level distinguishes between different stages of mass spectrometry acquisition. MS1 spectra generally record precursor ion signals, while MS2 spectra contain fragment-ion information used in peptide identification.
- mzML can represent both centroided and profile-mode spectra. In profile mode, the instrument data contain measurements across a range of m/z values, while centroided data represent peaks using selected m/z positions and intensities. The format also supports different numerical precision levels, compression methods, and binary-array representations. Controlled vocabulary terms describe these characteristics, allowing software to interpret the encoded measurements correctly.
- Another important component of mzML is the chromatogramList element, which stores chromatographic data. Chromatograms describe signal intensity over time or another acquisition dimension and are useful in liquid chromatography–mass spectrometry (LC-MS) experiments. mzML can also preserve precursor information, isolation windows, selected-ion information, collision-energy settings, scan parameters, and details about the instrument configuration. This metadata is essential for understanding how spectra were acquired and for reproducing downstream analyses.
- The mzIdentML format is an XML-based standard designed to represent peptide and protein identification results generated from mass spectrometry experiments. While mzML stores the experimental spectra, mzIdentML stores the results of interpreting those spectra. It provides a standardized structure for recording peptide sequences, protein database matches, peptide-spectrum matches (PSMs), search parameters, identification scores, confidence measures, and supporting evidence.
- An mzIdentML file commonly uses the .mzid extension. Its structure includes information about the software used for identification, the protein sequence database, search settings, spectra data, peptide sequences, protein entries, and identification results. Important elements include AnalysisSoftwareList, SequenceCollection, AnalysisCollection, AnalysisProtocolCollection, Inputs, and DataCollection. Together, these elements describe the experimental inputs, analytical procedures, sequence evidence, and identification results.
- The SequenceCollection element contains information about protein sequences, peptide sequences, and relationships between peptides and proteins. A DBSequence element represents a protein sequence from a database, while a Peptide element describes an identified peptide sequence and may include modifications. The PeptideEvidence element links a peptide to a particular protein sequence and provides information about its position and mapping. This relationship is important because a peptide may occur in more than one protein, making protein inference and interpretation more complex.
- The AnalysisCollection and AnalysisProtocolCollection elements describe the identification analysis and the parameters used. They may record the search software, enzyme specificity, fixed and variable modifications, mass tolerances, and other search settings. The Inputs section identifies the source data and sequence database used in the analysis. The DataCollection element contains the analysis data, including the spectrum identification results.
- A simplified mzIdentML structure may look like this:
<?xml version=”1.0″ encoding=”UTF-8″?>
<MzIdentML
xmlns=”http://psidev.info/psi/pi/mzIdentML/1.2″
id=”example”
version=”1.2.0″>
<SequenceCollection>
<DBSequence
id=”DBSeq_1″
accession=”P12345″
searchDatabase_ref=”SearchDB_1″/>
<Peptide id=”Pep_1″>
<PeptideSequence>PEPTIDE</PeptideSequence>
</Peptide>
<PeptideEvidence
id=”Evidence_1″
peptide_ref=”Pep_1″
dBSequence_ref=”DBSeq_1″/>
</SequenceCollection>
<DataCollection>
<AnalysisData>
<SpectrumIdentificationList id=”SIL_1″>
<SpectrumIdentificationResult
id=”SIR_1″
spectrumID=”scan=1″
spectraData_ref=”Spectra_1″>
<SpectrumIdentificationItem
id=”SII_1″
peptide_ref=”Pep_1″
chargeState=”2″
experimentalMassToCharge=”400.2″
passThreshold=”true”>
<PeptideEvidenceRef
peptideEvidence_ref=”Evidence_1″/>
</SpectrumIdentificationItem>
</SpectrumIdentificationResult>
</SpectrumIdentificationList>
</AnalysisData>
</DataCollection>
</MzIdentML>
- This simplified example demonstrates the relationships between protein sequences, peptides, peptide evidence, and spectrum identification results. A complete mzIdentML document requires additional elements and references, including appropriate metadata, inputs, analysis software, protocols, controlled vocabulary declarations, and spectra data references. The exact structure also depends on the mzIdentML version.
- The SpectrumIdentificationList element is central to recording peptide identification results. It contains one or more SpectrumIdentificationResult elements, each representing an identification result associated with a spectrum. A SpectrumIdentificationResult can contain multiple SpectrumIdentificationItem elements, which represent candidate peptide-spectrum matches. These items may include charge state, experimental and calculated mass-to-charge values, identification scores, threshold information, and references to peptide evidence.
- mzIdentML supports the representation of peptide modifications, including fixed and variable modifications. Modification information can describe the position of a modified residue, the chemical mass difference, and the associated controlled vocabulary term. This is particularly important for post-translational modifications (PTMs), such as phosphorylation, glycosylation, acetylation, and oxidation. The format also supports identification scores and statistical information, although the meaning of each score must be interpreted according to the software and method that generated it.
- Protein inference is another important aspect of mzIdentML. A single peptide sequence may match multiple protein entries, particularly when proteins share conserved regions or belong to the same protein family. mzIdentML can represent the evidence connecting peptides to proteins, allowing downstream software to evaluate protein identifications and distinguish between unique and shared peptide evidence. However, the format does not itself determine which protein inference strategy is scientifically appropriate. That decision depends on the identification algorithm, evidence, and statistical framework.
- The mzTab format is a tab-delimited text format developed to provide a more accessible representation of proteomics results. Unlike mzML and mzIdentML, which are XML-based and can contain complex nested structures, mzTab is designed to be easier to read, inspect, process, and exchange using spreadsheets, scripts, and statistical software. It can represent protein identifications, peptide identifications, peptide-spectrum matches, and quantitative information in a structured tabular form.
- An mzTab file commonly uses the .mzTab extension. It contains metadata lines and one or more data sections. Metadata lines begin with MTD, while data rows use section-specific prefixes. Common sections include protein, peptide, and PSM information. In mzTab versions designed for proteomics, these sections allow researchers to connect identified proteins with their supporting peptides and peptide-spectrum matches. Quantitative measurements can also be represented using defined abundance and intensity fields.
- A simplified mzTab file may look like this:
MTD mzTab-version 1.0.0
MTD mzTab-mode Summary
MTD mzTab-type Identification
PRH accession description taxid sequence
PRT P12345 Example protein 9606 PEPTIDEEXAMPLE
PEH sequence accession unique
PEP PEPTIDE P12345 1
PSH sequence PSM_ID accession charge
PSM PEPTIDE 1 P12345 2
- This example illustrates the general tabular organization of mzTab, rather than a complete standards-compliant file. Actual mzTab documents require the appropriate metadata, column definitions, required fields, and controlled vocabulary references for the selected version and data type. The metadata section identifies the mzTab version, mode, type, software, instruments, samples, databases, and other experimental details as applicable.
- The protein section records protein-level identification information. It can include protein accession numbers, descriptions, taxonomy, sequence information, evidence, and quantitative measurements. The peptide section describes identified peptide sequences and their associated proteins, modifications, uniqueness, and quantitative values. The PSM section provides more detailed information about individual peptide-spectrum matches, including spectrum references, charge states, scores, and related identification evidence. These sections make mzTab useful for sharing identification and quantification results without requiring users to parse complex XML structures.
- The mzTab format has evolved to support different types of omics data. mzTab-P is designed for proteomics, while mzTab-M is designed for metabolomics. These variants share the general goal of providing a standardized tabular representation of analytical results, but their data models and fields are adapted to their respective domains. Researchers should use the appropriate variant and version for their experiment rather than assuming that every mzTab file has the same structure.
- The three formats have complementary roles in a typical mass spectrometry-based proteomics workflow. mzML stores the raw or processed mass spectrometry data, including spectra and chromatograms. Identification software analyses these data by comparing experimental spectra with theoretical peptide fragmentation patterns or by using other identification strategies. The resulting peptide and protein identification evidence can then be represented in mzIdentML. A more accessible summary of identification and quantitative results can be provided in mzTab.
- A simplified workflow can be represented as follows:
Mass spectrometer
|
v
mzML file
(Spectra and chromatograms)
|
v
Peptide identification software
|
v
mzIdentML file
(Peptide and protein identification evidence)
|
v
Result summarization and quantification
|
v
mzTab file
(Tabular identification and quantitative results)
- These formats are supported by a range of bioinformatics tools and libraries. In Python, Pyteomics provides modules for working with mzML and mzIdentML data. The MzML reader can be used to inspect spectra and metadata, while the MzIdentML reader can be used to access identification results. Other tools include pymzML for reading and processing mzML files and pyOpenMS, which provides Python access to OpenMS functionality for mass spectrometry data processing.
- The following Python example demonstrates how to read spectra from an mzML file using Pyteomics:
from pyteomics import mzml
# Read spectra from an mzML file
with mzml.read(“experiment.mzML”) as reader:
for spectrum in reader:
print(“Spectrum ID:”, spectrum.get(“id”))
print(“MS level:”, spectrum.get(“ms level”))
mz_values = spectrum.get(“m/z array”, [])
intensities = spectrum.get(“intensity array”, [])
print(“Number of peaks:”, len(mz_values))
if len(mz_values) > 0:
print(“First m/z value:”, mz_values[0])
print(“First intensity:”, intensities[0])
- This example extracts spectrum identifiers, MS levels, m/z values, and intensity values. Real datasets may contain thousands or millions of spectra, so processing should generally be performed iteratively rather than loading all data into memory unnecessarily.
- Pyteomics can also be used to read peptide identification information from an mzIdentML file:
from pyteomics import mzid
# Read identification results
with mzid.read(“identifications.mzid”) as reader:
for identification in reader:
print(“Spectrum ID:”, identification.get(“spectrumID”))
for item in identification.get(
“SpectrumIdentificationItem”,
[]
):
print(
“Peptide reference:”,
item.get(“peptide_ref”)
)
print(
“Charge state:”,
item.get(“chargeState”)
)
- The exact fields returned by a parser depend on the document version and library implementation. Researchers should consult the library documentation and inspect the available fields when building automated pipelines.
- R provides several tools for mass spectrometry and proteomics data analysis. The Bioconductor ecosystem includes packages such as mzR, MSnbase, and Spectra for reading and processing mass spectrometry data. These packages support workflows involving spectral data, peak information, chromatograms, and downstream statistical analysis. Other proteomics packages support peptide identification, protein quantification, and integration with experimental metadata.
- For example, the following R code uses mzR to inspect an mzML file:
library(mzR)
# Open an mzML file
ms_data <- openMSfile(“experiment.mzML”)
# Display the number of spectra
print(centroided(ms_data))
# Retrieve spectrum metadata
metadata <- header(ms_data)
# Display selected metadata
print(head(metadata))
# Close the file
close(ms_data)
- The mzR package provides access to mass spectrometry data through its supported backends. The exact functions and returned metadata depend on the package version and file type. For more extensive workflows, Spectra and MSnbase provide additional facilities for processing and analysing mass spectrometry data.
- OpenMS is another important open-source platform for mass spectrometry data analysis. It supports processing, identification, quantification, and conversion workflows involving standardized proteomics formats. Proteome Discoverer, MaxQuant, Mascot, and other identification platforms may also export results in formats compatible with proteomics data-processing pipelines, although available export options differ between software packages and versions. PRIDE Archive, a major public repository for proteomics data, uses standardized formats and associated metadata to support data sharing and reuse.
- mzML, mzIdentML, and mzTab are important in different stages of proteomics research. mzML is used for storing and exchanging experimental mass spectrometry data, supporting spectral inspection, peak analysis, chromatographic analysis, and data processing. mzIdentML is used to preserve peptide-spectrum matches, peptide evidence, protein mappings, identification scores, and search parameters. mzTab supports the exchange of summarized protein, peptide, PSM, and quantitative results in a form that is easier to inspect and analyse with general-purpose software.
- These formats also contribute to reproducibility and data integration. mzML preserves experimental measurements and acquisition metadata, mzIdentML records identification evidence and analytical settings, and mzTab makes important results accessible for statistical analysis and reporting. Together, they help connect raw experimental data with biological interpretations and published results. They can also support the deposition of proteomics datasets in public repositories, where standardized formats improve accessibility and reuse.
- Researchers should pay attention to data integrity, controlled vocabularies, file versions, and metadata completeness when working with these formats. mzML files can be large because they contain extensive spectral data and encoded binary arrays. mzIdentML files may contain complex relationships between spectra, peptides, proteins, and evidence records. mzTab files are easier to inspect but may not preserve every detail available in the original spectral and identification files. Therefore, mzTab should not automatically be treated as a replacement for mzML or mzIdentML when detailed experimental or identification evidence is required.
- File conversion also requires care. Converting mzML data into a simplified tabular representation may remove information about acquisition settings, chromatograms, or binary spectra. Converting mzIdentML into mzTab may summarize identification evidence and omit details that are not represented in the selected mzTab version. Researchers should preserve the original files and document the software, versions, parameters, conversion steps, and controlled vocabulary terms used in the workflow.
- For reproducible proteomics research, it is important to maintain links between the raw mass spectrometry data, identification results, protein and peptide accessions, sample metadata, and quantitative measurements. Researchers should record the search engine, protein sequence database and release, enzyme specificity, mass tolerances, fixed and variable modifications, false discovery rate (FDR) procedures, and quantification methods. These details are necessary for evaluating the reliability of peptide and protein identifications and understanding how reported results were generated.
- mzML, mzIdentML, and mzTab form an important part of the standardized data infrastructure used in modern proteomics. mzML provides a structured representation of experimental mass spectrometry measurements, mzIdentML describes peptide and protein identification evidence, and mzTab offers a convenient tabular representation of proteomics results. Understanding their organization, purposes, relationships, and limitations enables researchers to process, exchange, interpret, and share mass spectrometry-based proteomics data in a reliable and reproducible manner.