Protocols for Subtomogram Averaging of Membrane Proteins in the Dynamo Software Package

Cryo-electron tomography allows low-resolution three-dimensional (3D) viewing of cellular organelles and macromolecular complexes present as multiple copies within a tomogram. These structures are computationally extracted and averaged in order to obtain high-resolution 3D structures, and provide a map of their spatial distribution and interaction with their biological microenvironment. To do so, we apply the user-friendly Dynamo software package on a tomographic data set. Dynamo acts as a modular toolbox adaptable to different biological scenarios, allowing a custom designed pipeline for subtomogram averaging. Here, we use as a textbook example the mitochondrial docking site of the positive-strand RNA Flock house nodavirus (FHV) to describe how Dynamo coordinates several basic steps in the subtomogram averaging workflow. Our framework covers specific strategies to deal with additional issues in subtomogram averaging as tomographic data management, 3D surface visualization, automatic assignment of asymmetry and inherent loss of Fourier information in presence of preferential views.

Electron tomography (ET) requires the acquisition of two-dimensional (2D) projection images of the specimen in a range of orientations (Beck and Baumeister, 2016). To obtain these, the specimen is physically rotated around a single axis inside the electron microscope. This axis is perpendicular to the optical axis of the electron beam. Images are collected at each rotation angle, resulting in a tilt-series, i.e., a set of micrographs, each one representing a projection of the specimen at a different tilt angle (Tocheva et al., 2010;Gan and Jensen, 2012;Beck and Baumeister, 2016). The tilt-series are then computationally reconstructed into 3D tomograms (Mastronarde and Held, 2017). Unfortunately, the rotation possible, i.e., the tilt range, is physically restricted by microscope geometry and usually only from −60 • to +60 • . As a result, reconstructed tomograms experience Graphical Abstract | Dynamo workflow. Dynamo catalogue* and its GUI (dynamo_catalogue_manager or dcm) provide a robust and simple way to keep track of the transformations and annotations performed on tomographic data sets. The aim is to allow the definition of positions (particles) inside each tomogram, so that subvolumes can be defined and cropped, to produce a unique data folder with its corresponding table, which can then be used to feed a project for alignment or classification. The catalogue stores both raw data and annotations performed on the data. In Dynamo, annotated tomographic data is defined as geometrical models, therefore Dynamo refers to them with the name model. Dynamo catalogue keeps track of volumetric processing tasks performed on the tomogram (such as binning or flipping) as well as all manipulations for particle modeling, orientation and geometry. Furthermore, tomogram properties registered in the catalogue include paths with the file location, defocus, magnification and a description of the missing wedge among other things. Tomographic data is annotated in dtmslice GUI with the help of montage tools that allow the optimal handling and representation of user-positioned points defined in Dynamo models, dcmodel (Supplementary Figure S1). Particle positioning can be defined by clicking directly onto the particles or using semi-automation tools integrated in GUIs as dtmslice and montage (see Supplementary Figure S1). Particles are extracted from the models using dtcrop to obtain a data folder with the extracted particles and a table that contains the metadata information of the extracted particles. Particles are usually averaged to generate a first template. Then, particles, table and template are used to feed an STA project in the dcp GUI. After running an STA project, an average of the particles and a corresponding table are generated. The density map of the average can be visualized with different tools as indicated in Supplementary Figure S2. *All tools associated with the catalogue can easily be used independently at any stage, which means that the creation of a catalogue for a tomographic data set is not mandatory. However, we encourage users to organize their tomographic data in a catalogue from the beginning. This helps to gain insight into the logic of Dynamo and eliminates administrative overheads to localize and track operations in the raw tomographic data. partial sampling or missing information in Fourier Space (Paavolainen et al., 2014). This missing information exhibits a characteristic wedge-like shape, and is known as the missing wedge. In real space, the missing wedge manifests itself as a blurred elongation of the imaged specimen in the direction of the electron beam.
Cryo-ET generally reveals the 3D in situ structure of cells, organelles and macromolecular complexes at their nanometer scale, but recently atomic resolution was achieved (Schur et al., 2016). To reach this resolution, a robust image processing method was essential, namely subtomogram averaging (STA) (Briggs, 2013). Biological structures of interest that present in multiple copies within a single tomogram, are computationally extracted into subvolumes, also called subtomograms.
Dynamo is a software package specialized in image processing for STA that runs in different computing environments (Castaño-Díez et al., 2012). After a brief summary of the main technical details present in Dynamo, this report focuses on several functionalities currently included in the software and describes strategies for different scenarios inherent to biological samples such as asymmetry, 3D-orientation and molecular flexibility. Density maps oriented to answer specific biological questions are resolved by following the steps described in this report, along with optimization guidelines and troubleshooting information. Recommended procedures and walkthroughs concerning detailed descriptions of commands and subtomographic analysis are detailed in the online documentation (the Dynamo wiki: https://wiki.dynamo.biozentrum.unibas.ch/w/index.php/Main_ Page). The practical steps described in this report together with the online documentation encourage users to apply the tools provided by Dynamo in their own tomographic data to successfully conduct STA projects. Following the protocol described in this report does not require any particular programming skill. However, a basic familiarity with both MATLAB and system shell scripting in any platform (Mac, Windows or Linux) is of advantage. • Section 9 can be based on the results obtained following the entire protocol described in this report or independently. Data concerning table, membrane model and average for section 9 is available in:

MATERIALS AND EQUIPMENT
•

PROCEDURE
The biological tomographic data set used here as a text-book example concerns the mitochondrial docking site of the positivestrand RNA Flock house nodavirus (FHV) (Ertel et al., 2017). This data set is available at https://wiki.dynamo.biozentrum. unibas.ch/w/doc/data/fhv/crop.rec.
FHV forms electron dense spherular invaginations containing RNA fibrils. The spherules attach to the outer mitochondrial membrane (OMM) throughout a necked aperture crowned by a striking cupped ring structure inserted in the OMM, to what we refer as crown. This viral macrocomplex (crown) possesses a twelve-fold concentric ring with flanking protrusions referred in this report as teeth (Ertel et al., 2017).

Project Design for Subtomogram Averaging of Tomographic Data
The Graphical Abstract provides basic information of the workflow followed in Dynamo for STA and defines different data generated and used in the software package. In Dynamo, tables are the basic metadata system; they are matrices that describe the properties of a set of subtomograms, also referred as particles. A table possesses the metadata of a given data folder that contains cropped particles. As tables are matrices, MATLAB tools are easily customizable to explore and visualize the contents. More information concerning the table and other Dynamo's commands and formats are summarized in Supplementary Table S1 and in the only documentation: https://wiki.dynamo.biozentrum.unibas. ch/w/index.php/Main_Page.
The STA strategy followed in this procedure is summarized in Figure 1. Note that for the alignment of the axis of symmetry in the particles the STA strategy divides into two equivalent paths: (1) No a priori information and (2) a priori information. These two steps focus on aligning the particles along the Z-direction by either applying a set of geometrical tools to the particles or using the OMM to generate a membrane model with geometrical information that is directly applied to the particles inserted in this membrane. Since both paths are equivalent, it is not necessary to perform both of them, unless users wish to improve their practical skills and familiarize themselves with Dynamo's functionalities.

Tomographic Data Management
Before starting an image processing procedure, tomographic data should be comprehensively structured. In Dynamo, tomograms are organized through Dynamo catalogue. In this section, we will create a new catalogue and show how to add, list and bin tomograms. Further, we will explore the tomogram using the Dynamo's tomogram visualization GUI dtmslice, and explain particle picking, extraction and averaging in order to retrieve an initial average.

1.1
Download the tomographic data set called crop.rec (see Equipment set up). Within the Dynamo console, basic metadata of volumetric files can be assessed before loading extensive data sets into memory (a). A quick, lightweight visualization of the tomogram is also available (b).
(a) dfile crop.rec; (b) dtmshow -otf crop.rec FIGURE 1 | Pipeline for FHV docking site STA. Scheme describing the main steps of the protocol described. The initial template is either oriented by a series of geometrical operations imposed on the particles (no a priori information) or by a surface model representing the OMM where the FHV docking sites are inserted (a priori information). Management of the missing wedge is an essential step where azimuthal randomization may help, because the particles possess axial symmetry. Different STA projects are designed in order to obtain an optimal density map of the FHV docking site where automatic assignment of asymmetry is managed by subboxing. Eventually, Dynamo visualization tools depict the FHV docking sites as anchored macrocomplexes at the OMM in a 3D scene.
INFO: Header from .rec files is read as regular mrc files. The flag -otf means on the fly, and modifies the behavior of dtmshow by not preloading the full tomogram in memory, but to access in disk the individual slices that are needed when inspecting a particular area.
Dynamo offers an organized database structured as an archiving system through Dynamo catalogue  and its graphical user interface (GUI) dcm, see Graphical Abstract.
1.2 Create a new catalogue named fhv (a), add the crop.rec file (b) to the fhv catalogue and ask Dynamo to show the content of the catalogue concerning the catalogued tomograms (c).
(a) dcm -create fhv (b) dcm -c fhv -at crop.rec (c) dcm -c fhv -l tomograms INFO: catalogue can be created by the GUI or the command line.
Tomograms are usually processed further before being displayed for modeling and particle picking. Dynamo stores in disk the binned version of full-size tomograms to provide a proxy for fast exploration of large volumetric data. In Dynamo, binning using a factor of 1 means that 2 pixels become 1 (i.e., a tomogram of size 4 × 4 × 1 k voxels binned in Dynamo by a factor of 1 will result in 2 × 2k × 500 voxels tomogram). Loading a full-size tomogram can exhaust RAM resources of the computer and requires a long time to operate the transfer from the disk.
1.3 Create a binned (factor 1) version of all tomographic data contained in the fhv catalogue (a). Annotated tomographic data is defined as geometrical models, therefore Dynamo refers to them with the name model. (a) dtmslice crop.rec -c fhv -prebinned 1 Pick the particles in the GUI dtmslice as is described in Supplementary Figure S1. Since Dynamo catalogue conserves all information from the original tomographic data, even though we are displaying binned data, in dtmslice all distances and coordinates are reported in pixels from the non-binned tomographic data. In this example, the sidelength of the particles is 128 pixels. We recommend ensuring that the particle fits comfortably inside the physical box by leaving enough space, so that the particle sits in the center and away of the edges.
1.5 Identify the models created so far by using the command dcmodels (a). This command retrieves the number of tomograms containing models and the path to each of the listed models.
(a) dcmodels fhv Frontiers in Molecular Biosciences | www.frontiersin.org 1.6 Extract the table from the model using the method grepTable (a) and print the table in the screen to visualize its content and familiarize with it (b).
(a) dcmodels fhv -i 1 -ws o; m= dread(o.files{1}); t = m.grepTable(); (b) dtinfo(t); INFO: A model read into a workspace variable by dread can be used to extract a table, the standard metadata format in Dynamo. Here, we load the output of dcmodels for volume index -i 1 in the workspace variable o. Inside o, there is a field called files (o.files) which contains a cell array of files, each one containing a different model. Then, the first entry (o.files{1}) is read. Finally, we extract the table from the selected model with the function grepTable into the output variable t.

1.7
Particles are cropped using the dtcrop function (Graphical Abstract). This procedure extracts subvolumes from a defined tomogram using a table and a specific box dimension in pixels (128) for the extracted subvolumes (a)(b). 'particlesData',128);

INFO:
At the end of a particle cropping process, Dynamo reports information concerning the number of particles cropped, as well as possible excluded particles (cropping box goes beyond the edges of the containing tomogram), destination folder ('particlesData' is the name of the folder) and tomographic data source. Furthermore, a table file crop.tbl is generated inside the particle folder ('particlesData') with the metadata information of the cropped particles.

1.8
Average the cropped particles to obtain an initial template and evaluate the data quality for further STA analysis (a). Write the table and the template to disk (b)(c) INFO: 'particlesData' refers to the name of the data folder containing the cropped particles, 't' is the flag for table and 'particlesData/crop.tbl' is the path to the table file. The object oa is the output of daverage and contains the resulting geometrical information.

Project Design: Particle Alignment
A schematic pipeline describing the main steps covered in this report concerning the STA strategy is showcased in Figure 1. Dynamo projects can be defined by opening the GUI with the command dcp or directly in the command line. In this example, we explain STA project management using the command line; figures depicting the corresponding procedural steps through the dcp GUI are also shown (Graphical Abstract). In this section we design an alignment project using the particles, the table and the template (average) obtained in the previous section. It is shown how to define appropiate numerical parameters for this project. After running the project an average oriented by the OMM is obtained. (a) dcp first (b) Click on numerical parameters button in the dcp first GUI and introduce the parameter values defined for project first in Supplementary Table S3.

