Peak Detection

From MicrobeMS Wiki
Revision as of 13:50, 18 March 2023 by Laschp (talk | contribs) (→‎Peak picking - basic concepts)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Peak picking is an essential (and the final) step of the spectral pre-processing pipeline. The result of peak picking is a peak table which is attached to the mass spectra. In MicrobeMS peak picking can be started via the find peaks command of the Peak pick pulldown menu (shortcut <ctrl>+P), or by pressing the peak button located in the Peak pick tab.

Screenshot of the peak pick window

Peak picking - basic concepts

Peak picking in MicrobeMS is always carried out on the basis of original, or pre-processed mass spectra, i.e. the content of existing peak table produced by software packages from other vendors will be ignored. The key idea of peak picking in MicrobeMS is based on two observations. Firstly, it is often convenient to limit the number of peaks per mass spectrum to pre-defined values. Secondly, the analytical sensitivity of MALDI-TOF mass spectrometry is different in different m/z regions: The sensitivity is higher in the low m/z region and lower in the high m/z region. These two observations are addressed with the procedure described next:

 1. The first step of peak detection in MicrobeMS involves the generation of 
    a threshold function represented by a S-shaped curve (see screenshot below)
Threshold function Y(m/z) for peak picking
 2. The threshold function is a special type of a generalized logistic function.
    This function is defined by the following equation:
    Y(m/z) = Y(1) +  Y(2)/{1+e^(Y(2)*k/(x-x(1)))}
    Y(m/z) - the intensity threshold function
    Y(1)   - the minimum intensity with a default value of 
             2% of the maximum peak intensity
    Y(2)   - the difference between the maximum peak intensity 
             and the minimum intensity (Y1) scaled by a factor 
    k      - slope of the curve at the m/z position 
             masslow + x(1), x(1) = delta(m/z)
    x      - the m/z vector (in m/z units) ranging from masslow 
             to masshigh
    x(1)   - delta(m/z)
 3. To obtain the peak tables the intensity threshold function 
    Y(m/z) is automatically obtained on the basis of parameters 
    indicated in the window peak pick parameters. If the checkbox 
    define number of peaks is not checked peak tables will 
    contain only peaks with intensities larger than the threshold 
    function. Otherwise the threshold function will be iteratively 
    scaled until the desired number of peaks has been reached.

When peak picking has been finished a peak table array containing npeaks rows and four columns is created (npeaks denotes the number of peaks in the table, see below for a description of the peak table content). Peak tables are automatically added to the respective MS spectra and are displayed at the left side of the main window of MicrobeMS in a listbox below the listbox denoted with MicrobeMS spectra ID`s. Note that existing peak tables may be overwritten without warning when creating new peak tables. Computational details of peak picking routine are available from the command line window if the checkbox peak pick verbose mode has been activated.

Peak picking - the procedure

To produce peak tables from raw mass spectra the following sequence of steps needs to be taken:

 1. Load the mass spectral data files via the load spectra (Bruker data file format), 
    import spectra from mzXML data, or the load MS multifile options of the File pulldown menu.
 2. Perform spectral pre-processing
 3. Select the respective mass spectra in the listbox at the top left corner (the listbox is 
    labeled by MicrobeMS spectra ID`s). To select multiple spectra hold the <shift> key while selecting.
 4. Choose Peak pick parms (shortcut: <ctrl>+M) from the Peak pick pulldown menu, or 
    alternatively, press the button more in the Pick pick panel located at the central 
    bottom of the main figure of MicrobeMS. A window entitled peak pick parameters comes up.
    Modify parameters of peak pick if necessary. When pressing the button display the intensity
    theshold function will be displayed. Hide removes this function from display. Press done 
    to close this window, the values of modified parameters are not lost by this operation.
 5. To start peak picking press the button peak (Peak pick panel) or select find peaks
    (shortcut: <ctrl>+P) from the Peak pick pulldown menu. In cases where more than one spectrum 
    has been selected a progress indicator will inform on the status of peak picking.

Format of the peak tables

When peak picking has been finished, a peak table array containing npeaks rows and four columns is created (npeaks denotes the number of peaks in the table). The peak tables are attached to the spectral data files and contain the following columns:

  • column #1: the m/z positions of the peaks
  • column #2: the respective intensity values (intensity units). Note that the intensity values may represent intensities after baseline correction and normalization in cases where peak tables were obtained from pre-processed spectra.
  • column #3: weighting factors (weights): these factors are obtained by scaling the values of column #2 (in a 1-norm manner) such that the sum of weighting factors contained in a given peak list equals 100. Note that the ratios between the peak intensities are preserved.
  • column #4: contains the intensity values of the threshold function (see above) at the m/z positions given by column #1

See also Description of the format of peak list files (*.pkf)

View peak list

This function allows to view and copy peak list data. Press the view button in the Peak pick panel tab to view peak list data (see screenshot below).

View & copy peak list data
To copy the content of the columns copy positions [m/z] (peak position), intensity [AU] (peak intensities from original, or pre-processed spectra), and weightings [AU] (peak weighting factors) check the appropriate checkboxes at the bottom of the window and press copy.

Checkbox transpose lists: Columns are rotated by 90 degrees if checked (i.e. columns are transposed to lines).

Checkbox copy ANN formatted weightings: Activate this checkbox to convert weightings into five different intensity values (bins) which can take values of 1 to 5.