Convert mzXML structure to peak list
[
Peaklist
, Times
]
= mzxml2peaks(mzXMLStruct
)
[Peaklist
, Times
]
= mzxml2peaks(mzXMLStruct
, 'Levels', LevelsValue
)
mzXMLStruct | MATLAB® structure containing information from an
mzXML file, such as one created by the |
LevelsValue | Positive integer or vector of integers that specifies
the level(s) of spectra in |
Peaklist | 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 Peaklist . |
[
extracts
peak information from Peaklist
, Times
]
= mzxml2peaks(mzXMLStruct
)mzXMLStruct
, a MATLAB structure
containing information from an mzXML file, such as one created by
the mzxmlread
function, and
creates Peaklist
, 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:
|
[
specifies
the level(s) of the spectra in Peaklist
, Times
]
= mzxml2peaks(mzXMLStruct
, 'Levels', LevelsValue
)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).
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)