key: cord-0019497-5nyjfyka authors: Zhong, Ellen D.; Bepler, Tristan; Berger, Bonnie; Davis, Joseph H. title: CryoDRGN: Reconstruction of heterogeneous cryo-EM structures using neural networks date: 2021-02-04 journal: Nat Methods DOI: 10.1038/s41592-020-01049-4 sha: 4d5720044463e8e0855ab0c9acc1b24b623f7e66 doc_id: 19497 cord_uid: 5nyjfyka Cryo-EM single-particle analysis has proven powerful in determining the structures of rigid macromolecules. However, many imaged protein complexes exhibit complex conformational and compositional heterogeneity that pose a major challenge to existing 3D reconstruction methods. Here, we present cryoDRGN, an algorithm that leverages the representation power of deep neural networks to directly reconstruct continuous distributions of 3D density maps and map per-particle heterogeneity of single particle cryo-EM datasets. Using cryoDRGN, we uncovered residual heterogeneity in high-resolution datasets of the 80S ribosome and the RAG complex, revealed a new structural state of the assembling 50S ribosome, and visualized large-scale continuous motions of a spliceosome complex. CryoDRGN contains interactive tools to visualize a dataset’s distribution of per-particle variability, generate density maps for exploratory analysis, extract particle subsets for use with other tools, and generate trajectories to visualize molecular motions. CryoDRGN is open-source software freely available at cryodrgn.csail.mit.edu. Proteins and their complexes are dynamic macromolecular machines that carry out the essential biological processes responsible for life. Although the mechanism of these macromolecular machines is often deduced from a static three-dimensional (3D) structure, a more complete understanding could be achieved if one could analyze the full distribution of conformations relevant to function. Single particle cryo-electron microscopy (cryo-EM) is a rapidly maturing method for highresolution structure determination of large macromolecular complexes 1, 2 . Major advances in hardware [3] [4] [5] and software [4] [5] [6] [7] [8] [9] have streamlined the collection and analysis of cryo-EM datasets such that structures of rigid macromolecules can routinely be solved at near-atomic resolution 10, 11 . Increasingly, cryo-EM has been applied to study heterogeneous complexes as the experimental procedure is less sensitive to sample heterogeneity than other methods for structure determination 12, 13 . Additionally, because single particle cryo-EM can capture millions of snapshots of the molecule of interest, each carrying a unique molecule in its own conformational state 14 , cryo-EM holds promise in revealing the conformational landscape of dynamic macromolecular complexes. However, reconstructing ensembles of 3D volumes from such snapshots remains a major computational challenge. Existing tools for heterogeneous reconstruction make often-limiting assumptions on the observed structural heterogeneity. Most commonly, heterogeneity is modeled as though it originates from a small number of independent, discrete states, implemented as "3D classification" or "heterogeneous refinement" in many cryo-EM software packages [15] [16] [17] [18] . However, these discrete classification approaches require specifying initial models for refinement, and because the number and nature of the underlying structural states is unknown a priori, this approach is error-prone and often results in the omission of potentially relevant structures. More critically, such discrete approaches are ill-suited for reconstructing structures undergoing continuous conformational changes. Advanced methods for heterogeneous reconstruction seek to more closely model the continuous nature of flexible molecules. Multi-body refinement, available in RELION, models the structure as the sum of user-defined rigid bodies that are allowed to rotate relative to one another, placing structural assumptions on the observed heterogeneity 19 . Continuous heterogeneity has also been described using principle component analysis (PCA)-based approaches [20] [21] [22] , including the recent 3D Variability Analysis (3DVA) algorithm available in cryoSPARC 23 . Although the linear subspace model of these approaches can provide a summary of the overall variability within the dataset, the visualized heterogeneity contains artifacts when a molecule's conformational deformations are poorly approximated by linear interpolations along basis volumes. In the manifold embedding approach proposed in Dashti et al. 24, 25 , heterogeneous structures are recovered by binning particles along the data manifold followed by traditional homogeneous reconstruction. Additional algorithms for continuous heterogeneous reconstruction have been shown on synthetic datasets 26, 27 . Here, we present cryoDRGN (Deep Reconstructing Generative Networks), a method for heterogeneous cryo-EM reconstruction based on deep neural networks. We hypothesized that neural networks, which are known for their ability to model complex, nonlinear functions 28 , could learn heterogeneous ensembles of cryo-EM density maps. We first show that our neural network representation of structure can model single density maps at high resolution, before demonstrating the full cryoDRGN framework for unsupervised heterogeneous reconstruction. We find that cryoDRGN is a powerful and general approach for analyzing structural heterogeneity in macromolecular complexes of varying size and expected sources of heterogeneity. We show that the cryoDRGN approach can uncover residual heterogeneity in "homogeneous" datasets of the RAG1-RAG2 complex and the 80S ribosome, model large compositional changes of the assembling 50S ribosome, and continuous conformational changes of the precatalytic spliceosome. Remarkably, cryoDRGN's unsupervised approach for representation learning can readily identify and filter impurities in the dataset and can identify rare structural states containing as few as ~1,000 particles. CryoDRGN is distributed as an open-source tool that can be easily integrated in existing pipelines and is freely available at cryodrgn.csail.mit.edu. CryoDRGN performs heterogeneous reconstruction by learning a deep generative model of 3D structure from single particle cryo-EM images. The method consists of a specialized image encoder -volume decoder architecture, which learns an encoding of 2D particle images into a continuous vector space described by the latent variable z ∈ ℝ n (i.e. the latent space), and the concomitant reconstruction of 3D cryo-EM density maps from this latent space representation (Fig 1A) . This choice of model assumes that the heterogeneous structures can be embedded within a continuous, low-dimensional manifold in the latent space, where the dimensionality of the latent space is defined by the user. The model is specified in the Fourier domain in order to relate 2D images as planar slices of the 3D volume 29 , whose orientation is previously determined from a consensus reconstruction. The neural networks are jointly trained from random initialization using stochastic gradient descent on an objective function that seeks to maximize (a variational upper bound on) the data likelihood as in standard Variational Autoencoders (VAEs) 30 . Additional architectural and training details of cryoDRGN are provided in the Methods section. After training, the output of cryoDRGN analysis includes: 1) per-particle latent encodings, z i , describing the dataset's heterogeneity; and 2) a neural network model of 3D density maps that can directly reconstruct a density map given z i . Specifically, the encoder network encodes particle images into the continuous latent space, which allows for visualization and inspection of the particle distribution (Fig. 1B, center) . The trained decoder network can then generate 3D density maps given arbitrary values of the latent variable. For example, representative structures can be generated from regions of latent space with high particle density, and continuous conformational trajectories can be reconstructed by sampling points along a trajectory through latent space (Fig. 1B, right) . Notably, any cryoDRGN-generated volume can be orthogonally validated by traditional reconstruction approaches 15 using nearby particles in the latent space (Fig. 1B, left) . Lastly, any regions of the latent space that are enriched in impurities or imaging artifacts may be selected, and the encompassed particles filtered from subsequent analysis (Fig. 1B, left) . We first evaluated the cryoDRGN volume decoder in representing high resolution cryo-EM density maps. To learn the homogeneous structure of the RAG1-RAG2 signal end complex (RAG -369 kDa) 31 and the Plasmodium falciparum 80S ribosome (Pf80S -4.2 MDa) 32 , we trained the volume decoder network with no latent variable input, using image poses obtained from C1 homogeneous refinements in cryoSPARC 16 (Methods) . Trained on fullresolution images, the cryoDRGN decoder produced structures that correlated with the traditional, voxel-based reconstruction ( Fig. 2A) at resolutions up to 3.6 Å for RAG and 3.9 Å for Pf80S at an FSC = 0.5 threshold (Fig. 2B) , demonstrating the efficacy of this neuralnetwork based representation of 3D structure. As neural networks have a fixed capacity for representation that is constrained by their architecture, we next compared decoder architectures of different sizes to evaluate the tradeoff between representation power and training speed. We found that larger architectures, which have more trainable parameters, result in density maps that correlate with the traditionally reconstructed map at higher resolutions (Fig. 2B) . The networks are trained through multiple passes through the dataset (i.e. epochs) (Fig. 2C) with lower values of the objective function (Fig. 2D ) as training progressed. Notably, while the resolution of the learned structure increased with neural network size, we found that larger models were slower to train (Fig. 2E) . These tradeoffs suggest that the architecture and image size should be tuned to suit the desired balance of speed and achievable resolution. Lastly, we found that the cryoDRGN architecture was capable of learning density maps at sufficiently high resolution to visualize structural features such as bulky side-chains that are consistent with our FSC-based resolution estimates (Fig. 2F ). We next sought to evaluate the complete cryoDRGN framework for heterogeneous reconstruction using simulated datasets (Fig 3A,B) . Datasets modelling continuous heterogeneity were produced by rotating a single dihedral angle of a hypothetical protein complex to simulate a conformational transition along a 1-dimensional reaction coordinate. Single particle cryo-EM images were then simulated either: uniformly along this reaction coordinate (Uniform); with bias towards particular conformations exemplary of cooperative transitions (Cooperative); or with strong bias leading to unobserved transition states (Noncontiguous). A dataset simulating discrete compositional heterogeneity was produced by mixing particles of the bacterial 30S, 50S, and 70S ribosome (Compositional). We then provided each of these four simulated datasets and their corresponding poses to cryoDRGN and trained a 1-D latent variable model (Methods). We found that cryoDRGN was capable of reconstructing both continuous and discrete heterogeneous ensembles (Fig. 3C-H) . On the Uniform conformational heterogeneity dataset, cryoDRGN reconstructed density maps that reproduced the ground truth continuous motion of the complex (Fig. 3C ). When trained on the Compositional dataset, cryoDRGN reconstructed density maps of the 30S, 50S, and 70S ribosomes at distinct values of the latent variable (Fig. 3D ). In addition to reconstructing heterogeneous density maps, cryoDRGN produces a latent encoding for each particle that can be compared to the ground truth reaction coordinate ( Fig. 3E-H) . For the datasets with continuous conformational changes, the latent encoding of each image correlated with position along the reaction coordinate given by the dihedral angle of the underlying model (Spearman r = −0.996, 0.992, and 0.988 for Uniform, Cooperative, and Noncontiguous, respectively) (Fig. 3E ). We observed that the qualitative features of the distribution of latent encodings matched the ground truth, with three modes in the latent encoding distribution for the Cooperative dataset (Fig. 3F ) and distinct clusters for the Noncontiguous and Compositional datasets (Fig. 3G, H) . We note that, in general, the parameterization of a reaction coordinate is non-unique (e.g. when described by the learned latent variable or by dihedral angle, leading to different marginal distributions in Fig. 3E ). To quantitatively assess that cryoDRGN has learned the correct distribution of structures, we compute a "per-image" FSC, which compares reconstructed density maps with the groundtruth on images across the reaction coordinate (Methods), and found that the reconstructed structures of all four datasets correlated well with the ground truth distribution (Fig. 3C , Extended Data Fig. 1 ). We next evaluated cryoDRGN's ability to perform heterogeneous reconstruction on real cryo-EM datasets of the RAG complex 31 and the Pf80S 32 ribosome from above. Ru et al. reported RAG complex structures from two distinct datasets -the "signal end complex", which failed to resolve the distal ends of the 12-RSS and 23-RSS DNA elements or the nonamer binding domain (NBD) of RAG-1; and the "paired complex", which resolved these elements at sufficient resolution for atomic model building (Fig. 4A ). To test whether cryoDRGN could newly uncover heterogeneity of these distal elements in the "signal end complex", we trained a cryoDRGN 10-D latent variable model on the deposited particle images (EMPIAR-10049) 31 . We found that cryoDRGN revealed significant heterogeneity of the 12-RSS, 23-RSS, and NBD (Fig. 4B ). In addition to maps that only resolve the symmetric core (light grey in Fig. 4B ), cryoDRGN revealed structures with RSS positioning that aligns with the canonical conformation found in the "paired complex" atomic model 31 (dark blue), tilting of the RSS strands (light blue), linear 23-RSS DNA (purple), as well as the presence (yellow) and absence (coral) of the NBD. These representative maps were selected out of a large ensemble of generated structures (Methods) from different regions of the latent space (Fig. 4C) . A trajectory sampling from the continuous distribution modeled by cryoDRGN is shown in Supplementary Video 1. To validate the presence of these heterogeneous states in the dataset, we performed heterogeneous 3D refinement in cryoSPARC 16 using the cryoDRGN density maps as initial models, which reproduced the heterogeneity of the RSS elements (Extended Data Fig. 2 ). Subsequent work by Ru et al. suggested that the conformational dynamics and asymmetric positioning of the 12-and 23-RSS by NBD in the pre-cleavage form are fundamental to the structural mechanism underlying the 12-23 rule of V(D)J recombination 33 . Our results newly demonstrate that such heterogeneity is also present in the post-cleavage "signal end" RAG complex. When analyzing a homogeneous reconstruction of the Pf80S ribosome, Wong et al. observed flexibility in the small subunit head region and missing density for peripheral rRNA expansion segment elements 32 . To explore if this unresolved density resulted from residual heterogeneity, we trained a cryoDRGN 10-D latent variable model on their deposited dataset (EMPIAR-10028) 32 and reconstructed an ensemble of density maps that not only contained structures consistent with the homogeneous reconstruction, but also revealed rotation of the 40S small subunit (SSU) (Fig. 4D) , heterogeneity within the SSU head (Extended Data Fig. 3 ), and motion of many peripheral rRNA expansion segments (Supplementary Video 2). By visualizing a representative 40S rotated and unrotated density map, we found that cryoDRGN was able to simultaneously capture the large-scale inter-subunit rotation and coordinated smaller-scale structural rearrangements, including motion of the L1 stalk, disappearance of an rRNA helix, and the disappearance of the inter-subunit bridge formed by the C-terminal helix of eL8, which is consistent with Sun et al.'s characterization of Pf80S dynamics 34 ( Fig 4D) . We then visualized the 10-D latent space representation of the Pf80S particles with PCA ( Fig. 4E ) and with Uniform Manifold Approximate and Projection (UMAP) 35 (Extended Data Fig. 4 ). The 40S rotated density map originated from a region of the particle distribution separated along the first PC of the latent space. To validate the presence of this state, we extracted 4,889 particles constituting the outlying cluster (Methods). Traditional homogeneous reconstruction of these particles in cryoSPARC produced a 6.4 Å reconstruction of the rotated 40S state consistent with the cryoDRGN structure (Extended Data Fig. 4) . Additionally, by sampling many density maps from the latent space, we observed that structures with density missing from the SSU head group were located within a subregion of the main cluster of the UMAP visualization (Extended Data Fig. 3 ). We hypothesize that the 40S rotated state appears as a visually distinct cluster because more mass changes to rotate the entire 40S subunit, as opposed to the missing SSU head group state, which involves changes in a smaller region of the 40S subunit. Next, we sought to evaluate cryoDRGN on a highly heterogeneous cryo-EM dataset of the E. coli large ribosomal subunit (LSU) undergoing assembly (EMPIAR-10076) 12 . This dataset is known to contain substantial compositional and conformational heterogeneity; In the original analysis, multiple expert-guided rounds of hierarchical 3D classification resulted in 13 discrete structures that were grouped into 4 major assembly states. Here, we aimed to assess if cryoDRGN could automatically reveal these heterogeneous states without userguided 3D classification. As initial pilot experiments, we first trained 1-D and 10-D latent variable models on downsampled images of the dataset (Methods). The dataset's latent space representation exhibited distinct peaks in the 1-D case or clusters in the 10-D case when visualized with UMAP 35 (Fig. 5A ,B) that correspond to the major assembly states when grouped by the published 3D classification labels (Fig. 5C,D) . As the particles were obtained by crudely fractionating a lysate in order to capture the full ensemble of cellular assembly intermediates, a substantial fraction of the published particle stack corresponds to 30S or non-ribosomal impurities. These unassigned particles were outliers in the latent representation ( Fig 5C, Extended Data Fig. 5 ), and neither 2D class averages nor a traditional 3D reconstruction of these particles produced structures consistent with assembling LSU ribosomes (Extended Data Fig. 5 ). As we did not wish to devote representation capacity of the cryoDRGN neural networks in modelling these impurities, we used the latent representation to filter the dataset before further analysis, taking the intersection of the particle stack after filtering based on the 1-D and 10-D latent variable model (Methods). To explore the heterogeneity within the LSU assembly states, we trained a cryoDRGN 10-D latent variable model on the remaining images at higher resolution (Methods). The decoder network reconstructed density maps matching the reported major ( Fig. 5E ) and minor (Extended Data Fig. 6 ) assembly states of the LSU. We visualized the encodings of particle images in the 10-D latent space with UMAP and observed clusters corresponding to the major ( Fig. 5F ) and minor states (Fig. 5G , Extended Data Fig. 6 ) of LSU assembly after coloring by the published 3D classification. From the latent representation, we also noted a clearly separated cluster of particles assigned to class A, and structures sampled from this region of latent space reconstructed the 70S ribosome, an impurity in the dataset (Fig. 5H ). Finally, we identified a small cluster of ~1,100 particles adjacent to the class C cluster whose particles were originally classified into class E (Fig. 5F, inset) . The density map reconstructed by the decoder from this region revealed a previously unreported assembly intermediate that we newly define as class C4 (Fig. 5I ). Like the other class C structures, class C4 lacked the central protuberance, but possessed clearly resolved density for rRNA helix 68, which was only present in the mature E4 and E5 classes from Davis et al. 12 Traditional homogeneous reconstruction of the particle images constituting this cluster reproduced a similar, albeit lower-resolution structure, which confirmed the existence of this structural state in the original dataset (Extended Data Fig. 7 ). We found that the cryoDRGN latent representation is highly reproducible across replicates (Extended Data Fig. 8 ). CryoDRGN experiments and runtimes are summarized in Figure 5J . In addition to illustrating cryoDRGN's ability to model extremely heterogeneous datasets without userdriver classification, this analysis further demonstrated that cryoDRGN can identify novel and rare (~1% of all particles) structural classes that would likely be overlooked by traditional hierarchical classification. Finally, to assess cryoDRGN's ability to model large continuous conformational changes, we reanalyzed a dataset of the pre-catalytic spliceosome (EMPIAR-10180) 36 . Using extensive, expert-guided focused classifications, Plaschka et al. reconstructed a composite map for this complex and suggested that the complex sampled a continuum of conformations with large motions of the SF3b subcomplex 36 . In our analysis, we first trained a 10-D latent variable model on the downsampled images using image poses derived from a consensus reconstruction (Methods). Multiple clusters were observed in the latent space encodings of the dataset's particle images (Fig. 6A ). In sampling structures from the latent space, the generated density maps revealed expected spliceosome conformations from the largest cluster, poorly resolved structures likely due to imaging artifacts from the leftmost cluster, structures lacking density for the SF3b subcomplex from a third cluster, and extra density of the U2 core, which is thought to be highly dynamic 13 , from the uppermost cluster (Fig. 6B ). To focus our analysis on bone-fide pre-catalytic spliceosome particles, we leveraged the latent space representation to eliminate any particles that mapped to the undesired clusters from two replicate runs (Methods). With the filtered particle stack, we trained a 10-D model on higher resolution images and visualized the dataset's latent encodings in 2-D using PCA (Fig. 6C ). The visualized data manifold was unfeatured, consistent with a molecule undergoing non-cooperative conformational changes. By generating structures along the first principal component of the latent space encodings, we reconstructed a trajectory of the SF3b and helicase subcomplexes in motion, smoothly transitioning from an elongated state to one compressed against the body of the spliceosome (Fig. 6D ). This large scale-motion is consistent with motions derived from the first principal component of rigid body orientations from multi-body analysis (Extended Data Fig. 9 ) and in the first principal component of 3DVA's linear subspace model (Extended Data Fig 10) . A similar traversal along the second PC produced a continuous trajectory of the SF3b and helicase subcomplexes moving in opposition (Supplementary Fig. 1 , Supplementary Video 4). The anticorrelated motion of the SF3b and helicase subcomplexes in PC2, together with their correlated motion in PC1, suggests that the two domains move independently in the imaged ensemble. Finally, although trajectories along latent space PCs provide a summary of the extent of variability in the structure, cryoDRGN can also generate structures at arbitrary points from the latent space. By traversing along the nearest neighbor graph of the latent encodings and generating structures at the visited nodes, cryoDRGN generated a plausible trajectory of the conformations adopted by the pre-catalytic spliceosome (Supplementary Video 4), highlighting the potential of single particle cryo-EM to uncover the conformational dynamics of molecular machines. This work introduces cryoDRGN, a method using neural networks to reconstruct 3D density maps from heterogeneous single particle cryo-EM datasets. The power of this approach lies in its ability to represent heterogeneous structures without simplifying assumptions on the type of heterogeneity. In principle, cryoDRGN is able to represent any distribution of structures that can be approximated by a deep neural network, a broad class of function approximators for continuous, nonlinear functions 28 . This flexibility contrasts with existing methods that impose limiting assumptions on the types of structural heterogeneity present in the sample. For example, 3D classification assumes a mixture of discrete structural classes; multibody refinement assumes conformational changes are composed of user-defined rigidbody motions; and 3DVA assumes that heterogeneity is generated from linear combinations of density maps. Although these approaches have proven useful, their model for heterogeneity is often mismatched with the true structural heterogeneity in many systems, and thus can introduce bias into reconstructions. In contrast, we empirically show that the cryoDRGN architecture can model both discrete compositional heterogeneity and continuous conformational changes without the aforementioned structural assumptions. For example, we discovered heterogeneous states of the RAG complex and Pf80S ribosome that were originally averaged out of the homogeneous reconstruction. When analyzing the assembling E. Coli LSU dataset, cryoDRGN learned an ensemble of LSU assembly states without a priori specification of the number of states or initial models as is required for 3D classification. Finally, when analyzing the pre-catalytic spliceosome, we found that the continuous conformational changes reconstructed by cryoDRGN lacked the rigid-body boundary artifacts from multibody refinement's mask-based approach 19 (Extended Data Fig. 9 ) or linear interpolation artifacts from 3DVA's linear subspace model 23 (Extended Data Fig. 10 ). A key feature of cryoDRGN is its ability to provide a low-dimensional representation of the dataset's heterogeneity given by each particle's latent encoding. Subject to optimization, cryoDRGN organizes the latent space such that structurally related particles are in close proximity. In simulated and real datasets, we find that continuous motions are embedded along a continuum in latent space ( Fig. 3E -G, 6C) and that compositionally distinct states manifest as clusters (Fig. 3H, 5F ). These empirical results demonstrate that visualization of the distribution of latent encodings can be informative in exploring the structural heterogeneity within the imaged ensemble, and even suggest a possible interpretation of the latent space as a pseudo-conformational landscape. However, we note that cryoDRGN's objective function aims only to reproduce the distribution of structures and does not guarantee that the latent space layout (or its 2D visualization) will produce interpretable features of the underlying energy landscape. Furthermore, structures reconstructed from unoccupied regions of the latent space will not in general correspond to true physical structures, as cryoDRGN optimizes the likelihood of the observed data and these structures are not observed. Finally, in real datasets, there may exist images that do not originate from the standard single particle image formation model, for example, false positives encountered during particle picking. We demonstrated the utility of the latent space representation in identifying such impurities, ice artifacts, and other out-of-distribution particle images that may be filtered out in subsequent analyses ( Fig. 5A-D, 6A) . We emphasize that different datasets have diverse sources of heterogeneity, and thus the interpretation of the cryoDRGN latent space is highly dataset-dependent. We provide interactive analysis tools in the cryoDRGN software for exploring the learned latent space. In addition to encoding particles in an unsupervised manner, cryoDRGN can reconstruct 3D density maps from user-defined positions in latent space. Because cryoDRGN learns a generative model for structure, an unlimited number of structures can be generated and analyzed, thus enabling visualization of structural trajectories. By leveraging the latent encodings of the particle images, users can directly traverse the data manifold and only sample structures from regions of latent space with significant particle occupancy. Indeed, we applied a well-established graph-traversal algorithm 37 to visualize data-supported motions in the RAG complex, the Pf80S ribosome, bL17-independent assembly of the bacterial ribosome, and the pre-catalytic spliceosome (Supplemental Videos 1,2,3,4). We note that while this approach is useful in visualizing potential structural changes linking one state to another, they do not necessarily reveal the kinetically preferred path. Although this method emphasizes an unsupervised approach to analyzing structural heterogeneity, cryoDRGN does require that the user define the dimensionality of the latent space and the architecture of both the encoder and decoder networks. We find that in practice, training a smaller architecture on downsampled images is effective at distinguishing bona-fide particles from contaminants and imaging artifacts ( Fig. 5A-D, Fig. 6A ), and we recommend users initially employ such pilot experiments to filter their dataset. Additionally, we find that in our tested datasets, a 10-D latent space provides sufficient representation capacity to effectively model structural heterogeneity, and that this 10-D space can be readily visualized with PCA or UMAP. Notably, we recommend the use of such a 10-D latent space instead of lower dimensional space as we have found that 10-D spaces result in much more rapid overall training, which is consistent with similar observations of related overparameterized neural network architectures 38 . Finally, users must specify the number of nodes and layers in the neural networks, hyperparameters that limit the complexity of the learned function. Here, we find an inverse relationship between neural network size and the achievable resolution of a given structure (Fig. 2B) . Training larger networks on larger images is significantly slower (Fig. 2E) , and we recommend that users perform an initial assessment using down-sampled images and relatively small networks before proceeding to high-resolution reconstructions. We note that use of excessively complex models (i.e. large architectures or latent variable dimensions) can lead to overfitting, which may be alleviated by standard neural network regularization techniques such as early stopping or using a simpler model 38 . We provide recommended training settings in the cryoDRGN software. CryoDRGN can be used to identify novel clusters of structurally-related particles, which can then be visualized by generating density maps from that region of latent space. Indeed, in analyzing the LSU assembly dataset, we noted a completely new structural state, C4, that was completely missed in traditional hierarchical classification. C4 provides structural evidence that a functionally critical intersubunit helix (h68) can dock in a native conformation in the absence of the central protuberance (Fig. 5I) . Notably, we could validate the existence of this state by performing traditional homogeneous refinement using ~1,000 particles from this cluster in the cryoDRGN latent space (Extended Data Fig. 7) . Although we were able to readily identify this state from a distinct cluster present in the UMAP visualization (Fig. 5G) , in general, the definition of distinct "states" may not be as readily apparent (e.g. the "missing SSU head" state in Extended Data Fig. 3) , and we view the unsupervised identification of states from the cryoDRGN structural ensemble as an exciting area to pursue. In future work, we envision using cryoDRGN to reveal the number of discrete classes, their constituent particles, and to produce initial 3D models that could be used as inputs for a traditional 3D reconstruction. Given the mature state of such tools 39, 40 , this data-driven classification approach followed by traditional homogeneous reconstruction, particle polishing, and higher order image aberration correction, has the potential to produce highresolution structures of the full spectrum of discrete structural states. As implemented, cryoDRGN uses pose estimates resulting from a traditional consensus 3D reconstruction. In analyzing four publicly available datasets, we found that such consensus pose estimates were sufficiently accurate to generate meaningful latent space encodings and to produce interpretable density maps of distinct structures. It is clear, however, that this approach will fail if the degree of structural heterogeneity in the dataset results in inaccurate pose estimates. For example, a mixture of structurally unrelated complexes will align poorly to a consensus structure, and thus produce poor pose estimates. Notably, our framework is differentiable with respect to pose variables, which, in principle, should allow for on-the-fly pose-refinement or de novo pose estimation. Future work will explore the efficacy of incorporating such features to enable fully unsupervised reconstruction of heterogeneous distributions of protein structure from cryo-EM images. Coordinate-based networks to represent 3D structure-The cryoDRGN method performs heterogeneous cryo-EM reconstruction by learning a neural network representation of 3D structure. In particular, we use a positionally-encoded multilayer perceptron (MLP) to approximate the function V: ℝ 3+n → ℝ, which models structures as generated from an ndimensional continuous latent space. We refer to this architecture as a coordinate-based neural network 41,42 as we explicitly model the volume as a function of Cartesian coordinates. Without loss of generality, we model volumes on the domain [−0.5,0.5] 3 . Instead of directly supplying the 3D Cartesian coordinates, k, to the deep coordinate network, coordinates are featurized with a fixed positional encoding function 43 consisting of sinusoids whose wavelengths follow a geometric progression from 1 up to the Nyquist limit: where D is set to the image size 1 used in training. Empirically, we found that excluding the highest frequencies of the positional encoding led to better performance when training on noisy data, and we provide an option to modify the positional encoding function by increasing all wavelengths by a factor of 2π. Training system-This neural representation of 3D structure is learned via an imageencoder/volume-decoder architecture based on the variational autoencoder (VAE) 30, 44 . We follow the standard image formation model in single particle cryo-EM where observed images are generated from projections of a volume at a random unknown orientation, R ∈ SO(3). We use an additive Gaussian white noise model. Volume heterogeneity is generated from a continuous latent space, modeled by the latent variable z, where the dimensionality of z is a hyperparameter of the model. Given an image X, the variational encoder, q ξ (z|X), produces a mean and variance, μ z|X and Σ z|X , statistics that parameterize a Gaussian distribution with diagonal covariance, as the variational approximation to the true posterior p(z|X). The prior on the latent variable is a standard normal distribution N(0, I). The positionally-encoded MLP is used as the probabilistic decoder, p θ (V| k, z) , and models structures in frequency space. Given Cartesian coordinate k ∈ ℝ 3 and latent variable z, the probabilistic decoder predicts a Gaussian distribution over V(k, z). The encoder and decoder are parameterized with fully connected neural networks with parameters ξ and θ, respectively. Since 2D projection images can be related to volumes as 2D central slices in Fourier space 29 , oriented 3D coordinates for a given image can be obtained by rotating a D × D lattice spanning [−0.5,0.5] 2 originally on the x-y plane by R, the orientation of the volume during imaging. Then, given a sample out of q ξ (z|X) and the oriented coordinates, an image can be reconstructed pixel-by-pixel through the decoder. The reconstructed image is then translated by the image's in-plane shift and multiplied by the CTF before it is compared to the input image. The negative log likelihood of a given image under our model is computed as the mean square error between the reconstructed image and the input image. Following the standard VAE framework, the optimization objective is a variational lower bound of the model evidence: where the first term is the reconstruction error estimated with one Monte Carlo sample, the second term is a regularization term on the latent representation, and β is an additional hyperparameter, which we set by default to 1/|z|. By training on many 2D slices with sufficiently diverse orientations, the 3D volume can be learned through feedback from the 2D views. For further details, we refer the reader to a preliminary version of the method described in the proceedings of the International Conference for Learning Representations 41 . The results presented here employ the training regime described in Zhong et al. using previously determined poses from a consensus reconstruction 41 . Simulated compositionally heterogeneous dataset generation-To generate the compositionally heterogeneous dataset, the 30S, 50S and 70S subunits of the E. coli ribosome were extracted from PDB 4YBB in PyMOL 45 . A density map of each subunit was generated from the atomic model using the molmap 46 command in Chimera 47 at a grid spacing of 1.5 Å/pix and a resolution of 4.5 Å. The resulting volume was padded to a box size of D=256, where D is the width in pixels along one dimension. Simulated particle images were generated with a custom Python script available in the cryoDRGN software by rotating the density map with a random rotation sampled uniformly from SO (3), projecting along the z-axis, and shifting the image with an in-plane translation sampled uniformly from [−20,20] 2 pixels. Images were then downsampled to D=128 by Fourier clipping using a custom Python script, corresponding to a Nyquist limit of 6 Å. Projection images were multiplied with the CTF in Fourier space, where the CTF was computed from defocus values randomly sampled from those given in EMPIAR-10028 32 , no astigmatism, an accelerating voltage of 300 kV, a spherical aberration of 2 mm, and an amplitude contrast ratio of 0.1. An envelope function with a B-factor of 100 Å 2 was applied. Noise was added with a signal to noise ratio (SNR) of 0.1 where the noise-free signal images were defined as the entire D × D image. After performing this procedure for each subunit, 10k, 15k, and 25k simulated particles of the 30S, 50S, and 70S ribosome, respectively, were combined. Simulated conformationally heterogeneous dataset generation-To simulate continuous conformational heterogeneity, 50 density maps were generated along a onedimensional reaction coordinate defined by rotating a dihedral angle in an atomic model of a hypothetical protein complex. Each model was generated at 0.03 radian increments of the bond rotation, leading to a total range of 1.5 radians. Density maps were generated using the molmap 46 command in Chimera 47 at a grid spacing of 6 Å/pix and resolution of 12 Å, and padded to a box size of D=128. For the Uniform dataset, 1000 projection images were generated for each density map at random orientations and in-plane translations sampled from [−10,10] 2 pixels. For the nonuniform datasets, particles were generated along the reaction according to a 3-component Gaussian mixture model with means at the 10 th , 25 th , and 40 th density map and standard deviation of 0.09 and 0.03 radians for the Cooperative and Noncontiguous datasets, respectively. Sampled reaction coordinate values were binned to convert into a particle distribution among the 50 generated density maps, and clipped at values of the reaction coordinate beyond the 50 maps. A total of 50k particles were generated for each dataset. CTF and noise at an SNR=0.1 were added to all datasets using the same procedure described above with CTF defocus values randomly sampled from EMPIAR-10028 32 . Real cryo-EM datasets-Picked particles and the star file containing CTF parameters were downloaded from the Electron Microscopy Public Image Archive (EMPIAR) 48 for datasets EMPIAR-10049, EMPIAR-10028, EMPIAR-10076, and EMPIAR-10180. Particle images were downsized to the image size used in training by clipping in Fourier space with a custom Python script available in the cryoDRGN software. Homogeneous 3D reconstruction of the Pf80S ribosome (EMPIAR-10028) was performed in cryoSPARC v2.4 16 Poses from a consensus reconstruction of the pre-catalytic spliceosome were obtained from the star file deposited in EMPIAR-10180. CryoDRGN decoder networks with no input latent variable were trained for 50 epochs on full-resolution images of the RAG complex (D=192, 1.23 Å/pix) and the Pf80S ribosome Fourier shell correlation curves were computed between the cryoSPARC density maps and cryoDRGN density maps using a custom Python script available in the cryoDRGN software. Real space masks were defined by first thresholding the cryoDRGN volume at half of the 99.99th percentile density value. The mask was then dilated by 25 Å from the original boundary, and a soft cosine edge was used to taper the mask to 0 at 15 Å from the dilated boundary. Model training-A summary of the datasets, hyperparameters, and runtimes for all cryoDRGN heterogeneous reconstruction experiments is given in Supplementary Table 1 . CryoDRGN encoder-decoder networks were trained from their randomly initialized values for each single particle cryo-EM dataset. Image poses used for training were either the ground truth poses for simulated datasets or poses obtained from a consensus reconstruction as described above. All networks were trained on minibatches of 8 images using the Adam optimizer with a learning rate of 0.0001. After training, the dataset images were evaluated through the encoder to obtain the latent encoding for each image. We define the latent encoding as the maximum a posteriori value of q ξ (z|X) predicted by the encoder. Latent space visualization-For latent spaces with dimension greater than 2, the distribution of latent encodings were visualized with standard dimensionality reduction techniques such as PCA and UMAP 35 . PCA projections of latent space particle distributions were computed using the implementation provided by scikit-learn 50 . Two-dimensional UMAP 35 representative density map for each region is generated at the "on-data" cluster center; We define the latent encoding closest in Euclidean distance to the k-means cluster center as the "on-data" cluster center. Automated tools to generate k representative density maps following this procedure are provided in the cryoDRGN software. For each simulated heterogeneous dataset, a 1-D latent variable model was trained for 100 epochs. The encoder architecture was 256 × 3 and the decoder architecture was 512 × 5. The image poses used for training were the ground truth image poses. After training on the Uniform simulated dataset, structures shown in Figure 3C were generated at the 5th, 23rd, 41st, 59th, 77th, and 95 th percentile values of the latent encodings, and sharpened by a Bfactor of −100 Å 2 . After training on the Compositional simulated dataset, structures shown in Figure 3D were generated at the k-means cluster centers after performing k-means clustering with k=3 on the latent encodings and sharpened by a B-factor of −100 Å 2 . Spearman correlation was computed using the implementation provided in the scipy version 1.5.2 Python package (https://www.scipy.org). For simulated datasets where the ground-truth distribution of structures is known, "perimage" FSC curves can be computed between cryoDRGN-reconstructed density maps and the ground-truth density maps to quantitatively evaluate the reconstructed ensemble. To compute a per-image FSC, an FSC curve is computed between the density map generated by the cryoDRGN decoder at the value of the latent variable predicted for a given particle image and the ground-truth density map used to generate the image. 100 images randomly sampled according to the ground truth distribution of structures were used in the assessment of each of the simulated datasets. No real-space mask was used in computing the FSC. A 10-D latent variable model was trained on full-resolution particle images from EMPIAR-10049 (D=192, 1.23 Å/pix) and their consensus reconstruction poses for 25 epochs. The encoder and decoder architectures were 1024 × 3. After training, k-means clustering with k=100 was performed on the predicted latent encodings for the dataset, and volumes were generated at the "ondata" cluster centers using the decoder network. Six structurally diverse representative structures were manually selected for visualization in Figure 4A . To validate the heterogeneous RSS and NBD conformations observed in cryoDRGN, we use the 6 selected density maps, low pass filtered by 20 Å, as initial models to a heterogeneous refinement job in cryoSPARC v2.15. Pilot experiments: A 10-D latent variable model was trained on downsampled images (D=128, 3.78 Å/pix) from EMPIAR-10028 and their consensus reconstruction poses for 50 epochs. The encoder and decoder architectures were 256 × 3. Particle filtering: After training, k-means clustering with k=20 was performed on the predicted latent encodings for the dataset. One cluster contained 860 particles that were outliers when viewing the projected encodings along the first and second principal component. This observation was reproducible, and the particles belonging to the outlier cluster from either of two replicates (960 particles in total) were removed from the dataset. High-resolution training: After particle filtering, a 10-D latent variable model was trained on a random 90% the remaining 104,280 images (D=256, 1.88 Å/pix) for 25 epochs. The encoder and decoder architectures were 1024 × 3. After training, k-means clustering with k=50 was performed on the predicted latent encodings for the dataset, and volumes were generated at the "ondata" cluster centers using the decoder network. A representative structure of the rotated state and the unrotated state were manually selected for visualization in Figure 4B . A representative structure of the missing head group state was manually selected for visualization in Extended Data Figure 3 . The numbered k-means cluster centers shown in Extended Data Figure 3A , originally arbitrarily ordered, were reordered based on hierarchical clustering of the latent encodings with Euclidean distance metric and average linkage. Validation with traditional reconstruction: To validate the 40S rotated state, we selected 4,889 particles as the cluster from k-means clustering with k=20 that was separated along PC1 (Extended Data Fig. 4) . These particles were then input to a homogeneous refinement job in cryoSPARC v2.15. The cryoDRGN density map, low pass filtered by 30 Å, was used as the initial model. Pilot experiments: A 1-D and a 10-D latent variable model were trained on downsampled images (D=128, 3.3 Å/pix) from EMPIAR-10076 with poses from a consensus reconstruction for 50 epochs. The encoder and decoder architectures were 256 × 3. Particle filtering: From the 1-D experiment, particles with z ≤ −1 were removed from subsequent analysis. From the 10-D experiment, a 5-component, full-covariance Gaussian mixture model (GMM) was fit to the latent encodings using scikit-learn 50 , and particles from the outlier cluster were removed. The outlier cluster was identified by visualizing the magnitude of the latent encodings (Extended Data Fig. 4) . The intersection of both filtered particles stacks was used for subsequent analysis. 2D classification of the kept and removed particles was performed in cryoSPARC v2.4 16 using all default options except for the number of 2D classes, which was set to 20. Ab-initio reconstruction of the kept and removed particles was performed in cryoSPARC v2.4 16 using all default options. High-resolution training: A 10-D latent variable model was trained on a random 90% of the remaining 97,031 images (D=256, 1.7 Å/pix) for 50 epochs. The encoder and decoder architectures were 1024 × 3. Two additional replicates were run, one with the exact settings from a different random initialization and a second with latent variable dimension |z| = 8. After training, the dataset's latent encodings were viewed in 2D with UMAP 35 . Density maps corresponding to the major and minor assembly states were generated at the "on-data" mean latent encoding for each class, i.e. z M = 1 where M is the set of particles assigned to a given class in the published 3D classification. The map-to-map FSC was computed between the cryoDRGN and published density map for each minor class. Density maps were aligned in Chimera and a loose real-space mask (obtained as described above) was applied before computing an FSC curve. Reproducibility analysis: For each replicate, a 5-component, full-covariance GMM was fit to the UMAP embeddings using scikit-learn 50 . UMAP axes were negated to facilitate visual comparison. Label assignments were permuted to ensure consistent assignments between replicates. Clustering consistency was computed as the percentage of particles with identical GMM labels. New assembly state C4: Particles corresponding to the new assembly state were manually selected from the UMAP embeddings with an interactive lasso tool in a custom visualization script available in the cryoDRGN software, whose outline is shown in the Figure 5F inset. The mean latent encoding of the resulting 1,113 selected particles was used to generate the structure representative for this new assembly state. Validation of C4 with traditional refinement: The particles associated with class C4 were then input to a homogeneous refinement job in cryoSPARC v2.15. The cryoDRGN density map, low pass filtered to 30 Å, was used as the initial model. Particle filtering: The UMAP embeddings showed multiple clusters where the largest cluster corresponded to fully formed pre-catalytic spliceosomes. Particles corresponding to other clusters were removed from subsequent analyses by first performing k-means clustering with k=20 on the latent encodings, and removing k-means clusters whose structure did not resemble the fully formed pre-catalytic spliceosome (11 out of 20 k-means clusters in one replicate, and 10 out of 20 in a second replicate). High-resolution training: A 10-D latent variable model was trained on a random 90% of the remaining 155,247 images (D=256, 2.1 Å/pix) for 50 epochs. The encoder and decoder architectures were 1024 × 3. After training, the dataset's latent encoding was viewed in 2-D with UMAP and PCA. Density maps in Figure 6D were generated at the latent encoding values along the PC1 axis at five equally spaced points between the 5 th and 95 th percentile of PC1 values. Density maps in Supplementary Figure 1 were generated at the latent encoding values along the PC2 axis at five equally spaced points between the 5 th and 95 th percentile of PC2 values. Density map generation along PC axes is implemented in a custom script in the cryoDRGN software. Trajectories were generated by first creating a nearest-neighbors graph from the latent encodings of the images, where a neighbor was defined if the Euclidean distance was below a threshold computed from the statistics of all pairwise distances. We choose a value for each dataset such that the average number of neighbors across all nodes is 5. Edges were then pruned such that a given node does not have more than 10 neighbors. Then, Djikstra's algorithm 37 was used to find the shortest path along the graph connecting a series of anchor points, and density maps were generated at the z value of the visited nodes. Anchor points were either defined manually or set to be the "on-data" cluster centers after performing kmeans clustering of the latent encodings. For the graph traversal of the RAG complex in Supplemental Video 1, we use the latent encodings of the 6 density maps shown in Figure 4A as the anchor points. For the graph traversal of the Pf80S ribosome in Supplemental Video 2, we use 10 randomly chosen latent encodings as the anchor points out of the k-means cluster centers with k=20 that are shown prior to the graph traversal. For the graph traversal of the assembling ribosome in Supplemental Video 3, we use the latent encodings of the minor assembly states following the three assembly pathways given in Figure 7 Trained cryoDRGN models and generated volumes are deposited to Zenodo at doi:10.5281/ zenodo.4355284. Inputs files for training (excluding particle stacks) are deposited to Zenodo at doi:10.5281/zenodo.4412072 and are also available at www.github.com/zhonge/ cryodrgn_empiar. We used the following publicly available datasets: CryoDRGN software and analysis scripts are implemented in custom software deposited to Zenodo at doi:10.5281/zenodo.4412058 and are also available at www.github.com/zhonge/ cryodrgn. Extended Data Figure 1 . Per-image FSC curves between ground-truth maps and density maps from cryoDRGN trained on simulated heterogeneous datasets. For each dataset, we compute 100 "per-image FSC curves" between generated and groundtruth density maps (Methods A) Visualization of a rigid-body trajectory from multibody refinement of the pre-catalytic spliceosome. Snapshots are extracted from the trajectory along PC1 of rigid-body orientations, showing a large-scale motion of the SF3b subcomplex. The masks that define the rigid-body decomposition of the complex are shown on the right. The circle highlights a helix that breaks at the boundary between bodies where the rigid-body assumption no longer holds. Adapted from Video 3 of Nakane et al. 19 and density maps and masks deposited in EMPIAR-10180. B) Alternate view of cryoDRGN's PC1 traversal in Figure 6 . CryoDRGN learns the same overall motion of the SF3b subcomplex, however its neural network representation lacks the helix-breaking artifact. A) The cryoDRGN model consists of two neural networks structured in an image encodervolume decoder architecture with a continuous latent variable representation of heterogeneity. During training, each particle image is encoded into the low-dimensional latent space, and then reconstructed as its corresponding model slice based on the Fourier slice theorem. Image and volume data are depicted in real space for visual clarity. B) Once a cryoDRGN model has been trained, the full dataset of particle images is encoded into the latent space, which is visualized as a contour map here with darker regions corresponding to higher particle density (center). The decoder, which represents an ensemble of 3D density maps, can directly generate density maps from arbitrary values of the latent variable (right). The particle stack may also be filtered using the latent space representation for validation of specific structures via traditional tools or to remove impurities from the dataset (left). Example images from EMPIAR-10180 36 . A) UMAP visualization of the latent space representation of particle images of pre-catalytic spliceosome (EMPIAR-10180) 36 after training a 10-D latent variable model with cryoDRGN. B) Representative structures generated at points shown in (A) that depict the expected structures of the pre-catalytic spliceosome (i,ii), structures likely corrupted by imaging artifacts (iii), the complex lacking the SF3b subcomplex (iv), and with the U2 core (v). Density maps are shown at identical isosurface levels except for (v) which required a lower value to highlight the U2 core. C) PCA projection of latent space encodings after training a 10-D latent variable model on the dataset filtered for the selected region in (A). D) Structures generated by traversing along PC1 of the latent space representation at points shown in (C). Additional density maps are shown in Extended Data Figure 7 and Supplemental Video 4. The development of cryo-EM into a mainstream structural biology technique Single-particle cryo-EM-How did it get here and where will it go Direct electron detection yields cryo-EM reconstructions at resolutions beyond 3/4 Nyquist frequency Automated molecular microscopy: The new Leginon system Electron counting and beam-induced motion correction enable near-atomic-resolution single-particle cryo-EM Real-time CTF determination and correction & Fleet DJ Building Proteins in a Day: Efficient 3D Molecular Reconstruction Bayesian view on cryo-EM structure determination Positive-unlabeled convolutional neural networks for particle picking in cryoelectron micrographs Cryo-EM structure of the large subunit of the spinach chloroplast ribosome Cryo-EM structure of the 2019-nCoV spike in the prefusion conformation Modular Assembly of the Bacterial Large Ribosomal Subunit Structure and Conformational Dynamics of the Human Spliceosomal Bact Complex Sigworth FJ Principles of cryo-EM single-particle image processing implementation of a Bayesian approach to cryo-EM structure determination algorithms for rapid unsupervised cryo-EM structure determination Likelihood-based classification of cryo-EM images using FREALIGN & Grigorieff N. cisTEM, user-friendly software for single-particle image processing & Scheres SH Characterisation of molecular motions in cryo-EM single-particle data by multi-body refinement in RELION Estimation of variance distribution in three-dimensional reconstruction I Theory & Spahn CMT Identifying conformational states of macromolecules by eigen-analysis of resampled cryo-EM images Directly reconstructing principal components of heterogeneous particles from cryo-EM images & Fleet DJ 3D Variability Analysis: Directly resolving continuous flexibility and discrete heterogeneity from single particle cryo-EM images Trajectories of the ribosome as a Brownian nanomachine Continuous changes in structure mapped by manifold embedding of singleparticle data in cryo-EM Cryo-EM reconstruction of continuous heterogeneity by Laplacian spectral volumes Continuously heterogeneous hyper-objects in cryo-EM and 3-D movies of many temporal dimensions Multilayer feedforward networks are universal approximators Auto-encoding variational bayes Molecular Mechanism of V(D)J Recombination from Synaptic RAG1-RAG2 Complex Structures Cryo-EM structure of the Plasmodium falciparum 80S ribosome bound to the antiprotozoan drug emetine Structural gymnastics of RAG-mediated DNA cleavage in V(D)J recombination Dynamical features of the Plasmodium falciparum ribosome during translation Uniform Manifold Approximation and Projection for Dimension Reduction Structure of a pre-catalytic spliceosome Introduction to Algorithms Understanding deep learning requires rethinking generalization & Scheres SHW Estimation of high-order aberrations and anisotropic magnification from cryo-EM data sets in RELION-3.1 & Fleet DJ Non-uniform refinement: Adaptive regularization improves single particle cryo-EM reconstruction Reconstructing continuous distributions of 3D protein structure from cryo Explicitly disentangling image content from translation and rotation with spatial-VAE Attention is all you need Stochastic backpropagation and approximate inference in deep generative models The PyMOL Molecular Graphics System, Version 2.3, Schrodinger, LLC EMAN2: an extensible image processing suite for electron microscopy UCSF Chimera -A visualization system for exploratory research and analysis EMPIAR: a public archive for raw electron microscopy image data Optimal determination of particle orientation, absolute hand, and contrast loss in single-particle electron cryomicroscopy Scikit-learn: Machine Learning in Python Meeting modern challenges in visualization and analysis We thank A. Lerer, R. Lederman Refer to Web version on PubMed Central for supplementary material. differential occupancy of the C-terminal helix of eL8 and an rRNA helix between the two states. E) Latent space representation of particle images from EMPIAR-10028 32 , visualized using PCA with explained variance (EV) noted. Structures from (D) are marked with the corresponding color. A cluster of particles separated along PC1 of (D) that corresponds to the rotated state of the Pf80S ribosome is noted.Additional density maps from these datasets are shown in Extended Data Figure 2 and Supplemental Videos 1 and 2.