| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Bioinformatics Toolbox |
| Contents | Index |
| Learn more about Bioinformatics Toolbox |
mzXMLStruct = mzxmlread(File)
mzXMLStruct = mzxmlread(File,
...'Levels', LevelsValue, ...)
mzXMLStruct = mzxmlread(File,
...'TimeRange', TimeRangeValue, ...)
mzXMLStruct = mzxmlread(File,
...'ScanIndices', ScanIndicesValue, ...)
mzXMLStruct = mzxmlread(File,
...'Verbose', VerboseValue, ...)
| File | String containing a file name, or a path and file name, of an mzXML file that conforms to the mzXML 2.1 specification or earlier specifications. If you specify only a file name, that file must be on the MATLAB search path or in the current directory. | |
| LevelsValue | Positive integer or vector of integers specifying the level(s) of spectra in File to read. Default is to read all levels of spectra.
| |
| TimeRangeValue | Two-element numeric array [Start End] that specifies the range of time in File to read. Start is a scalar between the startTime and endTime attributes of the msRun element in File. End is a scalar between Start and the endTime attribute of the msRun element in File. Default is to read spectra from all times.
| |
| ScanIndicesValue | Positive integer, vector of integers, or a two-element numeric array [Start_Ind End_Ind] that specifies a scan, multiple scans, or a range of scans in File to read. Start_Ind and End_Ind are each positive integers indicating a scan number in the num attribute of the msRun element in File. Start_Ind must be less than End_Ind. Default is to read all scans.
| |
| VerboseValue | Controls the display of the progress of the reading of File. Choices are true (default) or false. |
| mzXMLStruct | MATLAB structure containing information from an mzXML file. It includes the fields shown in the table below. |
mzXMLStruct = mzxmlread(File) reads an mzXML file, File, and then creates a MATLAB structure, mzXMLStruct.
File is a string containing a file name, or a path and file name, of an mzXML file. The file must conform to the mzXML 2.1 specification or earlier specifications. You can view the mzXML 2.1 specification at:
http://sashimi.sourceforge.net/schema_revision/mzXML_2.1/Doc/mzXML_2.1_tutorial.pdf
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:
|
Tip LC/MS data analysis requires extended amounts of memory from the operating system.
|
mzXMLStruct = mzxmlread(File, ...'PropertyName', PropertyValue, ...) calls mzxmlread with optional properties that use property name/property value pairs. You can specify one or more properties in any order. Each PropertyName must be enclosed in single quotation marks and is case insensitive. These property name/property value pairs are as follows:
mzXMLStruct = mzxmlread(File,
...'Levels', LevelsValue, ...) specifies
the level(s) of spectra in File to read. LevelsValue is
a positive integer or vector of integers. Default is to read all levels
of spectra.
Tip For summary information about the levels of spectra in an mzXML file, use the mzxmlinfo function. |
mzXMLStruct = mzxmlread(File, ...'TimeRange', TimeRangeValue, ...) specifies the range of time in File to read. TimeRangeValue is two-element numeric array [Start End]. Start is a scalar between the startTime and endTime attributes of the msRun element in File. End is a scalar between Start and the endTime attribute of the msRun element in File. Default is to read spectra from all times.
Tip For summary information about the time ranges in an mzXML file, use the mzxmlinfo function. |
mzXMLStruct = mzxmlread(File, ...'ScanIndices', ScanIndicesValue, ...) specifies a scan, multiple scans, or range of scans in File to read. ScanIndicesValue is a positive integer, vector of integers, or a two-element numeric array [Start_Ind End_Ind]. Start_Ind and End_Ind are each positive integers indicating a scan number in the num attribute of the msRun element in File. Start_Ind must be less than End_Ind. Default is to read all scan.
Tip For summary information about the scan indices in an mzXML file, use the mzxmlinfo function. |
mzXMLStruct = mzxmlread(File, ...'Verbose', VerboseValue, ...) controls the display of the progress of the reading of File. Choices are true (default) or false.
Note In the following example, the file results.mzxml is not provided. Sample mzXML files can be found at: |
Read an mzXML file into the MATLAB software as a structure.
out = mzxmlread('results.mzxml')
out =
mzXML: [1x1 struct]
index: [1x1 struct]
scan: [2000x1 struct]View the first scan in the mzXML file by creating separate variables containing the mass and charge values respectively, and then plotting these values.
m = out.scan(1).peaks.mz(1:2:end); z = out.scan(1).peaks.mz(2:2:end); stem(m,z,'marker','none')

Bioinformatics Toolbox functions: jcampread, mzcdfread, mzxml2peaks, mzxmlinfo, tgspcread
MATLAB function: xmlread
![]() | mzxmlinfo | ndims (DataMatrix) | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |