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 件のコメント

Geoff Hayes
Geoff Hayes 2014 年 10 月 8 日
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?
khalfalla
khalfalla 2014 年 10 月 8 日
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'
Geoff Hayes
Geoff Hayes 2014 年 10 月 8 日
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 2014 年 10 月 9 日
編集済み: Geoff Hayes 2014 年 10 月 9 日
Khalfalla's answer moved here
I did, but it's still not work. Three parameters come out with Operation Processing in workspace.
Geoff Hayes
Geoff Hayes 2014 年 10 月 9 日
編集済み: Geoff Hayes 2014 年 10 月 9 日
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?
khalfalla
khalfalla 2014 年 10 月 10 日
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.
Geoff Hayes
Geoff Hayes 2014 年 10 月 10 日
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.

サインインしてコメントする。

回答 (1 件)

Luuk van Oosten
Luuk van Oosten 2014 年 11 月 24 日

0 投票

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!

カテゴリ

ヘルプ センター および File ExchangeClass Introspection and Metadata についてさらに検索

タグ

質問済み:

2014 年 10 月 8 日

回答済み:

2014 年 11 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by