Forum

Importing data from .mat file

Quote
Quote from Guest on January 24, 2023, 5:24 pm

Hello!

I have used PARADISe v5.98 and v6.0.0.15 before and I was able to import data from a .mat file arranging it in the way they told me. In the v6.0.1 I am not able to import the data in the same form as I did in the previous version though.

I wonder if the format changed or if there is another way to do it. I have the Data, rt, mz and PathsAndFilenames saved in my .mat.

 


Hello!

I have used PARADISe v5.98 and v6.0.0.15 before and I was able to import data from a .mat file arranging it in the way they told me. In the v6.0.1 I am not able to import the data in the same form as I did in the previous version though.

I wonder if the format changed or if there is another way to do it. I have the Data, rt, mz and PathsAndFilenames saved in my .mat.

 

Quote
Quote from Jesper L Hinrich on January 27, 2023, 8:59 am

Hello,

Yes, we have changed how the session information is stored. The information is roughly the same, but store differently.

If you already have a session with imported .CDF files, then you can use "Export Chromatography Data" in the DataTab to export the Data, retention time, mass spectra axis, and sample names. The exported file is a standard MATLAB .mat file.

The exported file can then be modified, in a similar way as for v5.98. Importantly, it should be saved with MATLABs save(...,'-v7.3') function as it allows efficiently accessing subsets of the data. This file can then be imported using the "Import Chromatography Data" in the DataTab.

The new format is similar to the old, but with the chromatographic data called Data which is an array of size #samples by #retentiontimepoints by #massees. The mz variable is a 1 by #masses vector contains the mass axis. The rt variable is a #retentiontimepoints by 1 vector and contains retention time in minutes.

The PathsAndFilenames variable is not strictly needed, but then sample names will then be unknown 1,2,3, etc. . It is a cell array of size #samples by 2 with the first column being folder location and the second the file or sample name.

Best,
Jesper

NB. The edits are due to me trying to include screenshots, but that was unsuccessful.


Hello,

Yes, we have changed how the session information is stored. The information is roughly the same, but store differently.

If you already have a session with imported .CDF files, then you can use "Export Chromatography Data" in the DataTab to export the Data, retention time, mass spectra axis, and sample names. The exported file is a standard MATLAB .mat file.

The exported file can then be modified, in a similar way as for v5.98. Importantly, it should be saved with MATLABs save(...,'-v7.3') function as it allows efficiently accessing subsets of the data. This file can then be imported using the "Import Chromatography Data" in the DataTab.

The new format is similar to the old, but with the chromatographic data called Data which is an array of size #samples by #retentiontimepoints by #massees. The mz variable is a 1 by #masses vector contains the mass axis. The rt variable is a #retentiontimepoints by 1 vector and contains retention time in minutes.

The PathsAndFilenames variable is not strictly needed, but then sample names will then be unknown 1,2,3, etc. . It is a cell array of size #samples by 2 with the first column being folder location and the second the file or sample name.

Best,
Jesper

NB. The edits are due to me trying to include screenshots, but that was unsuccessful.

Quote
Quote from Guest on January 27, 2023, 12:41 pm

Thanks Jesper,

Yes, I was using that arrangement (same as in v6.0.0.15) but I wasn't saving the .mat with v7.3 so I guess that was the error. Now it loads fine.

J. Ezenarro


Thanks Jesper,

Yes, I was using that arrangement (same as in v6.0.0.15) but I wasn't saving the .mat with v7.3 so I guess that was the error. Now it loads fine.

J. Ezenarro

Jesper L Hinrich has reacted to this post.
Jesper L Hinrich
Post Reply: Importing data from .mat file
Exit mobile version