INFO:
In the project first, the quality of the particles to converge is assessed. The alignment is driven by a common salient feature shared by all picked particles, in this case the OMM where the FHV docking site is inserted. See tip for particle dimensions (Supplementary Table S2).
Computational parameters are set specifying the execution mode in CPUs, GPUs or parallelization processing. The environment of the project (MATLAB or a standalone version of Dynamo) needs to be indicated (see Supplementary Table S4).

2.3
Check the project first by either pressing the check button in the GUI or in the command line (a). The same is applied for the buttons unfold (b) and run in the dcp GUI (c) (d): (a) dvcheck first; The command (c) is used to run the project first when using Dynamo within a MATLAB environment. When the standalone version of Dynamo is used in a platform (Windows, Linux or Mac) do the same steps described above ((a) and (b)) in the Dynamo console; then open a new terminal where Dynamo is activated, however the Dynamo console must not be started. Run the project first in the terminal where Dynamo is activated but not started (d) (see Supplementary Table S4).

2.4
After running the project first, visualize the average obtained (a), and notice that particles are aligned based on the OMM. The STA project first finds the membranes and centers the particles correctly (Figure 2A). Individual particles can be checked (b).

INFO:
When visualizing data (particles and averages) in ddbrowse the table obtained after running the project first is loaded in order to orientate the particles correctly.

