Skip to content

Peak Selection and Plotting

michaelmarty edited this page Feb 22, 2023 · 6 revisions

Picking Peaks

After you have deconvolved your data, you will see the deconvolved mass distribution and the deconvolved 2D m/z vs. charge and mass vs. charge plots. The next step is to detect peaks in the deconvolved mass spectrum. There are two key parameters to define a peak:

  • Peak Detection Range (Da): The peak detection range specifies the local window to consider when detecting a peak. A peak needs to be the local max within a window of +/- this range to be considered a peak. For example, if you set the window as 10 Da, only peaks within a window of +/- 10 Da will be considered peak. Any other local maximum are ignored.

  • Peak Detection Threshold: The peak detection threshold specifies how tall the relative peak height (normalized to a max spectrum intensity of 1) needs to be to considered a peak. For example, a threshold of 0.1 would mean that any peaks below a 10% max intensity would be ignored. If you set this to 0, any local maximum (within the defined detection range) are counted.

To pick peaks, simply click the "Peak Detection" button in the red panel, the red button at the top of the controls, or click Ctrl+P.

Peak Plots

After picking peaks, you will then see markers appear on the mass distribution indicating the detected mass peaks. These will match to the peak panel on the right. Additional markers will appear on the m/z plot to indicate the charge state peaks for each mass on the raw data.

Important Note: Markers on the m/z plot are rounded to the nearest data point based on the average mass of the peak and the theoretical m/z for that mass. The actually experimental peak may be different. The average mass reported in the table is the apex mass, meaning the data point with the highest intensity. This is not the centroid. Thus, it will be rounded to the nearest mass sampling. For example, if the mass is sampled every 10 Da, the mass will be a multiple of 10. Thus, it is not uncommon to see slight deviations from peak center for these markers. It is just an artifact of plotting that can be removed to some degree by using finer mass sampling.

Finally, it will create a bar chart of the relative peak heights for each peak.

To see the isolated m/z distribution from each mass peak, simply click the "Plot Peaks" button. It will then create a waterfall plot with the isolated m/z spectrum from each peak.

Adjusting the Peak Displays

There are a few key parameters that you can adjust to improve the look of these plots and to get additional information out of your data.

  • Peak Normalization: Normally the peak is normalized so that the highest peak is 100 ("Max" normalization mode). If you would like to normalize to the sum, so that the total summed intensity of all peaks is 100, you can select "Total" and then click Peak Detection again. You can also turn off normalization to get the raw intensities of each deconvolved peak. This is especially useful when you turn off data normalization in the Additional Data Processing Parameters.

  • Marker Threshold: UniDec needs a way to decide which markers need to be displayed on the plot. Otherwise, it would put markers at all possible charge states. This parameter tells it what relative signal intensity to use as the cutoff. This cutoff intensity is relative to the max intensity of each peak, not the global. For example, the default setting is 0.1, which means that any charge states with less than 10% relative intensity of the highest peak in each charge series will be ignored. For a peak with a max relative intensity of 0.5, this will mean markers will only be plotted when the deconvolved signal is above 0.05.

  • Species Separation: This defines how much space to put between cascading plots on the waterfall plot (see above).

  • Integration Range: When you pick peaks, UniDec will tell you their peak height. But, it is possible to also show peak areas by integrating. Here, you set the integration range. You can specify asymmetric integration by putting different values (-30 and 40 for example) for the high and low integration range. Unfortunately, it will use the same integration range across the spectrum, but contact me if this is a problem. To integrate peaks, click "Analysis > Integrate Peaks" or Ctrl+I. After integration, the peak panel will update to display the peak areas. Note, these are normalized as specified by the normalization box above. It will also show the integration of each peak on the mass distribution and update the bar chart to reflect peak areas rather than peak heights.

Raw vs. Centroid

There are also options to select "Reconvolved/Profile" or "Raw/Centroid" mode. As part of UniDec deconvolution, a Richardson-Lucy deconvolution can be applied (when the peak FWHM is set above 0) that has the effect of sharpening peaks. It doesn't create true centroids, but the raw deconvolution results (selected by "Raw/Centroid") mode can have peak widths that are less than the experimental data. You may want this to improve the resolution. However, if you want to match the raw data as closely as possible, UniDec can add back in the peak convolution with the "Reconvolved/Profile" setting, which should look close to the raw data. Both will look the same with the peak FWHM is set to 0.

