Cardinal is an R package that implements statistical & computational tools for analyzing mass spectrometry imaging datasets.
More information on Cardinal
This tool uses Cardinal to read files and create a quality control report with descriptive plots for mass spectrometry imaging data.
Input data
Options
- m/z of interest (e.g. internal calibrants) and the ppm range are used for m/z heatmaps (x-y grid), heatmap of number of calibrants per spectrum (x-y grid), zoomed in mass spectra, m/z accuracy plots
- Optional fold change plot: draws a heatmap (x-y grid) for the fold change of two m/z (log2(intensity ratio))
- All plots are described in more detail below
Tip
- For additional m/z heatmaps use the MSI mz images tool and to plot more mass spectra use the MSI mass spectra tool.
- To obtain the underlaying spectra and feature values used in this quality report, the imzML exporter tool can be used
Output
- quality control report as pdf with key numbers and descriptive plots describing the mass spectrometry imaging data
Overview of the QC report plots
- (annot): this plots will only be drawn if pixel annotations are loaded via a tabular file
- (cal): this plots will only be drawn if a tabular file with at least one valid calibrant m/z is provided
- (FC): this plots will only be drawn if the optional fold change image is selected
- Vertical lines in histograms represent median values. In density scatter plots the colour changes from blue to green, yellow and red the more points are overlayed.
- Overview of file properties: Numbers and ranges for m/z features and pixels are given. Median and range across all intensity values are provided. Intensities > 0 gives the percentage of m/z-pixel pairs with an intensity above zero. The number of empty spectra (TIC = 0), the median number of peaks (intensities > 0) per spectra as well as the median TIC (total ion current) are given. The processing status of the file is provided as well as the number of valid calibrants from the provided tabular file.> 0 (Intensities > 0).
x-y images (pixel/spectra information)
- (annot) Spatial orientation of annotated pixel: All pixels of one annotation group have the same colour.
- Pixel order: Shows the order of the pixels in the provided file. Depending on the instrument this can represent the acquisition order. If annotation file is provided pixels are ordered according to annotation groups.
- (cal) Number of calibrants per pixel: In every spectrum the calibrant m/z window (calibrant m/z plusminus 'ppm range') is searched for peaks (intensity > 0). Calibrants are considered present in a spectrum when they have at least one peak in their m/z window.
- (FC) Control of fold change plot: For both input m/z a zoomed in average spectrum is drawn with the input m/z as blue dashed line, the m/z range as blue dotted lines and the maximum intensity in the m/z window with a red line.
- (FC) Fold change image: For each input m/z the average intensity within the given ppm range is calculated, then the log2 fold change of both average intensities is taken and plotted as heatmap.
- (cal) Intensity heatmaps for the m/z value that is closest to the calibrant m/z (can be outside the ppm range). The intensities are averaged within the calibrant m/z window (ppm range).
- Number of peaks per spectrum: For each spectrum the number of m/z values with intensity > 0 is calculated and plotted as heatmap.
- Total ion current: For each spectrum all intensities are summed up to obtain the TIC which is plotted as heatmap.
- Median intensity: For each spectrum the median intensity is plotted as heatmap.
- Maximum intensity: For each spectrum the maximum intensity is plotted as heatmap.
- Most abundant m/z in each spectrum: For each spectrum the m/z value with the highest intensity is plotted.
- PCA for two components: Result of a principal component analysis (PCA) for two components is given. The loading plot depicts the contribution of each m/z value and the x-y image represents the differences between the pixels, principal components 1 and 2 are also plotted as x-y image.
Properties over spectra/pixels
- Number of peaks per spectrum: Scatter plot and histogram showing the number of intensities > 0 for each spectrum. If annotation tabular file is provided, the pixels are sorted according to annotation groups and the dotted lines in the scatter plot separate spectra of different annotation groups.
- (annot) Number of peaks per spectrum and annotation group: Same histogram as in plot before but with colours to show the contribution of each pixel annotation group.
- TIC per spectrum: Scatter plot and histogram showing the sum of all intensities per spectrum (TIC). Dotted lines in the scatter plot separate spectra of different annotation groups.
- (annot) TIC per spectrum and annotation group: Same histogram as in plot before but with colours to show the contribution of each pixel annotation group. Only the length of the coloured bar is important and not its height from zero, as bars are added up and not overlayed.
Properties over m/z features
- Histogram of m/z values: Histogram of all m/z values (complete m/z axis)
- Number of peaks per m/z: Scatter plot and histogram giving the number of intensities > 0 for each m/z.
- Sum of intensities per m/z: Scatter plot and histogram of the sum of all intensities per m/z.
Intensity plots
- Median intensity per spectrum: Scatter plot in which each point represents the median intensity for one spectrum. Dotted lines in the scatter plot separate spectra of different annotation groups.
- Histogram of intensities.
- (annot) Intensities per annotation group: Same histogram as before but with colours to show the contribution of each pixel annotation group.
- (annot) Log10 mean intensities per m/z and annotation group: For all pixels of an annotation group the log10 mean intensity for each m/z is calculated and shown as boxplot.
- (annot) Heatmap of mean intensity per m/z
- (annot) PCA of mean intensity per m/z
Mass spectra and m/z accuracy
- Average mass spectra: First plot shows the average spectrum over the full m/z range, the other three plots zoom into the m/z axis.
- (annot) Average mass spectrum per annotation group.
- Random mass spectra: The mass spectra for four random pixel are plotted.
- (cal) For each calibrant four zoomed average mass spectrum are drawn with different zooming level. The theoretical calibrant m/z (taken from the input file) is represented by the dashed blue line. The dotted blue lines show the given ppm range. The green line is the m/z value that is closest to the theoretical calibrant and the red line is the m/z with the highest average intensity in the m/z window. In the second spectrum each blue dot indicates one data point.
- (annot) Average spectrum per annotation group: For each calibrant a zoomed in mass spectrum is plotted this time with the average intensities for each annotation group separately.
- (cal) Difference m/z with max. average intensity vs. theor. calibrant m/z: The difference in ppm between the m/z with the highest average intensity and the theoretical m/z are plotted for each calibrant. This corresponds to the difference between the dashed blue line and the red line in the zoomed in mass spectra.
- (cal) Difference closest measured m/z vs. theor. calibrant m/z: The difference in ppm between the closest m/z value and the theoretical m/z values are plotted for each calibrant. This corresponds to the difference between the dashed blue line and the green line in the zoomed in mass spectra.
- (cal) Difference m/z with max. average intensity vs. theor. m/z (per spectrum): For each spectrum the ppm difference between the m/z with the highest average intensity and the theoretical m/z are plotted. The calibrants have different plotting colours. Dashed lines separate spectra of different annotation groups.
- (cal) Same m/z accuracy in ppm is plotted per calibrant and per spectrum as image in x-y dimension.