Aligning the Axis of Symmetry: No a priori Geometric Information
Once the particles are aligned, their axis of symmetry needs to correspond to the Z-direction. Conceptually, the two first Euler angles jointly represent a reorientation of the main axis of a particle, while the third Euler angle represents a rotation about the new main axis (usually referred to as azimuthal rotation). These angles are indicated in the table (particle metadata) at column numbers 24 to 26 with the names tdrot, tilt and narot, respectively (see Supplementary Table S2). They are combined with table columns 4-6 that represent the shifts in X, Y, and Z, respectively, in pixels from the center of the subvolume (Supplementary Table S2). Thus, in this section, we are searching for convergent azimuthal rotations in the particle data set along a possible axis of symmetry that is allocated by convention in the Z-direction. The symmetry axis of the average obtained in section 2 (previousAverage) is reoriented by aligning the average against a Z-oriented template. Therefore, alignment parameters are determined in the table (the Euler angles and shifts) and used to shift and rotate each particle to the Z-direction (Figure 2). Eventually, we will obtain correctly Z-oriented particles used to generate an average for the next STA project. This step is critical to search for convergent azimuthal rotations along the Z-direction in later steps. Note that this section is equivalent to section 4 below (Figure 1), if section 4 is also performed, make sure to unequivocally name the files concerning table and average from both sections.

3.1.
To impart the orientation of the axis of symmetry along Z-direction, we first create a template aligned with Zdirection (Figures 2B,C). We use a geometrical shape defined in Dynamo as "mask, " however, we will use it as a template in this case. The geometrical shape is contained in the MATLAB workspace object mr (a). Properties of the object mr are defined in (b), (c), (d), (e). Extract (f) and visualize the final mask (g) (Figures 2B,C). (g) mr.viewMask();

INFO: An advanced tool for creation of geometrical shapes in
Dynamo is dmask. When invoked without arguments, dmask produces a GUI to create several geometrical shapes (tubes, spheres, cylinders, shells, etc.) where the user can specify the geometrical sidelength of the object and combine different shapes by dynamo_mask_combine.

3.2
The average obtained by the STA project first (a) is treated as a particle on which we apply a template by using dalign. The template is the volume contained in mr.mask and the average is previousAverage (b). Visualize the resulting Z-aligned average contained in the object sal (c).

INFO:
In (a), the flag -r is used to extract the average obtained in the STA project first into a workspace variable (previousAverage). Note that shift limiting away ('limm') is set to 1 (Supplementary Table S2). sal is an object that contains the output of the function dalign.
numerical parameters ('cr','cs','ir','dim','limm','lim') are defined in Supplementary Table S2. 3.3 Extract the table yield by the project first into the workspace variable tf (a). The object sal contains several properties, one of them is the rigid body transform (a shift and a subsequent rotation) containing the information of the shifts and Euler angles applied to the volume previousAverage to obtain a Z-oriented average. This property is called Tp and can be printed in the screen by typing sal.Tp. Then, sal.Tp is applied onto tf and the result is extracted into the variable tr which is now rotated and shifted according to the rigid body transform indicated in sal.Tp (b).

INFO:
The resulting table, tr, contains the metadata that orients particles in the right Z-direction (upward).

3.4
Apply the rectified table, tr, to the particles and evaluate the resulting average (a) (Figure 2E). Plot a sketch with the particle orientations obtained from the STA project first before and after applying the rectified table tr (b), (c), (d), (e), (Figures 2F,G). (e) view(-230,30);axis equal;

INFO:
The normal direction vector of particles in Figure 2G points orthogonal to the OMM whereas in Figure 2F it points in multiple not orthogonal directions to the attached OMM. The flag 'fc' means Fourier compensation, in this example set to 1.

