-
Notifications
You must be signed in to change notification settings - Fork 2
Extracting profile or spectrum
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

The small script allows very easily to obtain EIP between any m/z interval as setup in the mzLim variable
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
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 objects will all associated properties and methods. For example,
spra2.plot

can be used to plot the spectrum or
MS = spra2.Data;
to copy the data to the variable MS. The averaged spectrum is particularly attractive when using a centroid spectrum mode. While with profile mode, the spectrum is a continuous profile, with centroid mode Finnee2016 do not bucket the data allowing to keep the accurate masses of each spectrum. Those can be easily measured zooming around the peak of interest
![averaged spectrum in centroid mode] (https://github.com/glerny/img4wiki/blob/master/SpectrumCentroid.gif)
thus allowing to defined an extremely narrow m/z range for EIP in centroid mode.
getProfile is similar to getSpectra and allows to obtain a profile at a single m/z value or between an m/z interval. It is evident that in the case of a centroid mode dataset a single value does not present a lot of interest.
prf1 = prf1 = myFinnee.Datasets{1}.getProfile([243.0577 243.0612])
prf1.plot
! [EIP, dataset in ctrMode(https://github.com/glerny/img4wiki/blob/master/EIPCtrDts.gif)
Up : Profile and spectrum
Next : Extracting profile or spectrum
Previous : Profile and spectrum
Related to: