How to read mzxml file with Bad subscripting error?

I'm working in mass spectrometer data with an extension (.mzxml) and I'm able to read the file using (mzxmlread) command. The problem, when I read the same file with another software that used for re-processing mass spectrometer data OpenMZ "TOPPView" and save the file with the same extension (mzxml) when I try to read the file in Matlab, the error message appears which is: {
??? Error using ==> numel Bad subscripting index.
Error in ==> mzxmlread at 222 count2 = numel(out.mzXML.msRun.(elementName).(childElemNm)); }
if there is any help that will be really appreciated. Khalf

7 Commenti

What do you observe when you type the following into the Command Window
mzxmlinfo('yourFile.mzxml')
where yourFile.mzxml is the name of your file?
Here the extension of my file and the output of applying (mzxmlinfo)
S=mzxmlinfo('C:\Users\User\Desktop\MZmine\export files\mass_data_Gaussian.mzXML')
S =
Filename: 'mass_data_Gaussian.mzXML'
FileModDate: '06-Oct-2014 21:22:57'
FileSize: 16194941
NumberOfScans: 1641
StartTime: 'N/A'
EndTime: 'N/A'
DataProcessingIntensityCutoff: 'N/A'
DataProcessingCentroided: 'false'
DataProcessingDeisotoped: 'false'
DataProcessingChargeDeconvoluted: 'false'
DataProcessingSpotIntegration: 'N/A'
If in the Command Window you type
dbstop if error
then read your file with mzxmlread, the debugger will pause at line 222 when the error occurs. At this point, in the Command Window type
elementName
childElemNm
out.mzXML.msRun.(elementName).(childElemNm)
What do you see for each?
Geoff Hayes
Geoff Hayes il 9 Ott 2014
Modificato: Geoff Hayes il 9 Ott 2014
Khalfalla's answer moved here
I did, but it's still not work. Three parameters come out with Operation Processing in workspace.
But each of the above three variables must have some sort of value, not Operation Processing. What are their values?
Also, please include the version of MATLAB that you are using.
What are your steps in using the other software. Do you convert the mzxml file to the mxML format (for TOPPView) as
FileConverter -in infile.mzXML -out outfile.mzML
And afterwards, do you convert it back to the mzXml format using a similar conversion (and if so, what is it), or do you just change the extension?
Are you sure that the modified file is still a valid mzXML file that conforms to the mzXML 2.1 specification?
First of all, there are no numerical values for the three parameters just expressions. I use matlab R2013a version. The original file is mzxml file, the software is able to open it, and if I save the file without processing, I'm still able to read it again with matlab, but if I did any processing and save as mzxml as before, the error appear.
Given the line of code
numel(out.mzXML.msRun.(elementName).(childElemNm));
I expect elementName and chilElemNm to be strings, as they are used to access fields within the out.mzXML.msRun structure.

Accedi per commentare.

Risposte (1)

Dear Khalfalla,
The problem might be that your mzxml file that you create is too new/advanced for MATLAB to read using 'mzxmlread'.
The function ' mzxmlread' reads mzXML files that are conform to the mzXML 2.1 specification or earlier specifications. Use an older version of your mzxml processing software and try again!

Categorie

Scopri di più su Class Introspection and Metadata in Centro assistenza e File Exchange

Tag

Richiesto:

il 8 Ott 2014

Risposto:

il 24 Nov 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by