Aligning the Axis of Symmetry: a priori Geometric Information
The cellular context of an in situ biological macrocomplex is preserved in tomographic data (e.g., bacterial secretion systems inserted in the inner membrane of an intact cell).
Preserved biological membranes help to assign an initial direction to the particles when applying STA procedures. In the case of the FHV particles, we aim to search for convergent azimuthal rotations along a possible axis of symmetry located by convention along the Z-direction. In this section, we create a geometrical model of the OMM to reorient the particles according to the normal direction of the membrane at their closest point to the particles (Figure 3). Due to preferential orientations imparted by the OMM membrane we experience the effect of the missing wedge in the data set. Here, we show how to attenuate the effect of the missing wedge applying azimuthal randomization to the particles to obtain an accurate average.
Note: This section is equivalent to section 3 (Figure 1), if section 3 is also performed, make sure to unequivocally identify data concerning table and average from both sections.

4.1
Display the binned tomogram in dtmlice (a) or (b) when working with the standalone version, and follow the instructions described in Figure 3 to create a surface model of the OMM saved to disk. Display a list of the current models contained in the fhv catalogue (c). Translate the model into a workspace variable (c) that is read into memory (d). Use the membrane surface model to impart orientation by extracting the table contained in the model (e). Apply the defined interior side of the membrane surface model to the particles (e). Plot the membrane mySurface (f), press the button surface in the m.ezplot GUI, and add the table containing the normal vector of the particles correctly oriented by the membrane surface model to the plot (g) (Figure 3E).

INFO:
The membrane surface normal determines the orientation of a particle; the directionality (in-or outwards) is determined by the interior of the membrane surface selected when creating the membrane surface model (Figure 3). mySurface is the name given to the surface model, if no name was given Dynamo saves the surface model with the default name mmembraneByLevels. To change the name of the active model, follow in dtmslice GUI: Active model>Change name of active model.

4.2
Management of the missing wedge: Particles are aligned and oriented with relation to a membrane, in this case, no particular preference for rotations of the particles about the normal direction has been applied (i.e., azimuthal rotations).
Since the particles have a preferential orientation, an average created using these particles has a strong missing wedge.
Average the particle against the table (a) and visualize the Fourier weight (fweight) (b).

INFO:
In a Dynamo table the azimuthal angle is called narot, and in the current table is set to 0 by default. Here, we run daverage with a Fourier compensation step ('fc', 1), so that the ouput oa contains the property fweight, that is visualized in dview (Figure 4A). In Dynamo the Fourier compensation counts the number of times a rotated particle contributes to a Fourier component. While computing the raw average, each missing wedge is rotated and added into a volume. This volume has the size of a particle in Fourier space, and it is called fweight (a Fourier weight), representing the number of particles that contribute to each Fourier component. Brightness is proportional to the number of particles contributing to a particular Fourier component.

4.3
Attenuate the effect of the missing wedge in the data set by randomizing the rotational angle narot (a). Average the particles with the new randomized rotational angle (b), so that the Fourier weight map of the average shows a more homogenous distribution of the particles orientations (c) (Figure 4B). Direct space views of the particles along Y show the effect of the missing wedge as a blurred elongation of the image (d) (Figure 4C). Note: This treatment is not suitable when the membrane containing the complexes of interest is orthogonal to the electron beam as it will not contribute to fill the missing wedge.

Rotational Alignment STA Project
After either performing the section 3 or section 4 (be careful to not mix results from both sections concerning table and average), we create a rotational alignment STA project with appropriate numerical parameters in order to search along the whole sphere for azimuthal angle convergence of particles. After running this project, the average obtained reveals a new structural feature in the crown.

5.1a
Write the table tr and its corresponding average if particles were oriented as described in section 3 (a) (b).

5.1b
Write the table tConsistentRandomized and its corresponding average if particles were oriented as described in section 4 (a) (b).

