VirusMapper: open-source nanoscale mapping of viral architecture through super-resolution microscopy

The nanoscale molecular assembly of mammalian viruses during their infectious life cycle remains poorly understood. Their small dimensions, generally bellow the 300nm diffraction limit of light microscopes, has limited most imaging studies to electron microscopy. The recent development of super-resolution (SR) light microscopy now allows the visualisation of viral structures at resolutions of tens of nanometers. In addition, these techniques provide the added benefit of molecular specific labelling and the capacity to investigate viral structural dynamics using live-cell microscopy. However, there is a lack of robust analytical tools that allow for precise mapping of viral structure within the setting of infection. Here we present an open-source analytical framework that combines super-resolution imaging and naïve single-particle analysis to generate unbiased molecular models. This tool, VirusMapper, is a high-throughput, user-friendly, ImageJ-based software package allowing for automatic statistical mapping of conserved multi-molecular structures, such as viral substructures or intact viruses. We demonstrate the usability of VirusMapper by applying it to SIM and STED images of vaccinia virus in isolation and when engaged with host cells. VirusMapper allows for the generation of accurate, high-content, molecular specific virion models and detection of nanoscale changes in viral architecture.


Supplementary Note 1
This section provides a detailed description of the functioning of the VirusMapper algorithms ( Supplementary  Fig.  1).

Extracting Viral Particles
Super-resolution images of large numbers of viruses bound to coverslips are segmented into individual particles using a peak detection algorithm based on QuickPALM 1 . The algorithm is initialized by finding the brightest pixel in each image and registering its location as a peak into a list. A binary mask is then generated demarking the area surrounding the detected peak as a region where no other peaks can be found on the proceeding iteration, thus avoiding peak overlap. Iteratively the algorithm repeats this process, finding the brightest pixel outside of the mask, thus capturing the local maximum of the image. For viral structures that do not feature a peak of intensity at its centre, we found that prior convolution with a Gaussian kernel of pre-defined size can generally form a peak of intensity close to the centre of the structure, which can then be used for peak detection. For each peak detected in the sequence of images, a square ROI of chosen radius around the peak is taken as the particle image and appended to an image list composed by ROIs featuring the segmented viral particles.

Seed Generation
Seed images need to be chosen to enable the template matching process to form an initial model. They are chosen from the set of segmented particles and may be clear representations of viruses in a certain orientation, or simply clearly imaged viruses. Multiple seed images may be combined into a single image by normalising and averaging. First, they are aligned with each other by fitting each image with a 2D elliptical Gaussian -we found that even for non-elliptical structures an elliptical Gaussian may provide a good approximation providing a major and minor axis of the shape. Images are then translated a3 and rotated to bring the centre of the fit into the centre of the image and the elliptical Gaussian major axis into the vertical. Application of a Gaussian blur to the image before fitting allows consistent alignment of most asymmetric shapes in this way.
Multiple fluorescence channels can also be incorporated. It may be that the orientation of the virus cannot be ascertained in one channel but it can in another. In this case, seeds for the two channels can be selected together, allowing differentiation between orientations to come from the second channel.

Model Generation
As a first step, individual viral particles are registered in location and rotation against the user generated seed. The displacement and rotation for each individual particle to provide maximum similarity with the seed is evaluated by calculating a normalized rotation and cross-correlation map (NRCCM).
In matching an image , with pixel values , , with a template , with pixel values ( , ) the NRCCM is given by: with and the mean pixel values and 2 and 3 the standard deviations. and run across the image. The peak intensity in , , -, space describes the translation and rotation required to maximize the similarity between the image and the template. We find this peak to subpixel resolution by locally fitting a 2D Gaussian and extracting the centroid.
We thus find the peak in the NRCCM and apply the corresponding translation and rotation to register each particle in the particle image list against the given seed. A first model is generated by a normalized projection average of all the elements of the particle image list weighted by their peak similarity given by the NRCCM. Thus the model constructed from a4 registered, normalised images < has pixel values where < is the peak value of the NRCCM for image < : In parallel to the weighted average, the weighted mean-square-error (MSE) of the model is also generated as: By reiterating over the same steps of model generation, where the seed is replaced by the model generated, it becomes possible for models to evolve and converge into the most common structure represented in the particle image list while the MSE between models and viral particles decreases.
To visualise the MSE we also created mean-squared-error images to go along with each model (Supplementary  Fig.  2). The pixel values for these images is given by: