Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2021 May 26.
Published in final edited form as: J Chem Inf Model. 2020 Apr 2;60(5):2484–2491. doi: 10.1021/acs.jcim.9b01115

Propagation of Conformational Coordinates Across Angular Space in Mapping the Continuum of States from Cryo-EM Data by Manifold Embedding

Suvrajit Maji 1, Hstau Liao 1, Ali Dashti 3, Ghoncheh Mashayekhi 3, Abbas Ourmazd 3, Joachim Frank 1,2,*
PMCID: PMC7466846  NIHMSID: NIHMS1620239  PMID: 32207941

Abstract

Recent approaches to the study of biological molecules employ manifold learning to single-particle cryo-EM datasets to map the continuum of states of a molecule into a low-dimensional space spanned by eigenvectors, or “conformational coordinates”. This is done separately for each projection direction (PD) on an angular grid. One important step in deriving a consolidated map of occupancies, from which the free energy landscape of the molecule can be derived, is to propagate the conformational coordinates from a given choice of “anchor PD” across the entire angular space. Even when one eigenvector dominates, its sign might invert from one PD to the next. The propagation of the second eigenvector is particularly challenging when eigenvalues of the second and third eigenvector are closely matched, leading to occasional inversions in their ranking as we move across the angular grid. In the absence of a computational approach, this propagation across the angular space has been done thus far “by hand” using visual clues, thus greatly limiting the general use of the technique. In this work we have developed a method that is able to solve the propagation problem computationally, by using op tical flow and a probabilistic graphical model. We demonstrate its utility by selected examples.

Graphical Abstract

graphic file with name nihms-1620239-f0001.jpg

INTRODUCTION

Recent approaches exploit the information contained in large single-particle cryo-EM datasets of a molecular machine to map its continuum of states in thermal equilibrium1, 2. The free energy landscape derived from such a mapping provides a rich source of information to study the molecule’s functional dynamics. A manifold embedding-based technique recently introduced3-7 enables the quantitative study of continuous conformational motions over the energy landscape. Given a projection direction (PD) of interest, cryo-EM molecule images falling into a small angular range forming a "cone" around that PD are considered. This cone is narrow enough, so that the image variability due to changes in orientation is much smaller than that due to conformational and compositional heterogeneity. These images form a cloud of points in the high-dimensional space of pixels and are arranged according to their mutual similarities, reflecting the conformational states occupied by molecules in this view range. This point cloud may be considered as a hypersurface or "manifold,"– a topological space in which a local Euclidean geometry can be defined at any point on the manifold8. "Manifold embedding" 9, 10 maps the unordered data points lying in the high-dimensional space into a low-dimensional manifold representation of the dataset, such that a certain form of geometric relationships between the data points is preserved. In our case3-7, 11, 12, the embedding technique describes a manifold of images containing the information of conformational changes, by means of Euclidean coordinates found via a diagonalization procedure. This low-dimensional description of the manifold is given by a set of eigenfunctions which is generated by operating on a non-linear manifold embedded from the original high-dimensional image space using Diffusion Maps13.

The conformational changes reflected in this manifold can be "decomposed" along each of these coordinates, via the Nonlinear Laplacian Spectral Analysis (NLSA)6,11. The first few (usually less than ten) highest-ranking eigenfunctions, as determined by the spectrum of eigenvalues, are retained, and a subset of these are chosen as conformational coordinates. The number of conformational coordinates, which is based on the eigenspectrum, is related to the manifold type and its intrinsic dimensionality, which in turn reflects the degrees of freedom exercised by the system. The NLSA technique produces a sequence of images, or a movie, showing the conformational changes along any path on the manifold. Next, the low-dimensional representations of the manifolds in different PDs must be related to one another, such that a consolidated map of occupancies describing the continuously varying conformations can be generated. From this consolidated map the free energy landscape of the molecule is subsequently derived through the Boltzmann relationship. One of the main assumptions is that the same conformational spectrum is viewed in all the PDs – in other words, the conformational variability of a molecule is independent of its orientation on the EM grid. Identifying the same conformational motion across the entire angular grid is a difficult optimization problem, but it becomes more tractable when we propagate across the angular grid using the information from a limited number of neighboring PDs. Hence, we aim to determine the correspondence between the conformational coordinates (and their respective conformational movies) of neighboring PDs.

The difficulty in finding the correspondence is that the order (ranking) and the sense of the conformational coordinates in one PD may be different from those in another PD. The former difference is due to the fact the conformational change of a given coordinate is easier to observe at certain viewing angles than at others. The latter difference is due to the sign ambiguity in standard eigen-decomposition solvers14: a movie reverses its directionality or sense when the corresponding coordinate flips its sign. The task of propagation of coordinates is to match coordinates in adjacent (and also, by inference, farther located) PDs, such that they express the same or closely similar motions with matching directionality. A successful outcome of this matching procedure will ensure that we are summing over corresponding conformational occupancies from all PDs, from which the consolidated occupancy map and, ultimately, the energy landscape of the molecule may be obtained.

