Skip to content

Extracting profile or spectrum

Guillaume Erny edited this page Jan 18, 2017 · 13 revisions

In [x-HRMS] () analysis extracted ion profiles [EIP] () is one of the most interesting tools. By filtrating the dataset around a well defined m/z interval, it allows extracting a signal that is specific to one ionized species (molecular ions, adducts...) of a separated compounds. The principle is simple and can readily be done using the Traces objects. For example

TimeAxe  =  myFinnee.Datasets{1}.TimeAxe.Data;       % Get the time axe from dataset 1
EIP(:,1) = TimeAxe;                                  % Time in first column
mzLim = [242 243];                                   % set values of interest
for ii = 1:length(TimeAxe)                          
    MS = myFinnee.Datasets{1}.ListOfScans{ii}.Data;  % Load MS spectra for each ii
    d2k = MS(:,1) >= mzLim(1) & MS(:,1) <= mzLim(2); % Find data between mzmin and mzmax
    EIP(ii, 2) = sum(MS(d2k, 2));
end

plot(EIP(:,1), EIP(:,2))                             % plot resulting data

Example EIP

The small script allows very easily to obtain EIP between any m/z interval as setup in the mzLim variable

Using the getProfile and getSpectra Dataset class methods

One of the main interest of OOP is not a class can contain data in a very formalized way, but also specific methods. Two methods have been programmed, the getProfile and getSpectra, to obtain MS spectrum or extracted ion profiles from datasets

getSpectra

The [getSpectra] (https://github.com/glerny/Finnee2016/wiki/getSpectra(Dataset)) method allows to obtained either a spectrum a particular time or the average spectrum between a time interval. For example with the previous EIP with a peak maximum at 8.537 min and peak base at ~8.703 min and ~8.788 the average spectrum cab be obtained using

spra1 = myFinnee.Datasets{1}.getSpectra(8.537);         % Spectrum at 8.537 min
spra2 = myFinnee.Datasets{1}.getSpectra([8.403 8.788]); % averaged spectrum between 8.403 and 8.788

spra1 and spra2 are [trace] object will all


Up            : Profile and spectrum
Next         : Extracting profile or spectrum
Previous  : Profile and spectrum


Related to:

Clone this wiki locally