Other Useful Plotting Options

In the last Additional Plotting Parameters tab, there are a handful of useful controls from plots throughout the program.

  • 2D Color Map: This specifies the colormap of the 2D heatmap plots. Any matplotlib colormap can be selected.

  • Peaks Color Map: Specifies the colormap for the peaks. Note, these colors can be changed manually by right clicking peaks in the Peak Panel and selecting "Color Select"

  • Discrete Plot: The 2D plots in UniDec are by default smooth contour plots. If you want to make them into discrete plots with regular colored rectangles, check this box. Discrete plots are definitely faster, but I think they usually don't look as nice. But, feel free to turn this on if you have very dense data, and plotting is becoming a bottleneck.

  • Publication Mode: Maybe the best feature. Clicking this box (on by default), formats the plots in a nice, publication ready, way. If you turn this off, it will include additional markers and axes that are useful in visualization but may not look as clean.

Important Note: If you have read this far, well done. Lots of respect from me. You should also check out the Hidden Features page to learn more about how to manipulate plots. For example, did you know that you can edit the default font size? Check out how to do it there.

Two additional buttons are present on the bottom. The "Replot" button is useful for just replotting what is present on the main panel. It doesn't automatically update the settings, so you will need to click this after you make a change.

The "Plot Composite" button only works after you have clicked "Plot Peaks" to generate the individual isolated m/z spectra for each peak. After doing that, you can sum all of these together into a composite spectrum by clicking this button. Note, you can ignore specific peaks by right clicking on the plot panel to generate sums that only include subsets of peaks.

MetaUniDec and UniChrom Extraction

MetaUniDec and UniChrom have a few additional options relating to peak extraction. In both, peaks are selected from the summed deconvolved mass distribution, not individual spectra (although this is an option with "Experimental > Get Scan Peaks"). After detecting peaks, there are different ways you can extract quantitative information from the peaks. Some experiments need information on peak height/area. You can get this by adjusting the "How to Extract Peaks" combo box. The options are:

  • Height: Peak height at exactly the mass value of the peak. Window and Threshold are ignored.
  • Local Max: Peak height but not exactly at the mass value specified. Looks for the local max from mass - window to mass + window. Threshold is ignored.
  • Area: Peak area centered at the mass value with the integration ranging from mass - window to mass + window. Threshold can be used to specify the minimum relative intensity to include, which is useful to avoid integrating noise.
  • Estimated Area: Will estimate the area assuming a Gaussian peak from the height and the FWHM. Window and Threshold are ignored.

However, it is also useful sometimes to extract peak position in mass. There are several ways to do this.

  • Local Max Position: Reports the mass position of the local max within a range from mass - window to mass + window. Threshold is ignored.
  • Center of Mass: Reports the centroid of a peak within the range of mass - window to mass + window. Threshold can be used to exclude intensity values below a specific relative amount.

After extracting the relevant peak information, there are several ways to normalize the information. "None" is default and will just report the absolute extracted values, which is usually what you will want when extracting mass information. "Max" and "Sum" will normalize each scan so that the extracted values within the have a maximum or sum of 1, respectively. This is most useful when looking for changes in relative abundance between different species. "Peak Max" and "Peak Sum" will normalize each single peak across all scans (rather than all peaks within each single scan), such that the max or total peak extracts are 1, respectively.

MetaUniDec and UniChrom Additional Plotting Options

MetaUniDec have additional options for generating 2D plots in various forms.

There is also a unique option to to "Fast Profile" and "Fast Centroid", which speed up the analysis by not writing some less important data structures to the hard drive. This means that certain plots cannot be generated, primarily the 2D animations of mass vs. charge and m/z vs. charge for each spectrum. But, try it out if you want to get speed and are only using basic plots.

There is also a color map selector for the spectrum colors.

Finally, there is an option to help with plotting large data sets by only selecting every n plots to show if the total number is over a certain limit.