5.2
Create the rotational alignment STA project called zOriented (a). Introduce the numerical parameters and set the computing environment (see Supplementary Tables S3, S4). Then, check, unfold and run the project as described before (see section 2.3 and Supplementary Table S4). Finally, visualize the resulting Importantly, points should be clicked in the same order from slice to slice in order to get a smother triangulation in next steps of the protocol. Points should be picked in the slice where the OMM is clearly seen, and can be deleted by pressing [d] or right-clicking on top of the point that will display an option menu. For semiautomatic detection of points in Z-slices above and below a reference slice, activate the Z-slice where the semiautomatic detection is desired, leave the mouse on top of the activated Z-slice and press the key [o]. The surface that should be modeled is the membrane where the neck of the viral spherules is inserted (Supplementary Figure S1). Importantly, defining the interior side of the membrane model is essential to impart the right orientation to the particles. Leave the mouse on the point where the center is defined and press the keys The OMM is represented as a gray triangulated surface containing the FHV docking site particles modeled as green points along the membrane surface. Importantly, the goal of this figure is to visualize the two final models unequivocally [particles (green dots) and membrane]. At this point, no surface triangulation is required, albeit later in this protocol triangulation is performed (see Figure 7). (D) Oriented particles obtained by imparting orientation with the membrane using dpktbl.triangulation.fillTable to obtain a table containing the geometrical information of the membrane surface used to impart the correct orientation to the particles. (E) Graphical representation of the mitochondrial membrane as a red triangulated surface with the normal vector (black line) of the FHV particles (black dots) pointing in the right direction, toward the outside of the membrane. The Z orientation computed for each particle is represented by the longest semiaxis.

INFO:
In the rotational alignment STA project we ask for a symmetrization of c57 to simulate fully rotational symmetry and force any possible symmetry axis in the data along the Z axis: an actual physical symmetry is not assumed. Here, a relevant parameter is the azimuth rotation range, searching for rotations along the full axis in 30 • steps (Figures 5A-C and Supplementary Tables S2, S3). Particle alignment and orientation were already completed in previous steps, therefore cone aperture and cone sampling must be restricted to not lose the orientation already achieved.
The results of the project zOriented shown the incipient formation of a crown. The presence of a pointy ring structure surrounding the crown is also hinted at (Figure 5D, red arrowheads). However, the image suffers from the effect of the missing wedge, which manifests itself as striations along one direction (Figures 5D,E).

Rotational Randomization STA Project
From the previous section, we have obtained an average manifesting the effect of the missing wedge. In this section we create a template that does not have a preferential orientation by azimuthal randomization of the particles using the table. The randomized template and table are used to feed a new STA project where the resulting average shows clearly the teeth in the crown.
6.1 Extract the table obtained in zOriented STA project into the workspace variable tns (a) and impose a perturbation of the table by randomly rotating the particles around their normal axis (b) (Figure 5F). Check the average of the particles when applying the randomized table (c) and write the average and the randomized table to feed the next STA project (d).

6.2
Create the STA project called zRandomized (a), check, unfold, run the project as previously described (Supplementary Table S4).

INFO:
Numerical parameters are found in Supplementary Table S3 and Figure 5G with a graphical representation of the angle search (Figures 5H,I).
The results of this project show a faintly hinted crown-like structure with a ring of teeth ( Figure 5J). The attenuation of the missing wedge shows the isotropic appearance of the teeth, with no stripes along a preferential orientation (Figure 5K, red arrowheads).

Localized Alignment STA Project
Features of the structure are revealed after imparting orientation, rotational alignment and randomization of the particles to overcome the missing wedge effect. A crown-like structure surrounded by teeth-like structures is visualized. The teeth-like structures are essential for viral RNA to be exported to the cell cytoplasm, they interact with the OMM opening a tight whole where the crown-like structure is inserted. Hence, the teeth possess high molecular flexibility (Ertel et al., 2017). To improve the signal of the teeth in the final average, we need to focus on this region to run a new STA project where teeth are refined. To do that, we create a mask on the teeth area. The resulting average clearly reveals the location of the teeth allowing crown symmetry calculation.
7.1 Visualize the average obtained by zRandomized in dmapview (a). Select the Y view of the average in dmapview in a single central slice where the teeth are visible (Figure 5L and Supplementary Figure S2) and press [shift] + [s] on the selected slice. In the new window hand draw a mask on the teeth (Figure 5L). When the mouse is released, the mask is automatically saved in Dynamo as a revolution solid by rotating the region drawn about the Z axis, into the file temp_drawn_revolution_mask.em. Change the name of the mask file (b). Create a new project by branching the project zRandomized into the new localized project (c) (Figure 5M). Check, unfold and run the project as previously described depending on the computing environment (see Supplementary Table S4).

