MSI Segmentation provides capabilities for automated exploration and unsupervised segmentation of 2D mass spectrometry imaging data. There are three processing pages. "Tissue Segmentation" allows for automated segmentation of pixels into clusters based on similar spectral characteristics. "Analyte clustering" allows for automated clustering of entire ion images to explore notable spatial patterns and colocalized ions. "Spectral correlation map" allows for interactive creation of images showing the correlation of all spectra to a given target spectrum. The app takes analyte .txt files from the MaldiChrom utility in HDI as input. Additionally,the app can read .rte files output from the 2D real-time viewer plugin to HDI, or a generic CSV format with columns representing (scan_number, x_pixel_location, y_pixel_location, mz_0, mz_1, ..., mz_N) for N m/z bins.
Try It! | Download Application | Release Notes | License Agreement
MSI Segmentation is bundled with a Windows 10 installer. After downloading, be sure to uninstall any previous versions, then launch the installer by launching "Waters.MsiSegmentation.BundleInstaller.exe" [Note: do not launch "Waters.MsiSegmentation.Deployment.msi"]. After installation, the software will be installed as "Waters MSI Segmentation". This launches a window where the app service can be launched by pressing "Start". The app itself can then be accessed in a browser window at the local URL printed in the "Streamlit output" window. It should open a browser window to this address automatically, but in case it does not, you can manually copy and paste the address. To close, click "Stop" to stop the service, then close the app window.
After the file-type extension is selected (.txt, .csv, or .rte), data are loading using the "Load data" form in the sidebar, using the "Browse files" button for local data, or selecting a sample file using the "Select example data" dropdown list. An uploaded local file will override a selected example file if both are selected. Once the data are loaded, metadata for the image dimensions, number of scans, pixel sizes, m/z range, and number of peaks are displayed below the "Load data" window in the sidebar. The app will also accept zip-compressed files provided there is only a single dataset within the zipped folder.
Once the data are loaded, the app performs an initial classification of object vs. background and displays the results and additional tools in three tabs:
The UMAP step is the most expensive, while the masking and classification steps are relatively quick. All results including UMAP are cached by the app, but recalculation of the mask, as well as a change in any of the UMAP parameters will trigger a new embedding process. Accordingly, the app was designed with the following workflow:
Under the "Analyte clustering" page, results and tools are displayed in 4 tabs:
This page creates a spatial map of Pearson's correlation values between the spectrum at each pixel and a fixed target pixel selected interactively by the user. The map will refresh when a new target pixel is clicked. This image can be used to create a binary mask by univariate thresholding, similar to the cluster images on the "Analyte clustering" page.
These controls in the sidebar are used to tune an algorithm that tentatively labels m/z images using some isotope-detection heuristics and the Human Metabolome Database). These results carry through to the rest of the interactive visualizations in the app.