In this paper we present an approach to automate the propagation of conformational coordinates across all PDs, in contrast to the current manual-selection approach, which entails user inspection of the movies for each PD and visual comparison of movies in adjacent PDs. Our automated method requires the labeling of the movies in only a few PDs (anchors), and then the information is propagated across the remaining PDs. The propagation process is formulated as an optimization problem, where the "closeness" of the conformational changes in the movies is maximized. We use a feature-extraction technique15, 16 to encode the conformational change, and then employ graphical models17 to propagate this information across angular space. The details of the individual techniques are provided in the Methods section.

METHODS

1. Overall approach

The problem we seek to solve is the propagation of the conformational information from a few anchors to all other PDs on the orientation sphere S2, as shown in Figure 1. Our approach is based on exploiting the distinguishing features in a movie of a macromolecular structure undergoing a certain motion. We use optical flow15, 18 to compute the motion vector for a movie. It is a widely used method for computing the approximate motion of image structures using local gradients (Supplementary Text S1). Some of the popular optical flow algorithms are Lucas-Kanade (LK)19, Horn-Shunck (HS)15 and Gunner Farneback (GF)20. The LK method produces local and sparse flow vectors, whereas the HS and GF methods generate global and dense flow vectors, which we use here. Next we use the technique of Histogram of Oriented Gradients16 (HOG) to obtain the characteristic features of the movies. HOG is a popular method in computer vision to detect objects in images. HOG has also been used as a morphological feature shape descriptor for videos with moving objects in conjunction with optical flow21. The HOG feature vector encodes the type of motion by registering in each movie the position, magnitude, and direction of the optical flow vectors. Some variants of this approach have been applied to human motion analysis by computing histogram of optical flow (HOF)22 and oriented histograms of differential optical flow23. To discriminate two movies s and t, we estimate the closeness measure HDst between the two HOG feature vectors (Supplementary Text S2) Hs and Ht, given by the lp- norm of their difference as

HDst=HsHtp,p=1,2 1

Figure 1.

Figure 1.

Propagation of conformational coordinates for the RyR data on the orientation sphere. The orange points represent the projection directions (hemisphere shown here). The fat green point is one of the selected anchor nodes and the fat red points are its neighbors. As a representative example, PD 220 is selected as an anchor node and PDs 219, 221, 172, 173, 272, 273 are its neighbors. One snapshot of the movie corresponding to the first eigenfunction of the anchor node 220 is shown here and the sense of the movie is assigned as 1. The corresponding movies in the six neighboring nodes are selected such that they have the same type of motion as the movie for green node. The movies for the anchor node and some of the neighboring nodes are shown in Movies S1-S5. The sense for the movie in the neighbor node is denoted as 1 if it has the same direction as the anchor node, otherwise it is −1. A more illustrative graphical representation of the propagation is shown in the Supplementary Figure S1.

If the number of states of a node is SK (see Section 2), then the SK × SK matrix of pairwise compatibility measurements between the movies in nodes i & j is given by

(HD)ij={HDsitj}si=1SK,tj=1SK 2

We then set up the optimization problem of selecting the correct movie in each PD in the form of a graphical model17 (Supplementary Text S3), where the PDs are the nodes and the relationship between two nodes is given by the closeness measure (Equation 1). To solve this optimization problem, we have used a message-passing method called belief propagation24-26, which is a type of dynamic programming algorithm typically used to solve inference problems in graphical models. For our work, we will focus on belief propagation (BP) applied to graphs with loops, also known as loopy belief propagation27-29. The belief propagation works by evaluating the information of a node and the relationship with the neighboring nodes, which are provided in the form of node and edge potential functions (Supplementary Text S3), and then iteratively propagate the information throughout the graph (Supplementary Text S3.1.1). We compute the node potentials ϕ and edge potentials ψ as follows:

ϕi(xi)={ea,if node i is an anchoreb,a>b,otherwise} 3
ψij(xi,xj)=e(HD)ij 4

where xi,xj are the states of nodes i and j respectively (Text S3), and (HD)ij is calculated using Equation 1.

After the belief propagation has converged to within a tolerance level, or stopped after maxIter iterations (Supplementary Text S3.1.1), we can obtain the beliefs for each node using Step (v) in Supplementary Text S3.1.1. The beliefs obtained using the sum-product are the marginal probabilities. We then select the state of the nodes with the highest marginal probability estimates. For the max-product algorithm, the beliefs are not marginal probabilities, but the maxima of the beliefs will give us the most likely state configuration and thus approximate the set of maximum a posteriori (MAP) probabilities for all nodes. The BP calculations thus provide us with the optimal states of the nodes for the entire graphical model, given the appropriate node and edge potential values.

2. Formulating the selection of conformational coordinate as an optimization problem