INFO:
Numerical parameters are defined in Supplementary Table S3 and Figures 5N,O. The result of this project provides a clearer insight into the region of interest (Figures 5P,Q). The signal inside the mask is the only signal taken into account, however, the material outside the mask does not become smeared. This corroborates that the particle alignment is robust and not an artifact or imposition. The teeth surrounding the crown are clearly visible and the quality of the average allows a subboxing project to be pursued on the teeth (Figures 5Q, 6). In addition, the localized masking provides a clearer insight into the region of relevance (teeth) and visual inspection of the resulting average after c1-refinement suggest the presence of symmetry. To assess the symmetry of the teeth region we use the following Dynamo functionalities: 7.2 Test the symmetry of the crowns taken as a whole (a) or as the ring of teeth, teethMask.em (b). Symmetry c12 is obtained when applying the teethMask.em mask, meaning that the symmetry of the structure comes from the signal of the ring of teeth forming the crown (Figures 7B,C). The symmetry in this area appears to be c12. This symmetry can be enforced by symmetrization as described later in section 9 (Figures 7A-C).
Note: symmetry per particle can be assessed using the same command described in step 7.2 by changing the input from average volume to particle volume. However, we do not recommend to assess symmetry per particle since it may lead to symmetry artifacts due to lower SNR. In the case that particles suffer from heterogeneity, we recommend to apply classification methods as multireference alignment (MRA), prior to symmetry assessment.

Subboxing
The subboxing technique redefines the area of interest within a previously defined average. For this biological sample, full crowns were the subjects of alignment and averaging, hence, their signal drove the alignment of the particles. Thus far, heterogeneity and flexibility were not considered in this approach. Therefore, potential heterogeneity within particles may decrease the quality of the alignment as the crown is treated as a whole. In the subboxing technique the individual teeth will drive the alignment, so that each particle in the new data set is a subbox (a tooth) extracted from the previous box (the crown). The c12 symmetry observed for the ring of teeth within the crown in the previous section means that the ring is formed by twelve teeth, therefore each crown (box) provides twelve teeth (subbox) for the subboxing STA project ( Figure 6A). Here, we show how to locate and extract the teeth (subboxes) from the crown particles (boxes), and run a subboxing STA project to refine the teeth-like structure. As mentioned before, the teethlike structures possess high biological relevance in the case of FHV due to their man role in viral cytoplasmic infection and propagation.

INFO:
The center of the box (crown) is (64,64,64) in pixels and the location of the teeth is (88,80,53). We subtract half the sidelength of the full box to reveal the position of the asymmetrical unit expressed in relation to the center of the box.
The new subboxed table ts includes metadata for 12 times as many rows as the original table t, due to the fact that particles (teeth) come from the previous particles (crowns). The system of reference on each particle (teeth) points Z in the direction of its original box (crown). The X and Y orientations of each tooth are symmetrically related to its corresponding box (crown).

8.2
Create a subboxed data folder that contains the cropped particles (teeth) from the original tomogram suiting the sidelength that we previously obtained in dmapview (32 pixels) (a). Average the new particles (teeth) (b), visualize them (c) and write the average (d).

INFO:
The flag 'show', 0 suppresses the dcm GUI from appearing as a window. numerical parameters are defined in Figure 6G and Supplementary Table S2. Another way of entering the numerical parameters into an STA project by the command line is by using dvput as follows: (1) dvput subboxBig mask maskTooth32.em (the mask is introduced in the project).

Creation of 3D Scenes
The FHV docking site structure is attached to the OMM and possesses a crown and a ring of 12 teeth that help transition of the viral RNA from the mitochondria into the cell cytoplasm. This structural information is better understood in 3D scenes; therefore, we explain the depiction of 3D scenes using Dynamo (Figure 7). We will use the results from section 7 (average and table) to build a 3D figure.
In the case that this section is performed independently of the rest of the protocol described above, see section Equipment set up to download table, template and membrane model, and omit steps 9.3 and 9.4 of this section.

9.1
Define the tomogram containing the structure as a slice object (a), the source file (b), the center (c), the horizontal and vertical length (d) and the view to be displayed (e). Then, the slice is computed and the data is fetched (f). (a) ddb localized:rt -r t; INFO: Note that 'membraneModel.omd' refers to the path of the file containing the surface model. The model path may change depending on the location of the file and the name given. If section 3.2 was performed to get the surface model, this model should be still contained in the workspace variable m, therefore, step (b) in section 9.11 can be directly applied.

