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.

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.