We pose the optimization problem of selecting the conformational coordinates as finding the solution to inference problems of a graphical model. The graph nodes are the projection directions (PDs) and the neighbors of a node are the PDs that are within a certain distance ϵ on the orientation sphere S2. Let minDist be the minimum Euclidean distance between any two nodes on S2, nG the total number of tessellated bins on S2 (orange dots in Figure 1) and numPDs the total number of PDs for a dataset, then the distance threshold ϵ is calculated as

ϵ=min{max(minDist,ϵball),minDist×22} 5

where ϵball = minDist × (nG/numPDs).

The ϵball and ϵ values can be adjusted as necessary. We chose the values such that the number of neighbors for a node is around 10 or less (generally around 6), so that the viewing angle of the immediate neighbors are close to each other and the computational cost is reasonable. The nodes of the graph can assume any of the states state s = 1,…,SK depending on the number of eigenfunctions, K. Now, to convert this graph of PDs into a probabilistic graphical model (Section 3) we denote the state of the nodes with random variables x1,x2,…,XN, where N is the number of nodes (Text S3). In our case SK = 2K, as we select the proper movie out of K candidates, each of which with ‘sense’ equal to either + 1 or − 1. The problem can be better understood from Figure 1, where the green point (node 220) is an anchor node. The red nodes are the immediate neighbors of the anchor node. The first K states represent the K movies in the ‘forward’ direction (sense + 1) and the last K states for the same K movies in the ‘backward’ direction (sense − 1). The task is to determine which one among the 2K movies represents the proper eigenfunction and sense in each PD. The optical flow vectors for the K movies for each PD are computed according to the procedure outlined in Supplementary Text S1, and the pairwise edge measurement values are estimated using the HOG feature distance described in Supplementary Text S2. The corresponding edge potential functions ψij are calculated using Equation 4. The node potential functions ϕi, given by Equation 3, are set to be uniform priors except for the nodes chosen as “anchor PDs”, in which case the node potential values are set with relatively high values. Then we perform the graphical model inference with belief propagation as described in Section 3.1 & Section 3.1.1 of Supplementary Text S3. The iterative propagation of the information starting from the anchor PDs to all other PDs in the graphical model occurs through the immediate neighbors. This ensures that the change in the features between immediate neighbors are small, and subsequently the message passaging between the neighbors are as accurate as possible.

To summarize the essential steps of the ManifoldEM6, 12 approach followed by our propagation method:

1. The first step of ManifoldEM is to create a tessellation of the orientation sphere such that the 2D cryo-EM images are classified into bins known as projection directions (PDs).

2. The images in each PD are aligned and all the pairwise Euclidean distances are calculated for the images.

3. Using the distances, the images in each PD are embedded into a low K-dimensional manifold described by K eigenvectors using Diffusion Maps. The manifold of images contains the information of conformational changes along each of the eigenvectors.

4. The conformational information contained in this manifold is now decomposed and sorted along each of the K eigenvectors in the form of conformational movies, using Nonlinear Laplacian Spectral Analysis. Due to the sign ambiguity between the same eigenvectors in different PDs we have forward and reverse directions, so there are 2K movies to compare in each PD.

5. At this point our propagation method steps in. We now compute the dense optical flow field using the Horn-Schunck method for each movie and then compute the histogram of oriented gradients (HOG) from the optical flow vectors. The HOG feature vector encodes the motion present in the movie.

6. To compare two movies we compute the Euclidean distance between their HOG feature vectors. Thus, to compare all pairwise combination of movies in projection direction i and j we obtain a 2K × 2K HOG feature distance matrix (HDij)

7. We then formulate the conformational coordinate selection process as an optimization problem using a graphical model, defined over the angular grid. The PDs are the nodes of the graph, and two nodes are connected by an edge if they are within a certain distance ϵ.

8. Next, the edge potentials between node i and node j are calculated using the HOG distance matrices (HD)ij. Nodes of the graph can assume any one of the 2K states corresponding to the K forward and K reverse direction movies.

9. The goal is to find a consensus labeling across the entire angular grid using our propagation algorithm by comparing movies in neighboring nodes. We achieve this goal by using belief propagation, which tries to determine the probability (belief) of a node being in a particular state in an iterative manner, given the reference movies in a few PDs called “anchors.” To obtain the best state label we compute the maxima of the beliefs.

RESULTS AND DISCUSSION

