/ProtruDe

Repository of ImageJ macros and plugins for detecting protrusion in the videos of SARS-CoV-2 spike protein, captured by high-speed atomic force microscope.

Primary LanguageJavaGNU General Public License v3.0GPL-3.0

ProtruDe

This is a repository of ImageJ macros and plugins for detecting protrusion in the videos of SARS-CoV-2 spike protein, captured by high-speed atomic force microscope (HS-AFM). The purpose of this pipeline is to process and quantitatively analyze many images within HS-AFM videos in a semi-automatic manner. This pipeline may be adapted to other proteins, or molecular complexes showing protrusions, and to other imaging techniques. The step-by-step description of image processing is provided below, illustrated with a representative image extracted from a HS-AFM video (Figure 1).

1. Pre-processing and cleaning

The first routine (MacroPreProcessing) used the raw images of a video as an input (Fig. 1A) and, in one step, processed all the images of the video into a video with improved image quality (Fig. 1B). More precisely, to start with, the noise was reduced by applying a median filter with a radius of 2 pixels. Then, the tilted background, which results from the angle made by the AFM tip with the surface during scanning, was corrected thanks to the ImageJ subtract background algorithm. This averages out all the pixels depending on the selected radius of a ball and subtracts this average value from the original image, thereby eliminating the spatial fluctuations of the background intensities.
A second routine (MacroThresholding) converted the pre-processed video (Fig. 1B) into a binary video (Fig. 1C) by setting a threshold value on the pixel intensity. An automated threshold employing either the Li or Triangle algorithm was used. A further process was used to discard objects smaller than the spike protein in the video. To do that, a threshold size was chosen based on the pixel size of the video and the size of the spike protein. A third routine (MacroCleaningMask) used the binary, thresholded video (Fig. 1C) and applied a dilation with a radius of 5 pixels, and further discarded all objects outside the main object. The resulting video was applied as a mask to the binary and pre-processed videos, resulting in a cleaned binary video and a cleaned video (Fig. 1D).

2. Spike alignment

The alignment of spike protein involved the sequential use of the following ImageJ/Fiji plugins: i.e. AFM2_AlignBin, AFM2_FirstFrame, and AFM2_Reference. To accomplish this, the center of mass of the spike protein in the cleaned video (Fig. 1D) was computed from the cleaned binary video generated by the MacroCleaningMask routine. This allowed the calculation of translation vectors that were subsequently applied to the cleaned video (Fig. 1D), resulting in what we refer to as the 1st aligned video (Fig. 1E). Next, image correlation was used to determine the optimal translation and rotation, enabling the alignment of all images with respect to a reference image. This step resulted in the generation of 2nd aligned video (Fig. 1F). To further refine the process, the images within the resulting video were finally aligned with a reference derived by averaging all the images from the previous video (Fig. 1G). This step was iterated until it provided a satisfactory outcome, which we denoted as the 3rd aligned video. Here, the stalk of the spike protein is indicated with a white arrowhead, whereas the bulbous head is marked with a yellow arrowhead (Fig. 1H).

3. Protrusion detection and characterization

The MacroProtrusion routine transformed the 3rd aligned video (Fig. 1H) into a binary video (Fig. 1I). This aligned and thresholded video was then subjected to an erosion and dilation sequence using a disc with a radius of 5-10 pixels. The radius was chosen according to the pixel size of the video, taking into account the size of the protrusion $\sim$ 5 nm. This morphological opening process yielded an opened video from which all protrusions having a size roughly smaller than the selected radius were removed (Fig. 1J). Eventually, each opened video (Fig. 1J) was subtracted from the corresponding binary one (Fig. 1I) in order to keep only the protrusions (Fig. 1K). Only the peripheral fragments of the spike protein that are larger than the expected radius of the protrusion remained present in the resulting binary video. The MacroDeleteROIProtrusion routine allowed the manual selection of regions of interest (ROI) on the bulbous head, to separate the protrusion from the stalk and other artifactual bumps (Fig. 1L). The MacroClassifyProtrusion routine extracted properties such as the number of detected protrusion(s) per spike protein as well as the area and height of each protrusion from every image within a video.

The contour of the detected protrusion was visualized on the aligned video using the MacroContourProtrusion routine. It used the aligned video (Fig. 1H) and the binary video with ROI (Fig. 1L) to produce a video with the contour of the ROI highlighted on each image.

Fig. 1. An example of sequential HS-AFM image processing using ImageJ-based macros that lead to the detection of the protrusions on spike protein.