QUIMBI is an interactive visual MSI exploration and analysis tool. It provides information about the similarities of molecular compositions between spectra, which are visualized within the morphological sample space. QUIMBI offers three different visualization modes: (1) Similarity, (2) Browsing and (3) Grouping. Here we provide an overview about the user interface and explain the three visualization modes. Technical details about the implementation can be found in Supplementary K.
The user interface of QUIMBI consists of two displays which are functionally interlinked: the main panel (Fig. 4a) and the spectrum viewer (Fig. 4b). The main panel displays the main visualization in which each pixel is represented by an intensity value . Each visualization mode computes an intensity value which is normalized to (see Eq. 2) and subsequently transformed using a color scale 28 to produce the final value for the visualization (see Eq. 1). Currently, QUIMBI uses the “Fire” color scale. Appropriate alternatives that could be considered are, for example, the popular “Magma” or “Viridis” color scales29. Computation of the intensity values is based on the byte representation of a pixel (see Supplementary K). For each visualization mode, the intensity values are computed as follows:
Similarity mode: The user can hover the mouse over the visualization image or select a single pixel with a click to set the position (q, r) of the reference pixel . The intensity value for each pixel is computed as the inverse angle between the pixel and the reference pixel (see Eq. 3). In this mode, the spectrum viewer shows the spectrum of the selected reference pixel. If no reference pixel is selected, the mean spectrum of the data set is displayed. The inverse angular distance is used for the following reasons reasons. First, it is fast to compute which is an essential feature for an interactive visualization tool. Second, in this work we are less interested in the magnitude of signals but in the peak profile of the spectra, i.e. the orientation of the n-dimensional vector described by the peak intensities. An angular metric like the inverse angular distance is suited to distinguish small changes in the peak profile, i.e. small angular differences between two mass spectra. It is also strongly related to the cosine similarity which is commonly used in the MSI community30–33 and has shown to be a robust method for mass spectra similarity evaluation in various different works34–36.
Of course it must be noted, that in principle other distance functions could be applied to compute pairwise (dis-)similarities between spectra in the QUIMBI visualization approach. Such functions could have benefits in highlighting other particular aspects of spectral similarity compared to the inverse angular distance applied here. The choice of the inverse angular distance function is driven by the reasons listed above and not by any claim, that this function outperforms other functions for spectral analysis in general.
Browsing mode: The user can hover over the mass spectrum in the spectrum viewer to select a mass channel k. In this mode, the intensity value is set to equal the data point (see Eq. 4).
Grouping mode: The user can select one or more ranges of mass channels through a cursor drag interaction in the spectrum viewer. In this mode, the intensity value is computed as the mean of all data points of the set of selected mass channels at the same location (see Eq. 5).
It is important to note that the displayed mass spectra in the spectrum viewer do not represent the original intensity pattern of the mass channels. This is due to the 8-bit transformation of the data. We chose to display the transformed mass spectra used to compute the QUIMBI visualization instead of the original mass spectra because we put our focus on the visualization. Therefore, the spectrum viewer always shows the exact values that are used to compute the visualization. Although the mass spectrum of a reference pixel does not reflect the original intensities, it is still possible to identify the mass channels responsible for a particular distribution pattern through a QUIMBI visualization and go back to the original data set with this information to obtain the true intensity values.
By visualizing the peak pattern similarity (Eq. 3) in the lateral space, Similarity Mode enables a perception of the relations between peak pattern similarity and morphology17. Browsing Mode allows the exploration of single mass channel images, to identify mass channels with interesting lateral patterns. Finally, Grouping Mode allows to explore the distribution of combined mass channels through the range selection. This supports the identification of mass channels with similar lateral distributions. Another aim could be to find a combination of mass channels that may cover a specific area of interest.
While browsing the spectrum, an associate annotation appears which shows the exact value and intensity of the measured point closest to the cursor position. We also enhanced the color scale legend by a histogram plot (Fig. 4c), which shows the current similarity/intensity value distribution.
QUIMBI is implemented in WebGL to run in real time in a web browser. Consequently, it works independently of the operation system and requires only a browser. QUIMBI is open source under the GNU GPLv3 license and available at https://github.com/BiodataMiningGroup/quimbi. Details about the implementation can be found in Supplementary K.
Do you have any questions about this protocol?
Post your question to gather feedback from the community. We will also invite the authors of this article to respond.