We tested our method with three datasets, two experimental cryo-EM datasets, ryanodine receptor (RyR)12, 30 and E. coli ribosome (F.J. Acosta-Reyes, M. Holm, S. Sanyal, J. Frank; to be published elsewhere), which were analyzed with the manifold embedding method6, 12, and one synthetic dataset. The labels of the conformational movies were obtained by visual inspection, which were then compared against the labels obtained from our automated selection. The RyR data predominantly showed a combination of wing motions, and channel opening vs. closing type of motion of the molecule in most PDs (Movie S1 - S5). The total number of PDs for this dataset is 1,117, with 5 movies for each PD, and 9 of those PDs were randomly designated as anchors. For the particular settings of ϵball and ϵ in equation 5, the number of edges in the graph was 2,769. It is evident from the eigenvalue spectrums that there is mainly one dominant eigenfunction in most PDs. We denote the eigenfunctions by YK. Figure S4 shows the eigenvalue spectrum for several PDs, including the anchor PD 220. Movie S1 is the conformational movie for Υ1 of PD 220 and it shows a clear wing motion approximately along the direction of the vertical axis (Figure S5). We will denote this as the vertical wing motion. Movie S2 is the conformational movie for Υ4 of PD 220, and it shows a subtle motion of the outer part of the wings roughly along the direction of the lateral axes (Figure S5). We will refer to this as the lateral wing motion. We chose to propagate the most dominant vertical wing motion (conformational coordinate 1; Movie S1) and the less dominant lateral wing motion (conformational coordinate 2; Movies S2, S5), across all PDs. Both types of motion involve channel opening-closing as seen from top view (e.g. Movie S8) and are not easily distinguishable. At first we computed the optical flow vectors for each movie in every PD using the Matlab function opticalflowHS, where the smoothness parameter was set to 1.5 and the number of iterations for solving the numerical scheme was set to 200. In our application, the movies are first averaged over a block of five frames, and then optical flow vectors are computed between successive pairs of averaged frames. The final optical flow vectors for the entire movie are obtained by adding up those intermediate sets of vectors. The results of the optical flow calculations for the RyR dataset are shown in the first row of Figure 2. The optical flow vectors are shown in blue, and the red ones are the selected vectors with magnitude above the 85th percentile. For HOG feature calculations we used the Matlab function extractHOGFeatures. The parameter values used for the HOG feature calculations are as follows:

CellSize=[4,4],BlockSize=[2,2],BlockOverlap=ceil(BlockSize2),NumBins=9,UseSignedOrientation=1.

Figure 2.

Figure 2.

Optical Flow and HOG feature calculations for the RyR dataset. Column A represents the first eigenfunction of PD 220, column B represents the first eigenfunction of PD 220 with reverse sign, and column C represents the first eigenfunction of PD 219. First row: optical flow vectors for the movies corresponding to the respective eigenfunctions for the PDs. The zoomed-out box shows the optical flow vectors for the region inside the yellow box on the first image in column A. The blue vectors are the optical flow vectors computed using the Horn-Shunck method and the red ones are the selected optical flow vectors with magnitude above the 85th percentile, for the movie. Second row: rose plot visualization of the HOG feature vectors, superimposed on an orientation heat map of the optical flow vectors. Third row: zoomed-in detailed view of the region within the yellow boxes in the second row. We can see that the HOG feature vector plot for column C is more similar to column B than to column A.

The top row of Figure 2 represents the movies for eigenfunction candidate Υ1 of PD 220 in forward direction, PD 219 in forward direction and PD 219 in backward direction, respectively. The second and third row of Figure 2 shows the corresponding HOG feature vectors, which are calculated according to Supplementary Text S2. The HOG feature vectors are visualized using a rose plot and they are overlaid on the orientation heatmap of the flow vectors. It is evident from the HOG rose plots and the orientation heat map that Υ1 of PD 220 in forward direction matches better with Υ1 of PD 219 in backward than in forward direction. Hence, if Υ1 for the anchor PD 220 has sense + 1, then Υ1 of PD 219 has sense − 1, which is shown in Figure 1. The corresponding movies can be seen in the Movies S1 & S3.

We calculated the l2-norm of the HOG feature vector difference according to Equations 1 and 2, which were then used as input to the edge potential function in Equation 4 (Step (i) of Supplementary Text S3.1.1). We implemented the standard loopy belief propagation27, 28 with a damping factor for message updates (Supplementary Text S3.1.1). For the first type of motion, we compared our result with the manual selection, which excluded the assignment of labels to movies for 108 PDs that were corrupted, or where motions of prominent features were occluded. Those unassigned 108 PDs were found to be spread out on the orientation sphere, and were included in the propagation, but not in the accuracy calculations. For the particular choice of optical flow parameters and HOG feature measurement as mentioned above, the sum-product BP produced an accuracy of 95.7% in less than 200 iterations and with a tolerance level of 1 × 10−4 (Text S3.1.1). The max-product BP for the same settings produced an accuracy of 95.6%. We performed a series of 100 trials by randomly sampling 10 anchors and performed the belief propagation for each trial. The accuracy measurements are provided in Table 1 (CC1). We report the mean and standard deviation (SD), and also the median, mean absolute deviation (MAD-mean), and median absolute deviation (MAD-median) as they provide a more robust measure of variability. The accuracy for sum-product and max-product BP remained virtually the same when we ran the BP trials for the first type of motion, with fewer than 10 PDs, even up to 3 or 2 PDs as anchors.