CONCLUSION
STA is a unique method used to elucidate the structure of in situ macromolecular complexes. It is increasingly used in the field of electron tomography now that improvements in microscope hardware facilitate the visualization of vitrified cells and eukaryotic lamellas (Briggs, 2013;Villa et al., 2013;Wan and Briggs, 2016). In tomography, particles of interest are imaged distributed in 3D space along with other components of the cellular context. Thus, tomography projects present several biological scenarios that differ from one another on the level of particle distribution. For example, while some particles of interest might be embedded in a membrane, other might be distributed in the cell cytoplasm or associated with cellular organelles. This requires a broad range of approaches to extract ultrastructural information, and might require the development of complex tailored approaches on a case-by-case basis.
Here, we describe a detailed protocol customized for a particular geometrical case (isolated particles irregularly distributed in a direction imparted by a membrane). In this data set, FHV macrocomplexes are imaged at close-to-native state within an intact mitochondrion. Visualized FHV particles are structurally arranged as they would be in nature, inserted in the OMM. Thus, the OMM is presented as a common feature among the FHV particles, making an appropriate candidate to drive particle alignment not only due to convergence but also to signal.
In other biological scenarios, e.g., proteins decorating cytoskeletal protein filaments, the filament will act as the FHV OMM driving the particle alignment. In the case of reconstituted membrane proteins in liposomes (forming proteoliposomes), the liposomal membrane drives particle alignment. However, in the case of purified or cytoplasmic proteins and viral capsid proteins, the protein signal drives particle alignment. In this scenario, an alignment mask would be appropriate to exclude noise signal originated by the buffer, the cytoplasm or neighboring cytoplasmic proteins. Such biological samples, e.g., ribosomes (Khoshouei et al., 2017), HIV capsid proteins (Schur et al., 2016), are suitable for high-resolution STA due to their sampling abundancy and overall homogeneity. Furthermore, the missing wedge effect on such particles is not so acute since they are randomly distributed, and therefore, not suffering from preferred orientation.
In contrast, membrane or filament attached macrocomplexes, e.g., FHV and microtubule-bound dynein-dynactin complexes (Grotjahn et al., 2018), are aligned based on such conspicuous features. In this cases, particle alignment should be feasible in few iterations on a STA project, however, protein signal convergence may be challenging in cases where membrane/filament signal is much stronger than the protein signal or particles suffered from heterogeneity respect to their interaction with the membrane/filament feature. Such challenges may be solved by the appropriate use of masks during STA projects as well as investing higher number of iterations for refinement.
Ultrastructural studies concerning cell biology are often interested in answering a relevant biological question rather than aiming for the highest resolution possible. In the case of FHV, the main biological question is focused on the ultrastructural characterization of the viral crown; how viral spherules interact with the OMM to transfer their RNA genome to be replicated and therefore, propagate within the cell cytoplasm? This biological question was answered by the visualization of 'teeth' at the viral crown by STA. Teeth are shown to disrupt the OMM by creating a channel for RNA transference into cytosol. However, other structural biology projects involving Dynamo for STA pursue high-resolution cryo-ET. Such projects are focused on estimating final average resolution as key to assess particle convergence and refinement. Dynamo estimates the resolution through the customarily called golden standard method. An alignment project ran in adaptive bandpass modus inside Dynamo will estimate the resolution of the attained average through the calculation of the Fourier Shell Correlation (FSC) (Harauz and van Heel, 1986) of two half averages computed independently at each iteration. Particle convergence is measured in a regular STA project by computing the FSC between the last and previous computed average.
In such STA projects thousands of particles are involved, therefore, extensive computational resources are convenient to improve effectiveness, as e.g., the use of GPU accelerators. These are especially suitable for subtomogram averaging tasks, where the computational burden lays on the comparison of many rotated versions of the same volume (the template) against the same data particle. This is a close to ideal scenario for the use of GPUs, whose architecture explicitly devises optimal performance for intensive processing of a given data piece. Speed up factors in the approximate range of 200x have been reported in Castaño-Díez (2017).
For the case described in this protocol GPU devices are not required due to low number of particles and iterations during the STA project involved in this stepwise procedure.
To conclude, this protocol describes the operative logic of the Dynamo software package, showcasing the repertory of tools available for geometric manipulations. The protocol offers information about Dynamo commands that are routinely used during STA, so that the user can become familiar with the Dynamo environment. The procedure is divided into several modules that can also be taken individually to solve punctual issues that arise when tomographic data are analyzed. Even though the data set is specific, the problems presented are not unique, but common to many STA projects, e.g., automatic assignment of asymmetry (subboxing) and inherent loss of Fourier information in presence of preferential views (missing wedge). Thus, many of the tools explained in this protocol can be applied to a broad range of STA scenarios for tomographic data, and promise to inspire the development of new STA strategies while the Dynamo software package is being used.

AUTHOR CONTRIBUTIONS
PN performed the numerical experiments and wrote the manuscript with contributions from all authors. HS provided infrastructure and scientific advice. DC-D conceived the image analysis workflow.

FUNDING
This work was supported by the Swiss National Science Foundation (SNF Grant CRSII3_154461 and SNF Grant 205321_179041).