| Bioinformatics Toolbox™ | ![]() |
[Peaks, Times]
= mzxml2peaks(mzXMLStruct)
[Peaks, Times]
= mzxml2peaks(mzXMLStruct, 'Levels', LevelsValue)
| mzXMLStruct | MATLAB structure containing information from an mzXML file, such as one created by the mzxmlread function. It includes the fields shown in the table below. |
| LevelsValue | Positive integer or vector of integers that specifies the level(s) of spectra in mzXMLStruct to convert, assuming the spectra are from tandem MS data sets. Default is 1, which converts only the first-level spectra, that is, spectra containing precursor ions. Setting LevelsValue to 2 converts only the second-level spectra, which are the fragment spectra (created from a precursor ion). |
| Peaks | Either of the following:
|
| Times | Vector of retention times associated with a liquid chromatography/mass spectrometry (LC/MS) or gas chromatography/mass spectrometry (GC/MS) data set. The number of elements in Times equals the number of elements in Peaks. |
[Peaks, Times] = mzxml2peaks(mzXMLStruct) extracts peak information from mzXMLStruct, a MATLAB structure containing information from an mzXML file, such as one created by the mzxmlread function, and creates Peaks, a cell array of matrices containing mass/charge (m/z) values and ion intensity values, and Times, a vector of retention times associated with a liquid chromatography/mass spectrometry (LC/MS) or gas chromatography/mass spectrometry (GC/MS) data set. mzXMLStruct includes the following fields:
| Field | Description |
|---|---|
| scan | Structure array containing the data pertaining to each individual scan, such as mass spectrometry level, total ion current, polarity, precursor mass (when it applies), and the spectrum data. |
| index | Structure containing indices to the positions of scan elements in the XML document. |
| mzXML | Structure containing:
|
[Peaks, Times]
= mzxml2peaks(mzXMLStruct, 'Levels', LevelsValue) specifies
the level(s) of the spectra in mzXMLStruct to
convert, assuming the spectra are from tandem MS data sets. Default
is 1, which converts only the first-level spectra,
that is, spectra containing precursor ions. Setting LevelsValue to 2 converts
only the second-level spectra, which are the fragment spectra (created
from a precursor ion).
Note In the following example, the file results.mzxml is not provided. Sample mzXML files can be found at: |
Use the mzxmlread function to read an mzXML file into the MATLAB software as structure. Then extract the peak information of only the first-level ions from the structure.
mzxml_struct = mzxmlread('results.mzxml');
[peaks,time] = mzxml2peaks(mzxml_struct);
Create a dot plot of the LC/MS data.
msdotplot(peaks,time)
Bioinformatics Toolbox functions: msdotplot, mspalign, msppresample, mzxmlread
![]() | mzcdfread | mzxmlinfo | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |