Skip to content

Working with Trace

Guillaume Erny edited this page Jan 17, 2017 · 7 revisions

Recovering information using the Data property in Trace

While the Finnee and Dataset objects allow organising the data, the data are stored in the Trace objects. For example to recover the BPP one might do

XY = myFinnee.Datasets{1}.BPP.Data;

XY is nx2 array with, in the first column the axis and the second the corresponding values

with this variable, it is easy to plot or transform the data. For example

plot(XY(:,1), X(Y:,2))

will plot the BPP with the time as x-axis, while

plot(XY(:,2))

will plot the BPP with scan number as x-axis

Matlab integrates various tools with their graphics. In particular Zoom In, Zoom Out and Data Cursor allow to graphically explore the data.

plot of BPP

In this particular example, Data Cursor allows to known the scan numbers of interest whose data can then be extracted:

MSat511 = myFinnee.Datasets{1}.ListOfScans{511}.Data;
plot(MSat511(:,1), MSat511(:,2))

plot of MSat511

With such system is easy to access every MS scans in a given dataset to access or transform the data, for example:

for ii = 1: length(myFinnee.Datasets{1}.ListOfScans)    
    MSatii = myFinnee.Datasets{1}.ListOfScans{ii}.Data;    
    % Do something to MSatii    
    % Do something else    
end

Class methods: plot

To facilitate further analysis, some methods have been programmed in the trace class. The plot method allows displaying the data with axis and title.

myFinnee.Datasets{1}.BPP.plot;

gives

plot of BPP

As you can see, axes are now labelled. The trace can also be exported to Matlab workspace by right-clicking in the grey-zone and selecting ExportObj. In this case, a new variable called currentTrace will be created (NOTE: this will only work with no icons are selected in the menu bar of the figure).


Up            : Finnee: The User's Manual
Next         : Working with Trace
Previous  : Converting an mzML file to a Matlab object


Related to:

Clone this wiki locally