Table 1.

RyR conformational coordinate (CC) propagation accuracy measurements with 100 random trials. CC1 values are for first type and CC2 values are for the second type of motion.

Propagation
Method
Number of
Anchors
Mean (
%)
Median
(%)
SD
(%)
MAD
(Mean) (%)
MAD
(Median) (%)
CC1
Sum-product BP 10 95 96 2 1 < 0.5
Max-product BP 10 95 96 1 < 0.5 < 0.5
 
CC2      Set of 632 PDs from which anchors were drawn
Sum-product BP 15 61 62 5 4 3
30 65 65 3 2 2
 
CC2      Set of 403 remaining PDs from which anchors were drawn
Sum-product BP 15 52 53 6 5 5
30 57 57 5 4 3

For the second motion, we manually created labels for the possible choices of eigenvectors associated with this motion. There were 82 PDs that were unassigned (for the same reason as stated for the first motion) and, for a particular choice of 30 anchor PDs , we obtained an accuracy of 71.5 % with sum-product BP and 70.3 % with max-product BP. Among the 100 trials that we performed for the second motion (Table 1, CC2 ) there were few trials which produced accuracy ≥ 70%, and the above measures are from one such trial. The typical accuracy measurements for about 30 anchors were ~ 65 % (Table 1. CC2). The max-product BP did not converge within 200 iterations under the same settings. From the same set of anchor PDs as above, when we select a subset of 20 and 15 anchors, the accuracy was 67.8 % and 64.7% , respectively, for sum-product. On the other hand, the max-product BP did not converge within 200 iterations and produced an accuracy of only 68.8% and 63.2%, respectively. Most of the errors in the propagation method were in the selection of movies which had orientational artifacts (e.g. Movie S6) and exhibited only partial similarity to the actual motion (e.g. Movie S5). For different combinations of same-size subsets of anchor PDs, we obtained accuracy measurements which were significantly different in some cases (Table 1, CC2). The number and choice of anchor PDs seems to be much more important for propagating the second motion, as it is subtler in most PDs compared to the first type of motion. Therefore, to obtain a sense for the degree of variability in the accuracy measurements for the propagation of the second eigenvector, we performed 3 sets of 100 trials by randomly sampling 15 and 30 PDs as anchors for the second motion. We performed the above experiments separately on two pools of anchors, one with 632 PDs where the second motion is comparatively more prominent, and another set with the remaining 403 PDs, which excluded the 82 unassigned PDs. As expected, the first experiment with a relatively “good” pool of 632 anchors produced better accuracy than the second. We are providing more details regarding the accuracy measurement for the RyR dataset, as an example case for analyzing the performance of the method and also because it has two types conformational motions for propagation. We only report the sum-product BP values in Table 1, CC2. The values for max-product accuracy were generally ~ 2% less than the sum-product values. We should note here again that there were five eigenfunctions, each with sign +1 or −1, so there are a total of ten choices in each PD to be considered as candidates for selection of the conformational coordinate. However, for the selection of CC2 in each PD, we set the node potential value in the BP step to a very low value for the eigenfunction selected as CC1. This step is usually not needed if the second motion is very different from the first type, but it could be useful when the two motions share some similarity in many PDs. This is in fact the case for the two types of RyR motion in many side views (e.g. Movies S5, S7) and all top views (Movie S8). All the measurements for conformational coordinate selections are provided in Table 1.

We compared the 2D occupancy maps (Figure 3) for the RyR dataset by combining the first and second eigenfunctions from all PDs. The occupancy maps (OMs) generated from labels selected manually and by our propagation method, are seen to match closely. To estimate how similar the two resulting occupancy maps are, we computed the relative error with the Frobenius matrix norm31 also called as the normalized root mean squared error (NRMSE):

NRMSE=A^AFAF.100% 6

where A^ is the approximation of the matrix A.

Figure 3.

Figure 3.

Occupancy map for the RyR dataset. Column A is for the manually selected eigenfunctions. Column B is for automatically selected eigenfunctions using our propagation method. Top row shows the occupancy map (OM). We can see that the OM for A and B match closely overall. The characteristic differences in the contours of A and B are primarily due to the differences in the occupancies (computed by ManifoldEM) of the conformational states as present in the second eigenfunctions that were selected from the multiple choices in each PD.

In our case A^ is the occupancy map using labels obtained by our propagation method and A is the occupancy map using the manual labels and the NRMSE value is 9.5 %. Besides the difference in the selection of the eigenfunctions (in this case the second one) from multiple choices in each PD, the finer characteristic variation in the OM contours in Figure 3A and 3B are due to the differences in the computed occupancies (by ManifoldEM) of similar conformational states represented by the different eigenfunctions and therefore not a direct problem of our propagation method.

