mzID
Dependencies & Environment
Package-intrinsic requirements from the Bioconductor landing page — reproduce in any R environment.
- Version: 1.50.0 · Bioconductor: 3.23 · R: ≥ 4.6
- Imports: XML, plyr, doParallel, foreach, iterators, ProtGenerics
- System requirements: URL
- Install:
BiocManager::install("mzID")
When to Use
- Parsing mzIdentML Files: Reading HUPO-PSI standard
mzIdentML(.mzid) files containing peptide and protein identification results using themzID()function. - Data Flattening: Converting complex, nested structures of mzIdentML files into flat, easy-to-manipulate R
data.frameobjects using theflatten()function. - Metadata Extraction: Extracting search database details, peptide-spectrum matches (PSMs), and search engine scores for downstream custom analysis.
When NOT to Use
- For parsing raw mass spectrometry spectra (mzML, mzXML) or quantitative data (mzQuantML), use
mzRinstead becausemzIDonly parses identification files. - For high-level quantitative proteomics data manipulation, use
MSnbaseinstead becausemzIDis strictly a barebones parser for identification data.
Data Requirements
- Input: Valid
mzIdentML(.mzid) files conforming to the HUPO-PSI schema. - Structure: The parsed
mzIDobject contains slots forparameters,psm,peptides,evidence, anddatabase.
Key Parameters
- file: Path to the mzIdentML file to be parsed (passed as the first argument to
mzID()).
Best Practices
- Flatten Immediately: Use the
flatten()function immediately after parsing to convert the complex S4mzIDobject into a flatdata.framefor standard R operations. - Inspect Column Meanings: Carefully inspect the column names of the flattened results (e.g., using
names()), as ambiguity can arise (e.g.,lengthrefers to the nucleotide sequence coding for the protein, not the peptide length). - Verify Sequence Lengths: Use
nchar()andsubstr()on the sequence columns to verify you are working with the expected string lengths.
Common Pitfalls
- Misinterpreting Flattened Columns: Assuming the
lengthcolumn in a flatteneddata.framerefers to the peptide sequence length. Fix: Inspect the content usingflatResults$lengthand verify it refers to the protein's nucleotide sequence length. - Parsing Errors on Custom Files: Encountering errors during parsing due to the multitude of different ways software writes mzIdentML files. Fix: Contact the package maintainer to get the specific file structure supported.
Alternatives
- mzR: For fast, C++-based parsing of mzIdentML files using the ProteoWizard backend, as well as raw mzXML/mzML files.
- MSnbase: For reading and managing both identification and quantitation data in unified, high-level containers.
Citations
- Pedersen TL (2026). Parsing mzIdentML files using mzID. R package vignette.
References
- Homepage: https://bioconductor.org/packages/mzID
- Vignette: https://bioconductor.org/packages/release/bioc/vignettes/mzID/inst/doc/mzID.html
Run this on BioMate
This skill is the knowledge layer — when, why, and how to use mzid. To run this analysis on your own data with managed compute, automated QC, and reproducible outputs, use BioMate — free to start.