-
Notifications
You must be signed in to change notification settings - Fork 2
Converting an mzML file to a Matlab object
With high-resolution mass spectrometry, mzML files are often larger than 1 GB. Such files can be open using specialised editors such as EmEditor. mzML files are structured text files where tags and attributes allow organising the information. To find specific information, ones need to scan the files for a specific tag and attribute as defined by the HUPO mzML Specification. While mzML files could be used directly, this is not efficient when working with Matlab. Finnee used various objects to organise the information in an optimised way for Matlab. The finnee toolbox used binary files to store MS scans. In this ways, every transformation can be recorded without needing to load very large files on memory. However, it is necessary to first process the mzML file. This is done via the creation of the Finnee object myFinnee.
The Finnee object can be done via running the following command
myFinnee = Finnee;
if used without options, the command Finnee will run a graphic user interface (GUI) and ask for
- the location and name of the mzML file

- A generic name for the destination folder

- A location for the destination folder

The process can take up to 30 mins, depending on the size of the mzML file and specificities of the computer. After completion a new folder with the extension .fin will have been created, this folder the Matlab object myFinnee.mat and binary file with a random name.

The binary file contains all MS scans, myFinnee records the index to those data. The resulting binary file is half the size of the original mzML file. File within the .fin folder should not be moved, renamed or deleted.
The Finnee command may be run with various options. The general command is as follow:
myFinnee = Finnee(options1, param1, options1, param2,...)
where options can be as follow:
- 'overwrite'. No parameters; delete first the folder .fin if any exist
- 'fileIn'. param is the full path to the mzML file
- 'folderOut'. param is the path to the destination folder
- 'tLim'. param is a 2x1 array of reals. param(1) is the starting time at which the scans should be recorded and param(2) then ending time.
- 'spikes'. param is an integer equal to 0 to 3 (default value: 1). With this option, spikes will be removed for each MS scans before recording, where spikes are series of non-zeroes intensities, delimited by zeros intensities values, whose number of points is less or equal that param. By default, singleton points (param = 1) are removed.
Using options with the Finnee command allows batch creation. For example, using the followingg script:
[file, path] = uigetfile('*.mzML', 'MultiSelect', 'on'); % load multiple mzML files (they should all
% be in the same folder)
folderOut = uigetdir(); % get the destination folde
for ii = 1:length(file) % loop on each mzML file
ii, datetime % follow the routine
[~, fileID, ~] = fileparts(file{ii}); % generic name for the finne folder, here name
% of the mzML file with the .fin extension
myFinnee = Finnee('overwrite', ...
'tLim', [0 30], ...
'fileIn', fullfile(path, file{ii}),...
'folderOut', folderOut, ...
'fileID', fileID);
end
Finnee objects are saved automatically at creation or when a new dataset is added. To load a Finnee object, you can either use
load('(the full path)\myFinnee.mat')
or you can load the .fin folder using browse for folder, and double click on myFinnee.mat

Up : Where to start?
Next : Trace, Dataset and Finnee objects
Previous: mzML files