The time taken for the optical flow calculation and pairwise HOG feature vector calculation for the RyR dataset with movie frame size of 336 × 336 pixels was about 4 hours with 32 parallel jobs. The computer specifications are as follows: 64 processors with speed 1200 MHz with a maximum of 2600 MHz, memory of 250 GB. Down-sampling the images can obviously make the computations faster. The BP step, when it converges, takes between ten and several tens of seconds.

The second example tested was the ribosome dataset, which has 505 PDs with 5 movies for each PD, and 7 of those PDs were designated as anchors. The most dominant motion (Figure S6) for this dataset is the ‘inter-subunit rotation’, also known as small subunit (SSU) ‘ratchet-like motion’ (Movies S9, S10), and very few PDs contained evidence for the small subunit’s ‘rolling motion’ (ref) and ‘head rotation’ (ref). We chose to propagate the inter-subunit rotation motion in this case. For the optical flow calculations (Figure S7) smoothness parameter was 1.5 and the number of iterations was set to 200. For the HOG feature calculations (Figures S9, S10) we used the following parameters: CellSize = [8,8], BiockSize = [4,4], NumBins = 9. There are 11 PDs which had corrupted movies and those were excluded from accuracy calculations. The accuracy of the propagation for this dataset was 98.6% for sum-product and 98.4% for max-product BP for these settings and feature calculations.

In addition, we also tested the method with a simple synthetic dataset of 2D movies (fictitious eigenfunctions) with known labels within a region of 200 PDs of the angular sphere (Figure S8). (We chose not take the route of creating a stack of 2D cryo-EM projection images and applying manifoldEM to obtain eigenfunctions in each PD, because in that case we would have to manually obtain the labels). The dataset was derived from the structure of splicing factor TIA-1 (pdb 2mjn), a protein with two symmetrically placed domains joined by a linker. We morphed one domain into different positions to represent its stepwise movement (Movies S11, S12, S14, S15), creating a total of 21 volumes (“states”). From these volumes, a stack of 21 projections was created for each PD, to simulate the movie associated with fictitious eigenfunction 1 (Movie S11). To simulate the movie along the second eigenfunction, we rotated the first movie by 180°, as if the opposite domain of the protein were moving (Movie S12). To simulate the movie along the third eigenfunction (Movie S13), we added a substantial amount of noise to the first movie, such that we barely observe any change of the structure. Next we reversed the directionality and also shuffled the order of the first two movies in some PDs, specifically every fourth PD starting with the first PD. This mimics the variable order (ranking) and sign ambiguity of eigenfunctions14 encountered in the real situations. In this way we created a test dataset with known ground truth labels. We used two anchor nodes for the propagation. For the optical flow calculations (Figures S9, S10), the smoothness parameter was chosen as 1.5 and the number of iterations was set to 200. For the HOG feature calculations (Figure S9, S10) we used the following parameters: CellSize = [8,8], BlockSize = [4,4], NumBins = 9. The accuracy of the propagation of the first fictitious eigenfunction for the synthetic dataset was 100.0% for sum-product and max-product BP for these settings and feature calculations.

We also experimented with the method using oriented histogram of differential optical flow vectors23 which is typically used for analyzing movies, but the results were not better compared to the procedure we implemented using optical flow followed by HOG. It should be noted here that movies corresponding to some lower-ranked eigenfunction (i.e., with lower-ranked eigenvalue in the spectrum) can show a very similar conformational movie as the higher-ranked eigenfunction1. In such cases, the movies corresponding to the lower-ranked eigenfunction can get selected instead of the higher-ranked one depending on the optical flow & HOG feature values for such movies. In our work, the movies for the PDs that were not optimally selected in the experimental datasets were the ones which either had several corrupted frames, conformational changes were small, or the PD represented a view where feature extraction was difficult.

While demonstrating robust performance for strongly articulated motions, the performance analysis provided above for different datasets also–gives us an idea about the limitations of the proposed propagation method. In general, the propagation method has difficulty in matching neighboring views when they are relatively far apart on the angular grid, or if there are occlusions of moving components in many PDs. In addition, it can perform poorly for motions that are subtle as the noise affects the computation of smooth flow vectors depicting the actual motion. The performance can also be affected by the sensitivity of the discrimination metric used to compare the movies between different PDs.

CONCLUSIONS

In the applications of the ManifoldEM technique until now, the selection of the conformational coordinates across the angular sphere has been performed manually, by inspecting each movie individually, to generate the consolidated maps of occupancy on which the energy landscapes are based6, 12. Therefore, it was imperative to automate the propagation of conformational coordinates, for the manifold embedding workflow to be general-purpose. The method presented thus provides a solution to this long-standing problem, in a relatively fast and efficient manner and with good accuracy. However, the task of propagating the conformational coordinate is challenging for datasets where the distribution of images on S2 has poor orientational coverage (changes between neighboring PDs are not small anymore) and a significant number of PDs have low occupancies, or the conformational changes are subtle, and hence for all such cases the optical flow vectors might not be able to discriminate those changes appropriately against the background of non-relevant pixel motions. For future work, it is worth mentioning that with improved feature extraction techniques, or better feature estimates with different optical flow and HOG features, the loopy belief propagation approach could potentially provide a better solution. Alternatively, one has to implement a fast and memory-efficient implementation of generalized belief propagation32 or junction tree algorithm33 for large graphs with loops as in our case. These generalized variants of BP algorithm have better theoretical convergence performance with a more accurate marginal and MAP probabilities compared to conventional loopy belief propagation.

NOTE ON SOFTWARE DISTRIBUTION

A python software package called ManifoldEM has been developed following the original Matlab code6, 12, which will be released for beta testing. It will be released, in the near future, to the broader academic community to study the conformational dynamics of macromolecular machines using cryo-EM data. The proposed conformational-coordinate propagation method is included as a part of ManifoldEM but also can be downloaded separately from this link https://github.com/suvrajitm/ConformationalCoordPropagation.git

Supplementary Material

Supplementary Material
1
Download video file (1.7MB, avi)
2
Download video file (1.7MB, avi)
3
Download video file (1.8MB, avi)
5
Download video file (1.7MB, avi)
6
Download video file (1.7MB, avi)
8
Download video file (1.9MB, avi)
4
Download video file (4.1MB, avi)
9
Download video file (1.4MB, avi)
10
Download video file (1.4MB, avi)
11
Download video file (643.8KB, avi)
7
Download video file (4.4MB, avi)
12
Download video file (643.8KB, avi)
13
Download video file (643.8KB, avi)
14
Download video file (643.8KB, avi)
16
Download video file (643.8KB, avi)
15
Download video file (643.8KB, avi)

ACKNOWLEDGEMENTS

We would like to thank Francisco Acosta Reyes for providing us with the ribosome dataset. We also thank the reviewers for their helpful comments and suggestions. The work has been supported by NIH grant R01 GM 55440 and R01 GM 29169 (to J.F.)

Footnotes

Supporting Information

The Supporting Information available: Background description of Optical flow, HOG feature extraction, and Probabilistic Graphical Model with inference using Belief Propagation.

The authors declare no competing financial interest.

REFERENCES

  • 1.Amit M; Amit H; Joakim A; Amit S, Cryo-EM reconstruction of continuous heterogeneity by Laplacian spectral volumes. Inverse Problems 2019. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Zhong ED; Bepler T; Davis JH; Berger B, Reconstructing continuously heterogeneous structures from single particle cryo-EM with deep generative models. CoRR 2019, abs/1909.05215. [Google Scholar]
  • 3.Schwander P; Fung R; Phillips GN; Ourmazd A, Mapping the conformations of biological assemblies. New J Phys 2010, 12. [Google Scholar]
  • 4.Schwander P; Fung R; Ourmazd A, Conformations of macromolecules and their complexes from heterogeneous datasets. Philos T R Soc B 2014, 369 (1647). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Ourmazd A, CHAPTER 22 Machine-learning Routes to Dynamics, Thermodynamics and Work Cycles of Biological Nanomachines In X-Ray Free Electron Lasers: Applications in Materials, Chemistry and Biology, The Royal Society of Chemistry: 2017; pp 418–433. [Google Scholar]
  • 6.Dashti A; Schwander P; Langlois R; Fung R; Li W; Hosseinizadeh A; Liao HY; Pallesen J; Sharma G; Stupina VA; Simon AE; Dinman JD; Frank J; Ourmazd A, Trajectories of the ribosome as a Brownian nanomachine. Proc Natl Acad Sci U S A 2014, 111 (49), 17492–7. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Frank J; Ourmazd A, Continuous changes in structure mapped by manifold embedding of single-particle data in cryo-EM. Methods 2016, 100, 61–67. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Riemann B, ‘Über die Hypothesen, welche der Geometrie zugrunde liegen’(1854, published posthumously by Dedekind). Abhandlungen der Königlichen Gesellschaft der Wissenschaften zu Göttingen 1867, 13, 133–152. [Google Scholar]
  • 9.Tenenbaum JB; de Silva V; Langford JC, A global geometric framework for nonlinear dimensionality reduction. Science 2000, 290 (5500), 2319. [DOI] [PubMed] [Google Scholar]
  • 10.Roweis ST; Saul LK, Nonlinear dimensionality reduction by locally linear embedding. Science 2000, 290 (5500), 2323. [DOI] [PubMed] [Google Scholar]
  • 11.Giannakis D; Majda AJ, Nonlinear Laplacian spectral analysis for time series with intermittency and low-frequency variability. P Natl Acad Sci USA 2012, 109 (7), 2222–2227. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Dashti A; Hail DB; Mashayekhi G; Schwander P; Georges A. d.; Frank J; Ourmazd A, Functional Pathways of Biomolecules Retrieved from Single-particle Snapshots. bioRxiv 2018, 291922. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Coifman RR; Lafon S, Diffusion maps. Appl Comput Harmon A 2006, 21 (1), 5–30. [Google Scholar]
  • 14.Bro R; Acar E; Kolda TG, Resolving the sign ambiguity in the singular value decomposition. Journal of Chemometrics 2008, 22 (2), 135–140. [Google Scholar]
  • 15.Horn BKP; Schunck BG, Determining optical flow. Artif Intell 1981, 17 (1), 185–203. [Google Scholar]
  • 16.Dalal N; Triggs B, Histograms of oriented gradients for human detection. 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, Vol 1, Proceedings 2005, 886–893. [Google Scholar]
  • 17.Koller D; Friedman N, Probabilistic Graphical Models: Principles and Techniques - Adaptive Computation and Machine Learning. The MIT Press: 2009; p 1208. [Google Scholar]
  • 18.Beauchemin SS; Barron JL, The computation of optical flow. Acm Comput Surv 1995, 27 (3), 433–467. [Google Scholar]
  • 19.Lucas BD; Kanade T, An iterative image registration technique with an application to stereo vision. In Proceedings of the 7th international joint conference on Artificial intelligence - Volume 2, Morgan Kaufmann Publishers Inc: Vancouver, BC, Canada, 1981; pp 674–679. [Google Scholar]
  • 20.Farnebäck G In Two-Frame Motion Estimation Based on Polynomial Expansion, Berlin, Heidelberg, Springer Berlin Heidelberg: Berlin, Heidelberg, 2003; pp 363–370. [Google Scholar]
  • 21.Hariyono J; Hoang VD; Jo KH, Moving Object Localization Using Optical Flow for Pedestrian Detection from a Moving Vehicle. Sci World J 2014. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Pers J; Sulic V; Kristan M; Perse M; Polanec K; Kovacic S, Histograms of optical flow for efficient representation of body motion. Pattern Recogn Lett 2010, 31 (11), 1369–1376. [Google Scholar]
  • 23.Dalal N; Triggs B; Schmid C, Human detection using oriented histograms of flow and appearance. Computer Vision - Eccv 2006, Pt 2, Proceedings 2006, 3952, 428–441. [Google Scholar]
  • 24.Weiss Y; Pearl J, Belief Propagation. Commun Acm 2010, 53 (10), 94–94. [Google Scholar]
  • 25.Pearl J, Fusion, Propagation, and Structuring in Belief Networks. Artif Intell 1986, 29 (3), 241–288. [Google Scholar]
  • 26.Pearl J, Probabilistic reasoning in intelligent systems: networks of plausible inference. Morgan Kaufmann Publishers Inc.: 1988; p 552. [Google Scholar]
  • 27.Murphy KP; Weiss Y; Jordan MI, Loopy belief propagation for approximate inference: An empirical study. Uncertainty in Artificial Intelligence, Proceedings 1999, 467–475. [Google Scholar]
  • 28.Ihler AT; Fisher JW; Willsky AS, Loopy belief propagation: Convergence and effects of message errors. J Mach Learn Res 2005, 6, 905–936. [Google Scholar]
  • 29.Frey BJ; MacKay DJC, A revolution: belief propagation in graphs with cycles. In Proceedings of the 1997 conference on Advances in neural information processing systems 10, MIT Press: Denver, Colorado, USA, 1998; pp 479–485. [Google Scholar]
  • 30.des Georges A; Clarke OB; Zalk R; Yuan Q; Condon KJ; Grassucci RA; Hendrickson WA; Marks AR; Frank J, Structural Basis for Gating and Activation of RyR1. Cell 2016, 167 (1), 145–157.e17. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 31.Golub GH; Van Loan CF, Matrix computations. Third edition. ed.; Johns Hopkins University Press: Baltimore, Md., 1996; p xxvii, 694 pages. [Google Scholar]
  • 32.Yedidia JS; Freeman WT; Weiss Y, Generalized belief propagation. Adv Neur In 2001, 13, 689–695. [Google Scholar]
  • 33.Shafer GR; Shenoy PP, Probability propagation. Annals of Mathematics and Artificial Intelligence 1990, 2 (1), 327–351. [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Supplementary Material
1
Download video file (1.7MB, avi)
2
Download video file (1.7MB, avi)
3
Download video file (1.8MB, avi)
5
Download video file (1.7MB, avi)
6
Download video file (1.7MB, avi)
8
Download video file (1.9MB, avi)
4
Download video file (4.1MB, avi)
9
Download video file (1.4MB, avi)
10
Download video file (1.4MB, avi)
11
Download video file (643.8KB, avi)
7
Download video file (4.4MB, avi)
12
Download video file (643.8KB, avi)
13
Download video file (643.8KB, avi)
14
Download video file (643.8KB, avi)
16
Download video file (643.8KB, avi)
15
Download video file (643.8KB, avi)

RESOURCES