원시데이터 수집 시스템
선정목록으로

EMDA: A Python package for Electron Microscopy Data Analysis

관련 수소연료전지 · (6) PEM(고분자전해질막)

기본 정보

저자
  1. Rangana Warshamanage — Structural Studies, MRC Laboratory of Molecular Biology, Francis Crick Avenue, Cambridge CB2 0QH, United Kingdom. Electronic address: ranganaw@mrc-lmb.cam.ac.uk|||Structural Studies, MRC Laboratory of Molecular Biology, Francis Crick Avenue, Cambridge CB2 0QH, United Kingdom
  2. Keitaro Yamashita — Structural Studies, MRC Laboratory of Molecular Biology, Francis Crick Avenue, Cambridge CB2 0QH, United Kingdom
  3. Garib N. Murshudov — Structural Studies, MRC Laboratory of Molecular Biology, Francis Crick Avenue, Cambridge CB2 0QH, United Kingdom. Electronic address: garib@mrc-lmb.cam.ac.uk|||Structural Studies, MRC Laboratory of Molecular Biology, Francis Crick Avenue, Cambridge CB2 0QH, United Kingdom
DOI
10.1016/j.jsb.2021.107826
저널
Journal of Structural Biology
발행년도
2021
발행기관
Elsevier BV
피인용수
33
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1016/j.jsb.2021.107826
토픽
Electron and X-Ray Spectroscopy Techniques
OpenAlex ID
W4220828523

평가 내용

관련도
관련
사업분야
수소연료전지 · (6) PEM(고분자전해질막)
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '수소연료전지 > PEM(고분자전해질막)' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

An open-source Python library EMDA for cryo-EM map and model manipulation is presented with a specific focus on validation. The use of several functionalities in the library is presented through several examples. The utility of local correlation as a metric for identifying map-model differences and unmodeled regions in maps, and how it is used as a metric of map-model validation is demonstrated. The mapping of local correlation to individual atoms, and its use to draw insights on local signal variations are discussed. EMDA's likelihood-based map overlay is demonstrated by carrying out a superposition of two domains in two related structures. The overlay is carried out first to bring both maps into the same coordinate frame and then to estimate the relative movement of domains. Finally, the map magnification refinement in EMDA is presented with an example to highlight the importance of adjusting the map magnification in structural comparison studies.

본문 81,845자

본문 펼치기
# EMDA: A Python package for Electron Microscopy Data Analysis Rangana Warshamanage <sup>*</sup> , Keitaro Yamashita & Garib N. Murshudov <sup>*</sup> Structural Studies, MRC Laboratory of Molecular Biology, Francis Crick Avenue, Cambridge CB2 0QH, England - To whom correspondence may be addressed: ranganaw@mrc-lmb.cam.ac.uk, garib@mrclmb.cam.ac.uk # Abstract An open-source Python library EMDA for cryo-EM map and model manipulation is presented with a specific focus on validation. The use of several functionalities in the library is presented through several examples. The utility of local correlation as a metric for identifying map-model differences and unmodeled regions in maps, and how it is used as a metric of map-model validation is demonstrated. The mapping of local correlation to individual atoms, and its use to draw insights on local signal variations are discussed. EMDA’s likelihood-based map overlay is demonstrated by carrying out a superposition of two domains in two related structures. The overlay is carried out first to bring both maps into the same coordinate frame and then to estimate the relative movement of domains. Finally, the map magnification refinement in EMDA is presented with an example to highlight the importance of adjusting the map magnification in structural comparison studies. # Keywords Cryo-EM; EMDA; Local correlation; Likelihood; Magnification; Overlay # 1. Introduction 1 Single-particle cryo-electron microscopy (cryo-EM) has become an increasingly popular structure determination tool among structural biologists (Faruqi and McMullan, 2011; Kühlbrandt, 2014; Lyumkis, 2019; Lyumkis et al., 2013; Scheres, 2014). The technique has evolved at an unprecedented speed in the past few years as shown by the rapid growth of cryo-EM structure depositions into the Electron Microscopy Data Bank – EMDB (Lawson et al., 2020). As the number of depositions into EMDB increases, it is important to maintain quality standards for both maps and atomic models not only to ensure their reliability, but also to prevent accumulation of errors. The EM validation task force 2010 (Henderson et al., 2012) has recognized the critical need of validation standards to assess the quality of EM maps, models and their fits. The task force’s recommendations for map validation included the tilt-pair experiments for the absolute hand determination (Rosenthal and Henderson, 2003), the raw image to 3D structure projection matching for validating reconstruction accuracy and the data coverage (Orlova et al., 1996; Tang et al., 2007), statistical tests using map variances for assessing the map quality and interpretability (Ménétret et al., 2007; Penczek et al., 2006), resolution estimation through Fourier Shell Correlation (FSC) using fully independent half data sets (Scheres and Chen, 2012), visual assessment of map features to the claimed resolution, and the identification and validation of the map symmetry where applicable (Reboul et al., 2020). The task force has identified the model validation in cryo-EM as an area for further research, mainly due to the fact that, at the time, there were few high resolution cryo-EM structures. Thus, the recommendations for model validation included, among others, the assessment of subunits and their interfaces according to the guidelines proposed by the PDB (Read et al., 2011), the assessment of agreement between the model and the map utilizing chemical measures such as chemical properties and atomic interactions and their clashes as employed in EMFIT program (Rossmann, 2000; Rossmann et al., 2001) or statistical measures such as correlation coefficient. Since the first meeting in 2010, the field has grown by accumulating many methods and tools to address the issue of map validation. Examples include the gold standard FSC to monitor the map overfitting into noise during reconstruction (Rosenthal and Henderson, 2003; Scheres and Chen, 2012), tilt-pair validation to assess the accuracy of initial angle assignment (Wasilewski and Rosenthal, 2014) and the false discovery maps for visual assessment of map features (Beckers et al., 2019). The progress in atomic model building, refinement and validation has also been substantial. Resolution in cryo-EM reconstructions vary widely, however the progress made in the field of atomic model building encapsulates modelling tools for low, medium to high resolution. Examples include Chimera (Pettersen et al., 2004), DockEM (Roseman, 2000), FlexEM (Topf et al., 2008), COOT(Brown et al., 2015), DireX (Wang and Schröder, 2012), MDFF (Trabuco et al., 2009), Cryo-Fit (Kim et al., 2019), Rosetta (Wang et al., 2016), MDeNM-EMfit (Costa et 2 al., 2020). The atomic model refinement has also gained a significant progress. Unlike in crystallography, cryo-EM maps contain both amplitudes and phases and the atomic model refinement programs can use a phased likelihood target function as employed in REFMAC5 (Murshudov, 2016; Nicholls et al., 2018) or real space target functions as used in phenix.real_space_refine (Afonine et al., 2018a), ISOLDE (Croll, 2018) and COOT (Brown et al., 2015). There has also been a considerable progress in map and model validation. Examples include various metrics for map-model fit validation (Afonine et al., 2018b; Barad et al., 2015; Brown et al., 2015; Pintilie et al., 2020; Ramírez-Aportela et al., 2021), and chemistry and geometry based tools for model validation (Emsley et al., 2010; Prisant et al., 2020). The EM practitioners can access these methods and tools as parts of stand-alone packages, separate tools in collaborative projects such as CCP-EM (Burnley et al., 2017), or as web based tools such as EMDB validation server (https://www.ebi.ac.uk/pdbe/emdb/validation/fsc/), Molprobity server (http://molprobity.biochem.duke.edu/) etc. Developing better validation methods and tools in cryo-EM is an active area of research because the goal of validation in cryo-EM is a changing target (Lawson et al., 2020). The metrics for validation should evolve as the field progresses towards the atomic resolution because the methods that are applicable to low and medium resolution may not be equally applicable to atomic resolution data and derived models. In this paper we present Electron Microscopy Data Analytical toolkit (EMDA) - a new Python package for post reconstruction/atomic model refinement analysis and validation of cryoEM maps and models. EMDA is a portable Python package with a command line and an Application Programming Interface (API) for Python programmers. While EMDA contains several useful functionalities for cryo-EM map and model manipulation, we describe only three of them in detail in this paper. The local correlation in real space is a metric for detecting the map signal and evaluating the degree of local agreement between an atomic model and a cryo-EM map. We describe the mathematics relevant to correlation calculation in section 3.1. Section 4.1 includes examples demonstrating various uses of local correlation. Map superposition is an important operation in cryo-EM. In structure comparison studies, it brings all maps into a common coordinate frame for comparison. In the difference and average map calculations, the superposition is an essential first step to align the input maps. The available tools for superposing maps include Chimera’s Fit-in-map (Pettersen et al., 2004), TEMPy2 (Cragnolini et al., 2021). EMDA map overlay is based on the maximisation of the likelihood function described in section 3.2. An example demonstrating the overlay is given in section 4.2. Magnification of an EM map is related to the microscope optics on which the data has been collected. During merging of several data sets collected on different microscopes or on the same microscopy with different optical alignments, their magnifications may need to be adjusted to a reference (Wilkinson et al., 2019). The reference can be another map whose accurate pixel size is already known or an atomic model derived independently of the map 3 whose magnification is sought. The use of EMDA for map magnification correction is demonstrated in section 4.3. The rest of the paper is organised into three sections. The first section covers the design and the infrastructure of EMDA with an introduction to the EMDA command line and Application Programming Interface (API). The second section describes the mathematical framework of EMDA behind those three functionalities. In the third section, we demonstrate each functionality by examples. Lastly, the conclusions and outlook followed by information about the package availability are given. # 2. EMDA architecture EMDA is written primarily in Python using Numpy (Harris et al., 2020), Scipy (Virtanen et al., 2020) and Matplotlib (Hunter, 2007), however, numerically intensive tasks are written in Fortran. F2PY (Peterson, 2009) mediates the communication between Python and Fortran. This combination allows us to integrate powerful numerical calculations with abstraction features in Python. EMDA code is organized into three layers as shown in Fig. 1. The innermost layer (Layer 3) consists of core and extension modules. The core modules provide basic services such as read & write, format conversion, resampling, binning etc. All higher-level functionalities such as rigid-body fitting, magnification refinement, difference map calculations are provided through extensions. The extension modules use the basic services provided by the core modules. Both core and extension modules are wrapped into another module to form the EMDA API (Layer 2). API abstracts the underlying complexity of the code into methods and objects providing a simplified mechanism for other developers to gain advantage of EMDA infrastructure. EMDA-API functions are further wrapped to form the EMDA command-line-interface (Layer 1). The users can access the underlying functionalities through the command line. Each functionality is callable with a keyword followed by a set of arguments. A list of up-to-date functionalities with their arguments are given in https://emda.readthedocs.io. In addition, a tutorial describing the presented examples in this paper can be found in https://www2.mrc-lmb.cam.ac.uk/groups/murshudov/. EMDA uses open-source, standalone Python library _mrcfile_ (Burnley et al., 2017) for the reading, writing and validating EM files in the standard MRC2014 format (Cheng et al., 2015). Also, EMDA uses _gemmi_ (https://gemmi.readthedocs.io) for reading and writing atomic coordinate files, and ProSHADE (Nicholls et al., 2018; Tykac, 2018) for symmetry detection in EM maps. 4 Fig. 1. Architecture of EMDA library. The three Python code layers are shown in blue and the layer of external libraries is shown in green. The black arrows show the data flow and the functional dependencies. # 3. Methods In this section we outline the mathematical framework for local correlation and probabilitybased methods in EMDA. The notations we use throughout this text and in the appendices are summarised in Table 1. Table 1: Table of notation <u>Notation</u> <u>Description</u> fullmap Map obtained by averaging half data <u>reconstructed maps</u> ???(?, ?) Covariance between random variables _X_ <u>and</u> _<u>Y</u>_ ???(?) <u>Variance of the random variable X</u> ? and ? 3D column vectors in real and Fourier <u>space</u> ?(?) <u>Convolution kernel</u> ?/(?) <u>Cryo-EM map number</u> _<u>i</u>_ ???/,0(?/(?)) Local variance of ?/(?) calculated with the <u>kernel ?(?)</u> ???12,0(?1(?)?2(?)) Local covariance between ?1(?) and ?2(?) <u>calculated with the kernel ?(?)</u> <u>???12,0(?1(?)?2(?))</u> Local correlation coefficient calculated ??12,0(?) = 5???1,06?1(?)7???2,0(?2(?)) between ?1(?) and ?2(?) with the kernel <u>?(?)</u> ??89:;,0(?) Local correlation calculated between <u>halfmaps</u> 5 <u>2??89:;,0(?)</u> Local correlation in the fullmap (Rosenthal ??;<::,0(?) = 1 + ??89:;,0(?) <u>and Henderson, 2003)</u> ??09@,0ABC:,0(?) Local correlation calculated between the <u>fullmap and the atomic model-based map</u> ?2 E?A,G; ?G?J,G, <sup><u>1</u></sup> <u>2</u> <u>1</u> <sup><u>1</u></sup> <u>2</u> <sup>?L,G</sup> 2 M = ??L,G2 ~~P~~ <u>2</u> <sup>?</sup> QRS,TPUTRV,TQ <sup><u>W</u></sup> map. Since there is no correlation between real and imaginary parts, a single variance is used to <u>describe this distribution.</u> ~~W~~ Two-dimensional Gaussian distribution XY,T ~~W~~ with mean ?G?J,G and variance <u>1</u> <u>12</u> <sup>?L,G</sup> 2 of _j_ th ?2Z E??; ???, <sup><u>1</u></sup> <u>2</u> <sup><u>1</u></sup> <u>2</u> <sup>?M</sup> 2 _N_ dimensional Gaussian distribution with <u>1</u> <u>1</u> 2 <sup>?. Since there</sup> <u>1</u> = ? <sup><u>Z</u></sup> det (?) <sup>?P(??P???)d?ef(??P???)∗</sup> mean ??J and covariance = is no correlation between real and ? <sup><u>Z</u></sup> det (?) <sup>?P(??P???)d?ef(??P???)∗</sup> imaginary parts _NxN_ covariance matrix is used to describe the 2 _N_ dimensional <u>random variable</u> <sup>*</sup> <u>.</u> ??(?) = (?A,1(?), ?A,2(?), … ., ?A,Z(?)) A column vector formed by complex <u>Fourier coefficients of observed maps</u> ??(?) = (?J,1(?), ?J,2(?), … ., ?J,Z (?)) A column vector formed by complex Fourier coefficients of unknown “true” <u>maps</u> ??(?) = (?k,1(?), ?k,2(?), … ., ?k,Z (?)) A column vector formed by complex <u>Fourier coefficients calculated from models</u> ??(?) = (?A,1(?), ?A,2(?), … ., ?A,Z (?)) A column vector formed by normalized complex Fourier coefficients of observed <u>maps</u> ?A,G(?) = <u>?A,G(?)</u> Normalized complex Fourier coefficients of _j_ <sup>th</sup> map. 5ΣA,o,GG(?) + ?G2(?) ?G ??? ?G Transformation matrix and translational vector in 3D to be applied for the map <u>number ?</u> ?(??)? <sup>2vwxd?</sup> <sup>2vwxd?</sup> _N_ dimensional column vector of complex ?)? <sup>2vwodJf</sup>, …, ?Z(?Z?)? <sup>2vwodJy</sup> ) Fourier coefficients after application of transformation. Usually, but not necessarily, (?1 = ?, ?1 = 0) is the identity <u>transformation.</u> ?= ????(?1, . ., ?Z) Diagonal matrix formed by scale factors between the true and calculated Fourier <u>coefficients</u> ?= ????(?1, …, ?Z ) Diagonal matrix formed by blurring <u>parameters</u> = (?1(?1?)? <sup>2vwodJf</sup>, …, ?Z(?Z?)? <sup>2vwodJy</sup> ) 6 ? ?× ? covariance matrix of “true” maps <u>without blurring</u> ?A,o = ? <sup><u>‚</u></sup> ??= ??? ?× ? covariance matrix of signals <u>calculated using observed maps</u> ? <sup><u>2</u></sup> = ????(?A,12, ?A,22, …, ?A,Z 2 ) Diagonal matrix formed by variances of <u>observational noise</u> < ?J >= (< ??,1 >, < ??,2 >, …., < ??,? <u>>)</u> A column vector formed by the expectation <u>values of the true maps</u> ???= 2???89:;/(1 + ???89:;) FSC in the fullmap converted from halfmap <u>FSC (Rosenthal and Henderson, 2003)</u> <u>ˆ???</u> = ????6ˆ???1, <u>ˆ???2, … ., ˆ???Z</u> 7 Diagonal matrix formed by square root of fullmap FSC values. It is also an estimate for FSC between fullmap and “true” signal <u>(Rosenthal and Henderson, 2003)</u> ?o ?× ? correlation matrix between true maps ?o,/G = <u>Σ/G</u> <u>ˆ</u> <sup><u>Σ</u></sup> // <sup><u>Σ</u></sup> GG Correlation coefficient between true maps _i_ and _j_ . An element in ?o. ?A,/G = ?A ?× ? correlation matrix between observed <u>maps</u> <u>ΣA,o,/G</u> Correlation coefficient between observed maps _i_ and _j_ . An element in ?A. 5(ΣA,o,// + ?/2)(ΣA,o,GG + ?G2) - It should be noted that the covariance matrix is ?⨂?2, i.e. Kronecker product of _N_ x _N_ covariance and 2-dimensional identity matrices. The reason of such covariance matrix structure is that there are not correlations between real and imaginary parts of Fourier coefficients and the variance of real and imaginary parts of each Fourier coefficient are equal to each other. # 3.1. Local correlation in real space Pearson’s product-moment sample correlation coefficient (CC) has been extensively used for various purposes in X-ray crystallography (Karplus and Diederichs, 2012; Tickle, 2012) and in cryo-EM (Van Heel, 1987). The CC depends on the signal and noise levels. If we assume that the noise variance is constant within the masked map then for a given data the CC will be an indicator of the signal in the data. Care should be exercised in its interpretation as any systematic behaviour will be considered as signal. Since the CC is calculated using the data, its variance depends on the volume of the data being used. Local CC in real space can be calculated using the formula for the weighted Pearson’s product moment sample correlation coefficient with weights equal to the kernel. The local CC for two maps ?1(?) and ?2(?) is: 7 ??12,0(?) = kA•fW,•(?1(?),?2(?)) (1). 5•9‘f,•6’f(“)7•9‘W,•(’W(“)) ???12,0 ”?1(?), ?2(?)• and ???/,06?/(?)7 are the local covariance and variances for ?1(?) and ?2(?) calculated with a kernel ?(?). The kernel is normalized such that ∫ ?(?)??= 1. - <sup>˜</sup> The expression for local covariance is, ???12,0(?1(?), ?2(?)) = ∫— <sup>˜</sup> ?(?−?) ?1(?)?2(?)??− ∫— <sup>˜</sup> ?(?−?) ?1(?)??∫— <sup>˜</sup> ?(?− ?) ?2(?)?? (2) Similar expressions can be written for local variances ???/,0(??(?)). Note that the eq. 2 can be readily evaluated using the convolution theorem (see Appendix A). Such correlations could be calculated for any pairs of maps. When it is calculated using half maps (??89:;,0(?)) reconstructed from randomly chosen half of the particles, then it indicates the local signal to noise ratio, whereas the local correlation between observed and calculated maps (??09@,0ABC:,0(?)) indicates local agreement between atomic model and observed map. Similarly, the local correlation between two different observed maps indicates local common signals between them. The correlation calculated using half maps is converted to that of fullmap using the following formula (Rosenthal and Henderson, 2003) ??;<::,0(?) = 2››œ•žŸ,•(“) 1 ››œ•žŸ,•(“) <sup>(3).</sup> In the local correlation calculation, EMDA uses a spherically symmetric kernel defined as: ~~-~~, ?¨ < |?| < ?1 0, ??ℎ?????? ?(?) = ?(?) = <u>1</u> ⎧⎪ ? <sup>,</sup> |?| ≤?¨ ~~⎨~~ ⎪ ⎩ <u>2?1</u> <sup>(1 + cos ¬?(|</sup> <u>?1</u> <sup><u>?</u></sup> <u>−?</u> <sup>| −?</sup> ¨ <sup><u>¨)</u></sup> Where ?¨ and ?1 are the radii of inner and outer concentric spheres. ? is the coefficient that makes sure that the total integral of ?(?) is equal to 1. The size of the kernel (i.e. ?1) should be chosen such that the number of data points included is sufficient to calculate a reliable statistic. Both too small or too large kernels lead to inaccurate correlations due to insufficient data points or loss of locality, respectively. In the current implementation of EMDA, ?1 should be chosen by trial-and-error. Both ?¨ and ?1 are in pixel unit and by default 2 pixels are used to soften the edge of the mask, in other words ?1 = ?¨ + 2. The ??;<::,0(?) (hereafter ??;<::) depends on the local signal strength. It has two implications: 1) it depends on the local variation of the signal, and hence different parts of the map with different mobilities will have differing correlations; 2) it will depend on global 8 sharpening/blurring parameters, i.e. maps sharpened with different B values will have different local ??;<::. It should also be noted that the ??09@,0ABC:,0(?) (hereafter ??09@,0ABC:) calculated between an atomic model and a given map (fullmap) depends on atomic coordinates, occupancies and B values. Therefore, to obtain the best possible ??09@,0ABC: it should be calculated using a refined model with optimized atomic B values. In order to compare ??09@,0ABC: with ??;<:: all maps should be weighted appropriately. To achieve this, Fourier coefficients of all maps are normalized and weighted by FSC in resolution bins. All correlation examples discussed in this paper used such normalized and weighted maps. The details are in Appendix D. Let us assume that errors in the observations are additive and they follow a Gaussian distribution with zero mean. Also, assume that there is no correlation between the noise and the calculated map from the atomic model. This is true only when there’s no overfitting. Under these assumptions, a relationship between ??09@,0ABC: and ??;<:: useful for validation is given by eq. 4. The full derivation of eq. 4 is given in Appendix A as well as in (Nicholls et al., 2018). ??09@,0ABC:,0(?) = ??J‘<C09@,0ABC:,0(?)ˆ??;<::,0(?) (4) According to eq. 4, the ??09@,0ABC:(?) is equal to ˆ??;<::,0(?) only when ??J‘<C09@,0ABC:,0(?) = 1, i.e. perfect model. Since this situation is almost never realised, the ??09@,0ABC:,0(?) should always be less than ˆ??;<::,0(?). If ??09@,0ABC:,0(?) is greater than ˆ??;<::,0(?), that could be an indication of overfitting. # 3.2. Parameter estimation and map calculation: likelihood and posterior distribution As in any application of Bayesian computations to the data analysis we need two probability distributions: 1) probability distribution of observations given parameters to be estimated – likelihood function and 2) probability distribution of unknown signal given observations and current model parameters – posterior probability distribution. The details are given in Appendix C. _Likelihood function_ The negative log likelihood function in the absence of atomic models and in the presence of multiple related maps is (see Appendix C for details): ??6??: ?, ?, ?A,o7 = ∑(6?o A(??)? <sup>2vwod?</sup> 7³6?´,x + ?27P1(?A(??)∗?P2vwod?) + log6???6?o,s + ? <sup>2</sup> 77 (5) ??6??: ?, ?, ?A,o7 = ∑(6?o A(??)? <sup>2vwod?</sup> 7 ³6?´,x + ?27 9 Where ??(?) is a vector of Fourier coefficients of the observed maps, ? and ? are the vectors formed by rotation and translation parameters for each map, respectively, ?´,x is the covariance matrix between “true” maps calculated using observed maps and ? <sup>2</sup> is a diagonal matrix of noise variances. In EMDA, the above likelihood function is implemented to estimate parameters between a pair of maps where one map is static the other moves onto it. In the case of estimation of transformation parameters, the only terms that depend on adjustable parameters are the cross-terms in the eq. 5: ∑o,/¸G ?/,G?A,/( ?/?)?A,G∗ 6?G?7?2vwo <sup>d</sup> (J¹PJT). ?A,/ and ?A,G are the Fourier transforms of _i_ <sup>th</sup> and _j_ <sup>th</sup> maps, ?G and ?G are the rotation and translation parameters. ?/,G is related to the corresponding term in the inverse of the covariance matrix and is related to FSC between maps. For parameter estimation ?´,x and ? <sup>2</sup> do not need to be estimated separately, their sum is used in eq . 5. Note that if we relax the conditions that ? is a rotation matrix, the same formula also allows refining the magnification parameters. In cryo-EM, we assume that the magnification is a scalar parameter and ? becomes a diagonal matrix with the same magnification parameter in magnification-only-refinements. The covariance matrices and transformation parameters are estimated iteratively. The algorithm in EMDA for transformation estimation includes following steps. 1) starting with initial rotation and translation parameters the covariances are calculated and converted them into weights to calculate the functional value. 2) the derivatives of translation and rotation are calculated and the shifts are estimated. 3) the current translation and rotation are updated and applied on maps. The covariances are recalculated and the new functional value is evaluated. 5) the new functional value is compared with that of the previous iteration, and if the convergence criterion is met the final maps are output and the transformation is retained. Otherwise, the process continues at step 2 with the next cycle of iteration. _Posterior distribution_ : For map calculations we need the probability distribution of the unobserved “true” maps given the current state of atomic models as well as observations. In the absence of atomic models this distribution is a multivariate Gaussian with mean (see Appendix C for details): < ?J - = ? <sup>P1</sup> ?A,o6?A,o + ? <sup>2</sup> 7P1?P2?A (6) where ? is the diagonal matrix formed by the blurring parameters, ? <sup>2</sup> is the diagonal matrix formed with the variance of the noise in the observations, ?A,o is the covariance matrix between “true” maps calculated using observed maps, ?A is a vector of Fourier coefficients of observed maps, < ?J - is a vector of expectation values of the “true” map Fourier coefficients. 10 Since ? is unknown, we replace it with the standard deviation of the signal as explained in (Yamashita et al., 2021). After some algebraic manipulation we get (see Appendix C): < ?J - = ?o <u>ˆ??? ?A</u> <sup>P1</sup> ?A (7) where ?o is the correlation matrix between Fourier coefficients of “true” maps, ?A is the correlation matrix between Fourier coefficients of observed maps, ?A is a vector of normalised Fourier coefficients of observed maps and < ?J - is a vector of the expectation values of the normalised Fourier coefficients of the “true” maps. Note that if we know the blurring factor, it might be better to use them in the map calculation. However, observations alone do not allow us to calculate these quantities, and they need to be estimated using different methods. # 4. Results and Discussion In this section, we demonstrate the use of local correlation, map overlay and magnification refinement implemented in EMDA package through examples. # 4.1. Examples of use of local correlation 4.1.1. Model-map differences by local correlation To demonstrate the use of local correlation to detect model-map differences, we used archaeal 20S proteasome (EMD-5623) map with overall resolution 3.3 Å and the corresponding atomic model 3j9i (Li et al., 2013). The atomic model was refined against the fullmap to a resolution of 3.3 Å using REFMAC5 (Nicholls et al., 2018). Using the refined model, an EM map to 3.3 A was computed in EMDA using _gemmi_ (https://gemmi.readthedocs.io). Local correlations were calculated within a kernel of radius _r1_ =4 pixels (pixel size = 1.22 Å). The ??;<:: was calculated using the normalized and weighted halfmaps (see Appendix A). Similarly, the ??09@,0ABC: was calculated between the normalized and weighted fullmap and the normalized and weighted calculated map. Fig. 2a shows the primary map density near residues Lys52-Val54 of chain U of the 3j9i model coloured by the ˆ??;<:: and the superimposed model. One can appreciate a moderate signal, but the model is outside the density. The same density coloured by ??09@,0ABC: (Fig. 2b) shows a low correlation resulting from the misplaced model. Fig. 2c shows the corresponding part of the refined atomic model coloured by ??09@,0ABC: and it also highlights those residues with low correlation. Thus, ??09@,0ABC: can highlight areas with map-model discrepancies, while ˆ??;<:: can be used to validate the existence of a signal. A comparison of ??09@,0ABC: versus ˆ??;<:: is useful not only to pinpoint map-model differences, but also to identify viable ways to minimise them. Moreover, colouring the atomic coordinates by ??09@,0ABC: is an effective way to identify misplaced regions in the model. 11 Fig. 2. Identifying model-map discrepancies by local correlation. a) EMD-5623 primary map density near residues Lys52-Val54 of chain U of the 3j9i model coloured by ˆ??;<::. b) the same density coloured by ??09@,0ABC:. c) corresponding atomic model coloured by ??09@,0ABC: showing low correlation residues Lys52-Val54 of chain U. The figure was made with ChimeraX (Pettersen et al., 2021). 4.1.2. Unmodeled regions by local correlation Next, we used SARS-CoV-2 spike protein structure EMD-11203 and the corresponding model 6zge (Wrobel et al., 2020) to demonstrate the use of local correlation to highlight an unmodeled density. This density has been modelled as linoleic acid (LA) in the homology model 6z5d (Toelzer et al., 2020). First, we present the use of ˆ??;<:: and ??09@,0ABC: to identify the unmodeled density in the map. Then, we compare those local correlations against the local correlation calculated from the model with the ligand. Using the normalized and weighted EMD-11203 halfmaps the ??;<:: was calculated within a kernel of radius _r1_ =3 pixels (pixel size = 1.087 Å). The size of the kernel was chosen to maximize the variation of local correlation and minimize the leakage of correlation from the surrounding (a comparison of correlations calculated using different kernel sizes is given in Supplementary materials). The model 6zge was refined against the EMD-11203 fullmap using REFMAC5 (Nicholls et al., 2018) to optimise atomic coordinates and the B values. Using the refined model an EM map was computed to 2.6 Å in EMDA using _gemmi_ (https://gemmi.readthedocs.io). The ??09@,0ABC: was calculated using the normalized and weighted EMD-11203 fullmap and the normalized and weighted model-based map. EMD 11203 primary map was coloured byˆ??;<:: and ??09@,0ABC:, and their comparison highlighted an unmodeled structured densities located near all receptor binding domains. One such density coloured byˆ??;<:: and ??09@,0ABC: are shown in Fig. 3a and 3b, respectively. The high ˆ??;<:: implies the density is real, but low ??09@,0ABC: implies there is no corresponding model. Next, the homology model 6zb5 with LA was fitted on the EMD11203 fullmap and refined using REFMAC5 (Nicholls et al., 2018), and the ??09@,0ABC: was recalculated. The improved ??09@,0ABC: for the ligand region is shown in Fig. 3c and this improvement is due to the presence of LA in the model. 12 Fig. 3d shows the refined LA molecule whose atoms are coloured according to the atomic B values. The overall trend shows that B values in the hydrophobic tail are relatively small, but they gradually increase towards the hydrophilic carboxyl group. In Fig. 3e, atomic ˆ??;<:: and ??09@,0ABC: are plotted in blue and orange, respectively, along with the atomic B values in grey. The atomic correlation values were obtained from correlation maps by interpolating at atomic positions. The ˆ??;<:: is close to 1 throughout the molecule, but largest variation is seen in the carboxyl group. The ??09@,0ABC: is lower than the ˆ??;<:: in all atoms, and its variation is larger than that of ˆ??;<::. The difference in atomic ??09@,0ABC: for carbonyl O1 and O2 is significant despite their similar B values. The carbonyl group is anchored by the neighbouring Arg408 and Gln409 residues through H-bonding with O2 atom (Toelzer et al., 2020, Fig. 3c), but O1 atom does not seem to have close neighbours thus its atomic correlation may be compromised by the surrounding noise. It should also be noted that at some atoms there is a leakage of correlation. This effect is pronounced at atoms O2, C10, C14 and C18 in Fig. 3b. 13 Fig. 3. Use of local correlation to identify unmodeled linoleic acid (LA) in EMD-11203 map. a) unmodeled ligand density in the primary map coloured by the ˆ??;<::. High correlation indicates the presence of a strong signal. b) the same density coloured by ??09@,0ABC: calculated between the fullmap and the refined 6zge model using normalized and weighted densities. The correlation in this region is low compared to its surrounding. c) ligand density 14 coloured by ??09@,0ABC: calculated between the fullmap and the refined model with LA using normalized and weighted densities. Densities in a, b and c panels were contoured at the same level. Those figures were made with Chimera (Pettersen et al., 2004). d) distribution of atomic B values of refined LA where the atoms are coloured by the B values. This figure was made with PyMOL (Schrödinger, 2020). e) distribution of atomic correlation values at refined LA coordinates. ??09@,0ABC: and ˆ??;<:: are shown with orange and blue, respectively. Also, the atomic B values are shown in grey. A comparison of ˆ??;<:: versus ??09@,0ABC: can highlight map-model differences as shown by the previous examples. In model building and refinement, we aim at explaining the full signal in the map by the model, and hence the chance of building model into the noise is unavoidable. In such situations, the local correlation can be a helpful tool to monitor the overfitting. According to eq. 4 the inequality ??09@,0ABC: ≤ <u>ˆ??;<:: should hold when</u> there is no overfitting, and Fig. 3e shows such a situation. # 4.2 Examples of use of map overlay 4.2.1. EMDA map overlay To demonstrate the overlay method, we have used cryo-EM maps EMD-21997 and EMD21999 (Henderson et al., 2020) of SARS-CoV-2 spike protein, whose resolutions are 2.7 Å and 3.3 Å, respectively. The former map is in rS2d locked state in which all three receptor binding domains (RBDs) are down and locked, thus maintaining C3 symmetry. Whereas the latter map is in u1S2q state in which one of the RBDs is open causing the whole structure to be in C1. In this example, we estimate the movement of one of the down RBDs in EMD21999 map relative to one of the down RBDs in EMD-21997 map using EMDA overlay operation. We kept the primary EMD-21997 map and the corresponding 6x29 atomic model static, while the primary EMD-21999 map and the corresponding 6x2a atomic model moving. First, we overlaid EMD-21999 map (Fig. 4a(ii)) on EMD-21997 map (Fig. 4a(i)) and the resulting transformation (relative rotation = 8.35°, translation = 4.14 Å) was applied on the 6x2a atomic model. The overlaid maps are shown in Fig. 4a(iii), and they are the starting maps for the subsequent domain overlay (shown by 4a(iv) and (v) for static and moving maps, respectively). Next, a pair of RBDs located proximity to each other on 4a(iii) were extracted within model generated masks. The extracted RBDs are shown in 4a(vi) and 4a(vii) and their superposition before fit optimisation is shown in 4a(viii). Next, their relative fit was optimized and at the convergence the relative rotation and translation values were 3.38° and 1.76 Å, respectively. The superposed domains after the fit optimisation is shown in 4a(ix). These rotation and translation values indicate the movement of the selected RBD of EMD-21999 map relative to the corresponding RBD of EMD-21997 map in the same coordinate frame. Finally, the estimated transformation between domains was applied on the 6x2a RBD coordinates to bring it on the static model (6x29). Fig. 4a(x) and (xi) present the superposition of models before and after the transformation has been applied, 15 respectively. Fig. 4b shows the FSC curves calculated between the two domains before and after the overlay optimisation. Fig. 4. Map superposition in EMDA illustrated using EMD-21997 and EMD-21999 maps. (a) keeping EMD-21997 map (i) static, EMD-21999 map (ii) was moved to obtain the optimal overlay between them (iii). Starting from the overlaid maps (iv) and (v), RBDs were extracted using masks. The extracted RBDs (vi) and (vii) were superposed (viii) and optimized their overlay (ix) in EMDA. The final values of relative rotation and translation are 3.38° and 1.76 Å, respectively. The same transformation was applied on the model 6x2a of the moving map. The superposition of 6x29 (static, grey) and 6x2a (moving, cyan) RBD models before (x) and after (xi) the domain transformation being applied. This figure was made with Chimera (Pettersen et al., 2004). (b) FSC between static and moving RBDs before (blue) and after (orange) the overlay optimization. 4.2.2. EMDA magnification refinement 16 Magnification refinement in EMDA involves 1) resampling the target map on the reference grid to make sure both maps refer to the same coordinate system, 2) superposition of the target map on the reference and refining the magnification of the target map, iteratively. To demonstrate the magnification refinement in EMDA, we intentionally introduced a -5% magnification error in one of the half maps of Haemoglobin (half1 of EMD-3651; (Khoshouei et al., 2017)) to yield the initial map, and let EMDA to refine its magnification against the half1 map (original map). The pixel sizes of the original and the magnification modified maps (initial map, Fig. 5a) are 1.05 and 0.998 Å, respectively. EMDA optimized the magnification of the initial map relative to the original map to yield the magnification adjusted map (Fig. 5a) with the pixel size 1.05 Å. Fig. 5b shows the FSC curves for the initial and the adjusted maps calculated against the original map. The increase from initial map to adjusted map is due to the correction in the magnification. To validate the accuracy of refinement, the FSC for adjusted map is compared with the half data FSC (Fig. 5c) and they are in very good agreement. Fig. 5. The magnification refinement in EMDA using Haemoglobin data (EMD-3651). (a) the superposition of the original (half1) map (in grey) on the initial map (in cyan) obtained by introducing a -5% magnification error on the original map is improved after magnification correction (adjusted map shown in cyan). This figure was made with Chimera (Pettersen et 17 al., 2004). (b) FSC between initial and adjusted maps against the original map indicating improvement in the superposition due to correction in magnification. (c) FSC curves for initial and adjusted maps calculated against the half2 are shown in blue and orange, respectively. The increase of FSC from blue to orange is due to the improved magnification. The green curve is the FSC between the half maps and it serves as the ground truth. In the next example, we illustrate the estimation of the relative magnification differences of two cryo-EM maps of beta-galactosidase [EMD-7770 (Bartesaghi et al., 2018) and EMD10574 (Saur et al., 2020)] relative to an X-ray crystallography model 3dyp (Juers et al., 2009). The resolution of EMD-7770 and EMD-10574 are 1.9 and 2.2 Å, respectively. The model 3dyp has been derived from X-ray data with resolution 1.75 Å. Both cryo-EM maps and the crystallographic model possess D2 point-group symmetry. Since one of the cryo-EM primary maps (i.e. EMD-10574) has been lowpass filtered, we used fullmaps generated from half maps for both cryo-EM entries in this analysis. First, all non-polymer atoms of 3dyp model were removed and just the polymers were fitted onto EMD-7770 map in Chimera (Pettersen et al., 2004). Then the model-based map was calculated up to 1.9 Å using REFMAC5 (Nicholls et al., 2018) and it was kept as the crystallographic reference for the subsequent magnification analysis. Both the reference map and the EMD-7770 map have the same pixel size 0.637 Å, while EMD-10574 map has 0.68 Å. Thus, the latter map was resampled on the reference to bring all maps on the same coordinate system. Next, a principal component analysis was performed on the variance-covariance matrices of the reference and resampled maps to bring the orientation of the latter approximately matches that of the reference. Lastly, the fits and the magnifications of EMD-7770 and the resampled EMD-10574 maps were optimized relative to the reference map, iteratively. This resulted in +0.3 % and +1.7 % magnification differences in EMD-7770 and EMD-10574 maps relative to the reference, respectively. Fig. 6a(i) and (ii) show the superpositions of EMD-7770 (yellow) and EMD10574 (cyan) maps on the reference (grey). Their magnified portions enclosed by red rectangles are shown in Fig. 6b on the left two columns. The yellow density overlaid on the grey density does not show an obvious offset discernible to human eye in both centre or periphery regions. However, the cyan density shows an offset relative to the grey density. Moreover, this offset increases from the centre to periphery; an indication of the magnification problem. Fig. 6a(iii) and (iv) show the magnification corrected EMD-7770 and EMD-10574 maps overlaid on the reference map, respectively. The magnified portions marked by red rectangles are shown in Fig. 6b on the right two columns for centre and periphery regions. Both yellow and cyan densities overlay on grey density, and the offset seen in the cyan density before the correction has now disappeared confirming that EMD10574 map indeed suffers from magnification problem. Furthermore, Fig. 6a(v) and (vi) present the masked FSC curves for EMD-7770 and EMD-10574, respectively, before (blue) and after (orange) the magnification has been corrected. The increase in FSC, especially in (vi) is attributed to the improved magnification. 18 Fig. 6. Magnification correction in EMD-7770, EMD-10574 maps relative to the crystallography model 3dyp. (a) the overlaid EMD-7770 (i, yellow) and EMD-10574 (ii, cyan) maps on the reference map (grey) before the magnification optimisation. (iii) and (iv) are the same maps after the optimisation. The magnification differences in EMD-7770 and EMD-10574 relative to the reference are +0.3 % and +1.7 %, respectively. The FSC curves for EMD-7770 and EMD-10574 maps against the reference before and after the magnification adjustment are shown in (v) and (vi), respectively. The blue and orange curves correspond to FSCs before and after the magnification refinement, respectively. The increase in FSC is attributed to the corrected magnification. This figure was made with Chimera (Pettersen et al., 2004). (b) comparison of EMD-7770 map (yellow) and EMD-10574 map (cyan) densities against the reference map (grey) in different regions before and after the magnification correction. See text for details. 19 Even after the magnification correction, some discrepancies in density overlay were apparent in both EMD-7770 and EMD-10574 maps relative to the reference map. We focused on one monomer unit of EMD-7770 map and extracted it using a model generated mask. The corresponding monomer unit of the reference map was also extracted in similar manner. Fig. 7(i) shows the overlaid EMD-7770 map on the reference after the magnification correction. The monomer units chosen is highlighted within the mask. Extracted monomers are shown in Fig. 7(ii), and one can easily appreciate the rotation of the yellow density relative to the reference grey density due to movements between domains. We estimated the relative transformation between those monomer units and that resulted in 1.02° rotation and 0.12 Å translation (similar analysis was performed using monomers from EMD-10574 map and the reference. That resulted in 0.28° rotation and 0.17 Å translation). Fig. 7(iii) and (iv) show the optimized fit of the monomers and the FSCs between them before (blue) and after (orange) the fit optimisation, respectively. The increase in FSC is attributed to the improved fit. 20 Fig. 7. Movement of one monomer unit of EMD-7770 (yellow) relative to the corresponding monomer unit of the reference map (grey). Selected monomers are highlighted in (i) and those extracted are shown in (ii) before the fit optimisation. (iii) the monomer units after the fit optimisation. (iv) FSCs between monomer units before (blue) and after (orange) the fit optimisation. This figure was made with Chimera (Pettersen et al., 2004). As illustrated in this example, the map magnification is an important factor to consider during structural comparison studies. It should be refined and make sure all structures have the same magnification before comparing for other structural variations. Internal motions such as domain movements should be estimated and compared to other similar structures only if their magnifications are comparable. # 5. Conclusions We presented the EMDA Python package to serve the need of map and model validation in cryo-EM. We showed the use of map-model local correlation to identify residues outside the density or those poorly fitted. Since the fullmap local correlation gives an indication of the signal level in the map, it can be used to draw insights about the presence of a signal. Moreover, a comparison of map-model local correlation with fullmap local correlation can be used for validating the model-to-map fit. In one of the examples, we used the local correlation to identify an unmodeled ligand in a map, thereby demonstrating its complementary nature to the difference map. The use of local correlation to identify ligands has the advantage that the correlation naturally offers a way to validate the presence/absence of the density as revealed by the half map local correlation. Also, we showed that correlation values mapped into atoms are useful to study the local signal variations. Secondly, we presented the likelihood-based map-to-map fitting using an example, where two SARS-CoV-2 structures were first fitted to bring them on the same coordinate frame. Then two receptor binding domains were fitted in the same coordinate frame to estimate their relative movement. The last example illustrated the use of likelihood-based magnification adjustment where the magnifications of two cryo-EM maps relative to an Xray crystallography derived atomic model have been estimated. The importance of correcting the relative magnification between structures in structure comparison studies have been highlighted. Software availability EMDA is released under the Mozilla Public License Version 2.0 (MPL 2.0) and it is free and open source. The source code is accessible at <u>https://gitlab.com/ccpem/emda. EMDA is</u> distributed as a part of CCP-EM suite and also available via Python Package Installer ( `pip` ). EMDA’s documentation is available at <u>https://emda.readthedocs.io, and we encourage the</u> 21 reader to look at the documentation for most recent functionalities and up-to-date instructions. Acknowledgements : RW was supported by the MRC and the Wellcome Trust (grant numbers: MC_UP_A025_1012, 208398/Z/17/Z), GNM and KY were supported by MC_UP_A025_1012, We thank Takanori Nakane for useful discussions, providing test cases and comments on the initial manuscript, Jake Grimmett and Toby Darling for providing scientific computing resources, UKRI, CCP-EM, UK Cryo-EM validation group, the MRC-LMB for creative environment and the users for their valuable feedback. # Appendix A Local correlation in real space Let ?(?) and ?(?) be two functions where the latter is normalized ∫ ?(?)??= 1 (A1) - <sup>˜</sup> Then the local averages of ?(?) with the kernel ?(?) can be written as a convolution operation: ?0(?) = ∫— <sup>˜</sup> ?(?)?(?−?)?? (A2) This can be calculated using the convolution theorem: ?0(?) = ℱ <sup>P1</sup> [(ℱ6?(?)76ℱ6?(?)7¼ (A3) where ℱ is the Fourier transformation operator and ℱ <sup>P1</sup> is its inverse. Similarly, the local covariance between ?1(?) and ?2(?) is given by ???12,0(?) = ∫— <sup>˜</sup> ?(?−?) ?1(?)?2(?)??− ∫— <sup>˜</sup> ?(?−?) ?1(?)??∫— <sup>˜</sup> ?(?−?) ?2(?)?? (A4) The local correlation between the two functions can be written as ??12,0(?) = <u>kA•fW,•(“)</u> <u>ˆ•9‘f,•(“) •9‘W,•(“)</u> <sup>(A5)</sup> Now, let us assume that there are two noisy maps, each has ?/,L(?) = ?/(?) + ?/(?) (A6) where ?/(?) and ?/(?) are the signal and the noise components in _i_ <sup>th</sup> map. If the noise components between the maps, and the noise and signal within as well as between maps are uncorrelated, then the local variance and covariance can be written: ???/,0 ”?/,L(?)• = ???/,06?/(?)7 + ???/,0(?/(?)) (A7) ???12,0(?1,L(?), ?2,L(?)) = ???12,06?1(?), ?2(?)7 (A8) And finally, the local correlation can be written ??12,0(?) = <u>kA•fW,•(’f(“),’W(“))</u> (A9). 5•9‘f,•6’f(“)7 •9‘f,•(Lf(“))5•9‘W,•6’W(“)7 •9‘W,•(LW(“)) If two maps are cryo-EM half maps, then they share a common signal. In addition, if the noise components have the same variance for both halves then the following relationships hold 22 ???6?1(?), ?2(?)7 = ???6?1(?)7 = ???6?2(?)7 (A10) ???6?1(?)7 = ???6?2(?)7 = 2???6?(?)7 (A11) where ???6?(?)7 is the noise variance in the averaged map. Thus, the local correlation between half maps is: ??89:;,0(?) = <u>•9‘f,•6’f(“)7</u> •9‘f,•6’f(“)7 2•9‘6L(“)7 <sup>(A12)</sup> The corresponding local correlation in the full map (Rosenthal and Henderson, 2003) is ??;<::,0(?) = 2››œ•žŸ,•(“) 1 ››œ•žŸ,•(“) <sup>. (A13)</sup> # Relationship between correlations Let us assume that we have a map with the Fourier coefficients ?A(?). The observation was made for the true map with the Fourier coefficients ?J(?). And we have a model describing the true map with the Fourier coefficients ?k(?). We assume that noise on the observations ?L(?) is additive as well noise and signal are uncorrelated:: ?A(?) = ?J(?) + ?L(?) (A14) ???6?J(?), ?L(?)7 = 0 (A15) We also assume that noise in the observation is uncorrelated with the Fourier coefficients from atomic model (???(?k, ?L) = 0). Correlation between observed and calculated Fourier coefficients calculated within thin resolution shells is: ???(?A(?), ?k(?)) = <u>kA•(RS(o),R½(o))</u> <u>ˆ•9‘(RS(o))•9‘(R½(o))</u> <sup>(A16)</sup> Since we assume that the correlation between observed noise and atomic model is zero we can write: ???6?A(?), ?k(?)7 = <u>kA•6RV(o),R½(o)7</u> (A17) 5”•9‘6RV(o)7 •9‘6RY(o)7••9‘6R½(o)7 Correlation between observed and “true” Fourier coefficients can be written as: <u>•9‘6RV(o)7</u> <u>ˆ(•9‘(RV(o)) •9‘(RY(o)))•9‘(RV(o))</u> <sup>=</sup> ???6?A(?), ?J(?)7 = <u>kA•6RS(o),RV(o)7</u> = 5•9‘6RS(o)7•9‘6RV(¾)7 <u>•9‘6RV(o)7</u> 5•9‘6RV(o)7 •9‘6RY(o)7 <sup>(A18)</sup> If we multiply the numerator and denominator of A17 by ˆ???(?J(?)) then we can write: <u>•9‘6RV(o)7</u> •9‘6RV(o)7 •9‘6RY(o)7 <sup>=</sup> ???6?A(?), ?k(?)7 = <u>kA•6RV(o),R½(o)7</u> 5 5•9‘6R½(o)7•9‘6RV(o)7 ???6?J(?), ?k(?)7???6?A(?),?J(?)7 (A19) In practice we do not know “true” Fourier coefficients. However, if we can assume that we have two independent data sets (i.e. independent half data reconstructions) then we can use the expression (Rosenthal and Henderson, 2003) 23 ???6?A(?), ?J(?)7 = ~~¿~~ 2kA‘”RS,œ•žŸf(o),RS,œ•žŸW(o)• 1 kA‘”RS,œ•žŸf(o),RS,œ•žŸW(o)• <sup>(A20)</sup> Therefore, we can write: ???6?A(?), ?k(?)7 = ???6?J(?), ?k(?)7 ~~¿~~ 2kA‘”RS,œ•žŸf(o),RS,œ•žŸW(o)• 1 kA‘”RS,œ•žŸf(o),RS,œ•žŸW(o)• <sup>(A21)</sup> Although formulas are derived for correlations calculated in Fourier space, under above assumptions (uncorrelatedness of the noise and true and the noise and model) they are valid also for real space correlation. # Appendix B Calculation of variances and covariances using the data Let us assume that we have _N_ observations and they are made for “true” maps. Noise is additive and uncorrelated with each other and with the signals. We also have half data reconstructed maps for each map. Thus: ?A,G = ?G?J,G + ?L,G (B1) ?A,G,8À = ?G?J,G + ?L,G,8À (B2) ?A,G = ?L,G = <u>1</u> <u>1</u> 2 <sup>6?A,G,8f + ?A,G,8W7 (B3)</sup> <u>1</u> 2 <sup>6?L,G,8f + ?L,G,8W7 (B4)</sup> <u>1</u> The noise components between half maps are uncorrelated, they have 0 mean and they have the same variance (i.e ?A,G,82 f = ?A,G,82 W). A,G,82 f = ?A,G,82 W A,G,82 W). Variances are calculated within resolution bins. This is described in a number of papers (Murshudov, 2016; Rosenthal and Henderson, 2003). Covariances between different maps within resolution bins are calculated using the formula: o∈¹ ?A,G?A,:∗ (B5) ???6?A,G, ?A,:7 = <u>1</u> <u>1</u> o∈¹ ?A,G?A,:∗ Z¹ <sup>∑</sup> Where ?/ is the number of Fourier coefficients within the resolution bin ?/. Then the covariances are: ???6?A,G, ?A,:7 = ΣA,G,: for ?≠? (B6) ???6?A,G 7 = ΣA,G,G + ?A,G2 (B7) And using the half maps: ΣA,G,G = ???6?A,G,8f, ?A,G,8W7 (B8) Using B7 and B8, variance of the noise for each map is calculated. It should be noted that when maps are being fitted into each other, the covariance matrix should be recalculated at every cycle. Also, the covariances should be adjusted to account for the effect of a mask (Chen et al., 2013). # Appendix C 24 # Derivation of likelihood function and posterior probability distribution Let us assume that we have ? observed maps with Fourier coefficients - ??(?) = (?A,1(?), ?A,2(?), … ., ?A,Z(?)). Each of ?A,G(?) is a complex number, i.e. it has two components – real and imaginary. Let us assume that these observations have been made for ? “true” maps - ??(?) = (?J,1(?), ?J,2(?), … ., ?J,Z(?)). In practice, the number of “true” maps could be less than the number of observed maps. We assume that the underlying signals in those maps are related. For instance, those maps can be liganded-unliganded protein complexes, molecules in slightly different conformations, or related but not exactly the same macromolecules. Let us assume that for each “true” map we have a model – usually an atomic model from which we can calculate Fourier coefficients accounting for the nature of the experiment: ??(?) = (?k,1(?), ?k,2(?), … ., ?k,Z(?)). We further assume that noise in the observations is additive, independent and with zero mean normal distribution. We also assume that the conditional probability distributions of Fourier coefficients of the maps given the Fourier coefficients of true signals are Gaussian. Because of the central limit theorem this assumption holds in practice with sufficient accuracy. ?”?A,G(?); ?J,G(?)• = ?2 ”?A,G(?); ?G?J,G(?), <u>1</u> 2 - (C1) 2 <sup>?L,G</sup> <u>1</u> where ?2 denotes two-dimensional normal distribution with mean equal to ?G(?)?J,G(?) and variance equal to <u>1</u> 2 . ?G is the scale parameter for the “true” map number _j_ implying that 2 <sup>?L,G</sup> <u>1</u> “true” signal is blurred with a position independent point spread function before/during observations and/or data processing. Under an assumption that blurring is with an isotropic Gaussian kernel then ?G can be expressed in a form of Gaussian with a B value, ?¨,G? <sup>P</sup> ÉT|¾| <sup>W</sup> Gaussian kernel then ?G can be expressed in a form of Gaussian with a B value, ?¨,G? <sup>P</sup> Ê . We will further assume that the “true” signals are on the same coordinate frame, however, observations may have been made for rotated and translated molecules. Then the probability distribution of individual Fourier coefficients will have the form: ?6?A,G(?); ?J,G(?)7 = ?2(?A,G(?); ?G?J,G6?G‚?7?P2v/o <sup>d</sup> JT, <u>1</u> 2 ) (C2) 2 <sup>?L,G</sup> <u>1</u> To get the total conditional probability distribution of observed Fourier coefficients all individual components are multiplied. Then, we can transfer transformations to the observed Fourier coefficients. To do this, it is assumed that variances of noise are the same on the surface of each sphere with a radius |?|. We also ignore correlation between different Fourier coefficients after transformation: ?”?A,G6?G?7? <sup>2v/odJT</sup> ; ?J,G(?)• = ?2 ”?A,G6?G?7? <sup>2v/odJT</sup> ; ?G?J,G(?), <u>1</u> 2 - (C3) 2 <sup>?L,G</sup> The probability distribution of the “true” Fourier coefficients given atomic model is also Gaussian, justification of which can be found in (Luzzati, 1952). Since “true” maps are related, we need to account for the relationship between different maps. We assume that the distribution of all “true” maps given all atomic models is Gaussian. This form of the distribution can be derived using the same technique used by Luzzati or the central limit theorem: ?(??(?); ??) = ?2Z(??(?); ???, <u>1</u> 2 <sup>?) (C4)</sup> 25 Where the subscript 2? signifies 2 _N_ dimensional normal distribution. _D_ is a diagonal matrix formed by scale factors between calculated and “true” Fourier coefficients and ? is the matrix of covariances Σ1Z Σ2Z … ΣZZ Σ12 Σ22 … ΣZ2 … … … … ?= Ë Σ11 Σ21 … ΣZ1 Ì (C5) with Σ/G =< (?J,/ −?/?k,/)(?J,G −?G?k,G) <sup>∗</sup> - to be estimated using data and atomic model. We also assume that observations are conditionally independent on model if the true map is known. In other words, if we know the true map, then atomic models would not say anything more about observations. Then the joint probability distribution of observed and “true” Fourier coefficients can be written as (Murshudov, 2016): ?(??, ?J; ?k) = ?(??; ??, ??)?(??; ??) = ?(??; ?J)?(??; ??) (C6) Since both distributions on the right-hand side are Gaussian, their product also will be Gaussian. In a multivariate Gaussian probability distribution, both marginal (integrating out some of the random variables) and conditional probability distributions of one subset given another subset of random variables are also Gaussian distributions (Eaton, 2007). To fully specify a Gaussian distribution, we need its mean vector and the covariance matrix. _Likelihood function_ is derived by integrating out the “true” unknown Fourier coefficients from the joint probability distribution of observations and “true” Fourier coefficients. I.e. it is a marginal probability distribution of observed Fourier coefficients. Since we know that the resultant probability distribution will be Gaussian with the mean and covariance matrix equal to the corresponding terms of the joint probability distribution of observed and “true” Fourier coefficients, we only need to find these terms. Since we know that: ?A,G = ?G?J,G + ?L,G (C7) Therefore: < ?A,G >=< ?G?J,G + ?L,G - = < ?G?J,G - = ?G?G?k,G (C8) ???6?A,G7 = ???6?G?J,G + ?L,G7 = ?G2???6?J,G7 + ???6?L,G7 = ?G2ΣG,G + ?A,G2 (C9) ???6?A,G, ?A,:7 = ???6?G?J,G + ?L,G, ?:?J,: + ?L,:7 = ?G?:???6?J,G, ?J,:7 = ?G?:ΣG,: (C10) These fully specify the probability distribution of observed Fourier coefficients given calculated one. In practice, we cannot estimate all ?G without additional information. Relative values, ?/?GP1, can be estimated using pairs of observed maps. Coming back to our matrix/vector form using short notations ??, ??, ?? for ??(?), ??(?), ??(?) for clarity, we have ?”?A(??)? <sup>2vwod?</sup> ; ?k• = ∫ ?(??; ??)?(??;??)??? = Rd ∫?RV 2Z ”??;???6? <sup>?</sup> ?7? <sup>P2vwo??</sup>, <u>?</u> <u>??</u> <sup>?2• ?2Z ”??;???,</sup> <u>1</u> <u>?</u> <u>1</u> ∫?RV 2Z ”??;???6? <sup>?</sup> ?7? <sup>P2vwo??</sup>, ? <sup>?2• ?2Z ”??;???,</sup> 2 <sup>?• ???</sup> = ?2Z(?A(??)? <sup>2vwo??</sup> ; ????, <u>1</u> <u>12</u> <sup>6????+ ?27) (C11)</sup> 26 Where ? is the covariance matrix of “true” map without blurring and ?A,o = ? <sup>‚</sup> ??= ??? is the covariance matrix calculated using observed maps including half maps (Appendix B), ? is a diagonal matrix formed by the scale factors of “true” Fourier coefficient. In the absence of models (?→0), the probability distribution will have the form: (C12) P¬(?S(—o)C <sup>WÙÚ?d?</sup> ) <sup>d</sup> 6??,? ? <sup>W</sup> 7 <sup>ef</sup> ”?S <sup>∗</sup> (?o)C <sup>eWÙÚ¾d?</sup> • ?”?A(??)? <sup>2vwod?</sup> ;????? • = <u>1</u> (Ô) <sup>Õ</sup> Öר (?S,¾ ? <sup>W</sup> ) <sup>?</sup> where _atoms_ signifies that observations are made for a molecule that consists of atoms, but we do not know their positions. The negative log likelihood function including all Fourier coefficients has the form: ??(??: ?, ?,??,?) = ∑((?o A(??)? <sup>2vwo??</sup> ) <sup>‚</sup> 6?´,x + ? <sup>2</sup> 7P1”?A∗(??)?P2vwod?• + log6???6?A,o + ? <sup>2</sup> 77 + ?????. (C13) The formula C13 is used in EMDA to estimate rotations and translations of maps into each other as well as for magnification refinement. EMDA uses a special case of this, the twoobservation case to fit two maps into each other. In general, ? is a rotation matrix. However, if we relax this condition then we can also account for relative magnification of maps. If the only difference between maps is the relative isotropic magnification, then ? will become a diagonal matrix where diagonal elements are relative magnification parameter. _Posterior probability_ of “true” Fourier coefficients given observations and atomic model is a conditional probability distribution of “true” maps given observations and model parameters: <u>Û(??;??)Û(??;??)</u> (C14) Û(??;??) ?(??; ??, ?k) = <u>Û(??,??;??)</u> Û(??;??) <sup>=</sup> Again, the conditional probability distribution of a subset of random variables given another subset of variables in multivariate Gaussian distribution is also a Gaussian distribution (Eaton, 2007). So, we need to find the mean and covariance matrix. We know that the logarithm of a Gaussian distribution is a quadratic function. Argument that maximises this function is the mean of the random variable and the second derivative of this function with respect to the random variable we are interested in is related to the covariance matrix: ???????V6log6?(??; ??, ??)77 =< ?? - (C15) JP1 (C16) <u>Ü</u> <sup>W</sup> <u>Ý´Þ6Û(??;??,??)7</u> <u>?;??,??)7</u> = ?J Ü??Ü?? <sup><u>?</u></sup> We need to find the argument that maximises the following function and its second derivative: ?(??) = log(??; ??, ??) = log(??; ??) + log(??; ??) −log (??; ??) (C17) Since the third term on the RHS does not depend on ?? it can be ignored. We can also ignore normalisation coefficients in the probability distributions, because they depend on covariances not on the “true” Fourier coefficients. In the following treatment, we will use the fact that all involved matrices are symmetric. The covariance matrix is symmetric by its nature, and the rest of the matrices are diagonal and therefore symmetric. So, we need to get the derivatives of (after ignoring terms independent on ?J): 27 G <u>W</u> −(?? −???) <sup>‚</sup> ? <sup>P1</sup> (?? −???) <sup>∗</sup> (C18) ?1(??) = −∑ QRS,TPUTRV,TQ <sup>W</sup> XS,TW We can write: ?1(??) = −(?? −???) <sup>‚</sup> ? <sup>P2</sup> (?? −???) <sup>∗</sup> −(?? −???) <sup>‚</sup> ? <sup>P1</sup> (?? −???) <sup>∗</sup> (C19) To find the maximum we need to solve: Ü?Ü;f? <sup>= −2??P2(???</sup> <sup>−??) −2?P1(??</sup> <sup>−???) = 0</sup> <sup>(C20)</sup> It can be conveniently solved: < ?? >= (?? <sup>P2</sup> ?+ ? <sup>P1</sup> ) <sup>P1</sup> (?? <sup>P2</sup> ?? + ? <sup>P1</sup> ???) (C21) It shows that the mean value of the posterior probability distribution is a linear combination of observed and calculated Fourier coefficients with suitable weights. Using the properties of matrices and their inverses we can write these formulas in a more convenient way: < ?? >= ? <sup>P1</sup> ???(???+ ? <sup>2</sup> ) <sup>P1</sup> ?? + ? <sup>P1</sup> ? <sup>2</sup> (???+ ?) <sup>P1</sup> ???? = ? <sup>P1</sup> (???(???+ ? <sup>2</sup> ) <sup>P1</sup> ?? + ? <sup>2</sup> (???+ ? <sup>2</sup> ) <sup>P1</sup> ????) (C22) A special case of this when there is one model and one observation is considered in (Yamashita et al., 2021). When there are no atomic models then ?→0 and the formula becomes: < ?? >= ? <sup>P1</sup> ???(???+ ? <sup>2</sup> ) <sup>P1</sup> ?? (C23) Further we denote ??,? = ??? that can be estimated using the observed data: < ?? >= ? <sup>P1</sup> ??,?6??,? + ? <sup>2</sup> 7P1?? (C24) For completeness we also give the covariance matrix of the posterior probability distribution of the “true” Fourier coefficients (this can be used for estimation posterior noise variance and covariances in the calculated maps): = <u>12</u> <sup>?P1(???)(???+ ?2)P1?2?P1</sup> <sup>=</sup> ?? = −” <u>Ü</u> <sup>W</sup> <u>Ý´Þ6Û(??;??,??)7</u> <u>Ý´Þ6Û(??;??,??)7</u> P1 ~~•~~ Ü??Ü?? <sup><u>?</u></sup> <u>12</u> <sup>(??P2?+ ?P1)P1</sup> <sup>=</sup> <u>12</u> <u>1</u> <u>1</u> P1?2?P1 (C25) 2 <sup>?P1??,?6??,?</sup> <sup>+ ?27</sup> <u>1</u> Since not all components of ? can be estimated using the observations only, for current calculations we replace the elements of ? with the standard deviations of the observed signal ?G = ˆΣA,GG (explained in (Yamashita et al., 2021)). If ?? is a diagonal matrix formed with 5ΣA,GG ?G2 then we can write: P1?1?1 P1?1?A (C26) < ?J >= ? <sup>P1</sup> ?A,o6?A,o + ? <sup>2</sup> 7 1P1?A = ?P1?A,o?P1??1 1P1?16?A,o + ?27 Here we used the notation ?A,G = RS,T W <sup>. We recognise that</sup> <sup>?o</sup> <sup>= ?P1?A,o?P1 is the</sup> 5áS,TT XT RS,T correlation matrix between “true” maps, <u>ˆ???</u> = ??1P1 is the diagonal matrix formed with square root of fullmap FSCs, ?A = ?1P1(?A,o + ?2)?1P1 is the correlation matrix between correlation matrix between “true” maps, <u>ˆ???</u> = ??1 square root of fullmap FSCs, ?A = ?1P1(?A,o + ?2)?1P1 is the correlation matrix between observed maps. Now we can write: 1P1(?A,o + ?2)?1 28 < ?J - = ?? <u>ˆ??? ?A</u> <sup>P1</sup> ?A (C27) When there is only one map then this formula gives normalised and _fsc_ weighted map. Next, we consider the case when N = 2. Then we can write the formulas in an explicit form: −ˆ???1 ?A?o + ˆ???2 <sup>−ˆ???1?A + ˆ???2?o</sup> < ?? - = ?? <u>ˆ??? ?A</u> <sup>P1</sup> ?? = And <u>1</u> 1PâS <sup><u>W</u></sup> <sup>¬ˆ???1</sup> <sup>−</sup> <sup><u>ˆ???2</u></sup> <sup>?o?A</sup> <u>ˆ???1?o −</u> <u>ˆ???2?A</u> <u>1</u> - E <sup>?A,1</sup> ?A,2 <sup>M (C28)</sup> < ?? - = <u>1</u> - (C29) 1PâS <sup><u>W</u></sup> <sup>¬6ˆ???1</sup> <sup>−</sup> <sup><u>ˆ???2</u></sup> <sup>?o?A7?A,1 + 6−ˆ???1?A + ˆ???2?o7?A,2</sup> 6ˆ???1?o − <u>ˆ???2?A7?A,1 + 6−ˆ???1 ?A?o + ˆ???27?A,2</u> It must be stressed that since correlations are calculated using observed maps and when signal to noise ratio is very small then this estimation can vary dramatically. Therefore, for accurate estimations we may need to improve the estimation of the correlations, especially those between signal components, for example using smoothening or using prior knowledge derived from the PDB. # Appendix D Use of normalized and weighted maps in local correlation calculation In order to compare local correlations calculated using various maps, they need to be weighted appropriately in the same way. The normalized expected map for a single map according to Bayesian interpretation is < ?‚ - = ?1?A. (D1) <u>1</u> ?A is the observed Fourier coefficients, and ?1 = <u>Σo,s</u> Σo,s+? <sup>2</sup> <u>1</u> ? <sup>in which ΣA,o and ?2 are the</sup> covariance and the noise variance in the fullmap estimated using half maps in resolution bins as explained in Appendix B. ? is a scale factor that associated with distortions of the true signal such as blurring. In the current implementation, ? is replaced with the standard deviation of the observed signal (i.e. ?(?) = ˆΣ?,?) to yield < ?‚ - = ˆ???;<::?A (D2) where ?A = <u>RS</u> 5Σo,s+? <sup>2</sup> <sup>~~.~~</sup> While FSC-type weighting dampening down the noise, the normalisation works as a position independent deblurring operation. Similar to D1, weights can be assigned on the calculated map as follows: ?k,äC/å8JCB = ?2?k (D3) where ?k are calculated Fourier coefficients. The weights on calculated Fourier coefficients should be selected to dampen high resolution frequencies as in the weighted observed maps. Otherwise, the variance contribution of calculated high-resolution Fourier coefficients will reduce the correlation making it incomparable to that calculated for observed maps. We would also like to remove overall B value effect as in (D2). This way correlation in observed maps calculated using half maps will be comparable to that calculated between observed 29 <u>1</u> ?? <sup>where ?k is the standard</sup> and calculated maps. To achieve this, we chose ?2 = <u>Σo,s</u> Σo,s+? <sup>2</sup> deviation of calculated Fourier coefficients estimated in the same resolution bins as ΣA,o. Choosing such weights is equivalent to scaling ?k and ?A by making their variances equal, i.e., ?k,ok9:CB = 5Σo,s+? <sup>2</sup> ?k (D4) X½ and using the calculated map with the following weights XR½½ <sup>= ˆ???(????)?k (D5).</sup> ?k,äC/å8JCB = 5 <u>Σ?,?</u> Σo,s+? <sup>2</sup> # References: Afonine, P.V., Poon, B.K., Read, R.J., Sobolev, O.V., Terwilliger, T.C., Urzhumtsev, A., Adams, P.D., 2018a. Real-space refinement in PHENIX for cryo-EM and crystallography. Acta crystallographica. Section D, Structural biology 74, 531-544. Afonine, P.V., Klaholz, B.P., Moriarty, N.W., Poon, B.K., Sobolev, O.V., Terwilliger, T.C., Adams, P.D., Urzhumtsev, A., 2018b. New tools for the analysis and validation of cryo-EM maps and atomic models. Acta Crystallographica Section D 74, 814-840. Barad, B.A., Echols, N., Wang, R.Y.-R., Cheng, Y., DiMaio, F., Adams, P.D., Fraser, J.S., 2015. EMRinger: side chain–directed model and map validation for 3D cryo-electron microscopy. Nature Methods 12, 943-946. Bartesaghi, A., Aguerrebere, C., Falconieri, V., Banerjee, S., Earl, L.A., Zhu, X., Grigorieff, N., Milne, J.L.S., Sapiro, G., Wu, X., Subramaniam, S., 2018. Atomic Resolution Cryo-EM Structure of β-Galactosidase. Structure 26, 848-856.e843. Beckers, M., Jakobi, A.J., Sachse, C., 2019. Thresholding of cryo-EM density maps by false discovery rate control. IUCrJ 6, 18-33. Brown, A., Long, F., Nicholls, R.A., Toots, J., Emsley, P., Murshudov, G., 2015. Tools for macromolecular model building and refinement into electron cryo-microscopy reconstructions. Acta crystallographica. Section D, Biological crystallography 71, 136153. Burnley, T., Palmer, C.M., Winn, M., 2017. Recent developments in the CCP-EM software suite. Acta crystallographica. Section D, Structural biology 73, 469-477. Chen, S., McMullan, G., Faruqi, A.R., Murshudov, G.N., Short, J.M., Scheres, S.H.W., Henderson, R., 2013. High-resolution noise substitution to measure overfitting and validate resolution in 3D structure determination by single particle electron cryomicroscopy. Ultramicroscopy 135, 24-35. Cheng, A., Henderson, R., Mastronarde, D., Ludtke, S.J., Schoenmakers, R.H.M., Short, J., Marabini, R., Dallakyan, S., Agard, D., Winn, M., 2015. MRC2014: Extensions to the MRC format header for electron cryo-microscopy and tomography. Journal of Structural Biology 192, 146-150. 30 Costa, M.G.S., Fagnen, C., Vénien-Bryan, C., Perahia, D., 2020. A New Strategy for Atomic Flexible Fitting in Cryo-EM Maps by Molecular Dynamics with Excited Normal Modes (MDeNM-EMfit). Journal of Chemical Information and Modeling 60, 2419-2423. Cragnolini, T., Sahota, H., Joseph, A.P., Sweeney, A., Malhotra, S., Vasishtan, D., Topf, M., 2021. TEMPy2: a Python library with improved 3D electron microscopy densityfitting and validation workflows. Acta crystallographica. Section D, Structural biology 77, 41-47. Croll, T., 2018. ISOLDE: a physically realistic environment for model building into low resolution electron-density maps. Acta Crystallographica Section D 74, 519-530. Eaton, L.M., 2007. Multivariate Statistics A Vector Space Approach Institute of Mathematical Statistics, Beachwood, Ohio, USA. Emsley, P., Lohkamp, B., Scott, W.G., Cowtan, K., 2010. Features and development of Coot. Acta Crystallographica Section D 66, 486-501. Faruqi, A.R., McMullan, G., 2011. Electronic detectors for electron microscopy. Quarterly Reviews of Biophysics 44, 357-390. Harris, C.R., Millman, K.J., van der Walt, S.J., Gommers, R., Virtanen, P., Cournapeau, D., Wieser, E., Taylor, J., Berg, S., Smith, N.J., Kern, R., Picus, M., Hoyer, S., van Kerkwijk, M.H., Brett, M., Haldane, A., del Río, J.F., Wiebe, M., Peterson, P., Gérard-Marchant, P., Sheppard, K., Reddy, T., Weckesser, W., Abbasi, H., Gohlke, C., Oliphant, T.E., 2020. Array programming with NumPy. Nature 585, 357-362. Henderson, R., Edwards, R.J., Mansouri, K., Janowska, K., Stalls, V., Gobeil, S.M.C., Kopp, M., Li, D., Parks, R., Hsu, A.L., Borgnia, M.J., Haynes, B.F., Acharya, P., 2020. Controlling the SARS-CoV-2 spike glycoprotein conformation. Nat Struct Mol Biol 27, 925-933. Henderson, R., Sali, A., Baker, M.L., Carragher, B., Devkota, B., Downing, K.H., Egelman, E.H., Feng, Z., Frank, J., Grigorieff, N., Jiang, W., Ludtke, S.J., Medalia, O., Penczek, P.A., Rosenthal, P.B., Rossmann, M.G., Schmid, M.F., Schröder, G.F., Steven, A.C., Stokes, D.L., Westbrook, J.D., Wriggers, W., Yang, H., Young, J., Berman, H.M., Chiu, W., Kleywegt, G.J., Lawson, C.L., 2012. Outcome of the first electron microscopy validation task force meeting. Structure 20, 205-214. Hunter, J.D., 2007. Matplotlib: A 2D Graphics Environment. Computing in Science & Engineering 9, 90-95. Juers, D.H., Rob, B., Dugdale, M.L., Rahimzadeh, N., Giang, C., Lee, M., Matthews, B.W., Huber, R.E., 2009. Direct and indirect roles of His-418 in metal binding and in the activity of beta-galactosidase (E. coli). Protein science : a publication of the Protein Society 18, 1281-1292. Karplus, P.A., Diederichs, K., 2012. Linking Crystallographic Model and Data Quality. Science 336, 1030. Khoshouei, M., Radjainia, M., Baumeister, W., Danev, R. 2017. Cryo-EM structure of haemoglobin at 3.2 Å determined with the Volta phase plate, pp. 16099 Nature communications, Vol. 8. Kim, D.N., Moriarty, N.W., Kirmizialtin, S., Afonine, P.V., Poon, B., Sobolev, O.V., Adams, P.D., Sanbonmatsu, K., 2019. Cryo_fit: Democratization of flexible fitting for cryo-EM. Journal of Structural Biology 208, 1-6. Kühlbrandt, W., 2014. The Resolution Revolution. Science 343, 1443. Lawson, C.L., Berman, H.M., Chiu, W., 2020. Evolving data standards for cryo-EM structures. Structural Dynamics 7, 014701. 31 Li, X., Mooney, P., Zheng, S., Booth, C.R., Braunfeld, M.B., Gubbens, S., Agard, D.A., Cheng, Y., 2013. Electron counting and beam-induced motion correction enable nearatomic-resolution single-particle cryo-EM. Nature Methods 10, 584-590. Luzzati, V., 1952. Traitement statistique des erreurs dans la determination des structures cristallines. Acta Crystallographica 5, 802-810. Lyumkis, D., 2019. Challenges and opportunities in cryo-EM single-particle analysis. J Biol Chem 294, 5181-5197. Lyumkis, D., Julien, J.-P., de Val, N., Cupo, A., Potter, C.S., Klasse, P.-J., Burton, D.R., Sanders, R.W., Moore, J.P., Carragher, B., Wilson, I.A., Ward, A.B., 2013. Cryo-EM Structure of a Fully Glycosylated Soluble Cleaved HIV-1 Envelope Trimer. Science 342, 1484. Ménétret, J.-F., Schaletzky, J., Clemons, W.M., Osborne, A.R., Skånland, S.S., Denison, C., Gygi, S.P., Kirkpatrick, D.S., Park, E., Ludtke, S.J., Rapoport, T.A., Akey, C.W., 2007. Ribosome Binding of a Single Copy of the SecY Complex: Implications for Protein Translocation. Molecular Cell 28, 1083-1092. Murshudov, G.N., 2016. Refinement of Atomic Structures Against cryo-EM Maps. Methods in enzymology 579, 277-305. Nicholls, R.A., Tykac, M., Kovalevskiy, O., Murshudov, G.N., 2018. Current approaches for the fitting and refinement of atomic models into cryo-EM maps using CCP-EM. Acta Crystallographica Section D 74, 492-505. Orlova, E.V., Serysheva, I.I., van Heel, M., Hamilton, S.L., Chiu, W., 1996. Two structural configurations of the skeletal muscle calcium release channel. Nature Structural Biology 3, 547-552. Penczek, P.A., Frank, J., Spahn, C.M.T., 2006. A method of focused classification, based on the bootstrap 3D variance analysis, and its application to EF-G-dependent translocation. Journal of Structural Biology 154, 184-194. Peterson, P., 2009. F2PY: a tool for connecting Fortran and Python programs. Int. J. Comput. Sci. Eng. 4, 296–305. Pettersen, E.F., Goddard, T.D., Huang, C.C., Couch, G.S., Greenblatt, D.M., Meng, E.C., Ferrin, T.E., 2004. UCSF Chimera - A visualisation system for exploratory research and analysis. Journal of computational chemistry 25, 1605-1612. Pettersen, E.F., Goddard, T.D., Huang, C.C., Meng, E.C., Couch, G.S., Croll, T.I., Morris, J.H., Ferrin, T.E., 2021. UCSF ChimeraX: Structure visualization for researchers, educators, and developers. Protein science : a publication of the Protein Society 30, 70-82. Pintilie, G., Zhang, K., Su, Z., Li, S., Schmid, M.F., Chiu, W., 2020. Measurement of atom resolvability in cryo-EM maps with Q-scores. Nat Methods 17, 328-334. Prisant, M.G., Williams, C.J., Chen, V.B., Richardson, J.S., Richardson, D.C., 2020. New tools in MolProbity validation: CaBLAM for CryoEM backbone, UnDowser to rethink “waters,” and NGL Viewer to recapture online 3D graphics. Protein Science 29, 315329. Ramírez-Aportela, E., Maluenda, D., Fonseca, Y.C., Conesa, P., Marabini, R., Heymann, J.B., Carazo, J.M., Sorzano, C.O.S., 2021. FSC-Q: a CryoEM map-to-atomic model quality validation based on the local Fourier shell correlation. Nature Communications 12, 42. Read, R.J., Adams, P.D., Arendall, W.B., 3rd, Brunger, A.T., Emsley, P., Joosten, R.P., Kleywegt, G.J., Krissinel, E.B., Lütteke, T., Otwinowski, Z., Perrakis, A., Richardson, J.S., Sheffler, W.H., Smith, J.L., Tickle, I.J., Vriend, G., Zwart, P.H., 2011. A new 32 generation of crystallographic validation tools for the protein data bank. Structure 19, 1395-1412. Reboul, C.F., Kiesewetter, S., Elmlund, D., Elmlund, H., 2020. Point-group symmetry detection in three-dimensional charge density of biomolecules. Bioinformatics 36, 2237-2243. Roseman, A.M., 2000. Docking structures of domains into maps from cryo-electron microscopy using local correlation. Acta crystallographica. Section D, Biological crystallography 56, 1332-1340. Rosenthal, P.B., Henderson, R., 2003. Optimal Determination of Particle Orientation, Absolute Hand, and Contrast Loss in Single-particle Electron Cryomicroscopy. Journal of Molecular Biology 333, 721-745. Rossmann, M., 2000. Fitting atomic models into electron-microscopy maps. Acta Crystallographica Section D 56, 1341-1349. Rossmann, M.G., Bernal, R., Pletnev, S.V., 2001. Combining Electron Microscopic with X-Ray Crystallographic Structures. Journal of Structural Biology 136, 190-200. Saur, M., Hartshorn, M.J., Dong, J., Reeks, J., Bunkoczi, G., Jhoti, H., Williams, P.A., 2020. Fragment-based drug discovery using cryo-EM. Drug Discov Today 25, 485-490. Scheres, S.H.W., 2014. Beam-induced motion correction for sub-megadalton cryo-EM particles. eLife 3, e03665. Scheres, S.H.W., Chen, S., 2012. Prevention of overfitting in cryo-EM structure determination. Nature Methods 9, 853-854. Schrödinger, L., & DeLano W. . 2020. PyMOL. <u>http://www.pymol.org/pymol.</u> Tang, G., Peng, L., Baldwin, P.R., Mann, D.S., Jiang, W., Rees, I., Ludtke, S.J., 2007. EMAN2: an extensible image processing suite for electron microscopy. J Struct Biol 157, 3846. Tickle, I.J., 2012. Statistical quality indicators for electron-density maps. Acta crystallographica. Section D, Biological crystallography 68, 454-467. Toelzer, C., Gupta, K., Yadav, S.K.N., Borucu, U., Davidson, A.D., Kavanagh Williamson, M., Shoemark, D.K., Garzoni, F., Staufer, O., Milligan, R., Capin, J., Mulholland, A.J., Spatz, J., Fitzgerald, D., Berger, I., Schaffitzel, C., 2020. Free fatty acid binding pocket in the locked structure of SARS-CoV-2 spike protein. Science 370, 725. Topf, M., Lasker, K., Webb, B., Wolfson, H., Chiu, W., Sali, A., 2008. Protein structure fitting and refinement guided by cryo-EM density. Structure 16, 295-307. Trabuco, L.G., Villa, E., Schreiner, E., Harrison, C.B., Schulten, K., 2009. Molecular dynamics flexible fitting: a practical guide to combine cryo-electron microscopy and X-ray crystallography. Methods 49, 174-180. Tykac, M., 2018. Protein Shape Description and its Application to Shape Comparison (Doctoral thesis). Van Heel, M., 1987. Similarity measures between images. Ultramicroscopy 21, 95-100. Virtanen, P., Gommers, R., Oliphant, T.E., Haberland, M., Reddy, T., Cournapeau, D., Burovski, E., Peterson, P., Weckesser, W., Bright, J., van der Walt, S.J., Brett, M., Wilson, J., Millman, K.J., Mayorov, N., Nelson, A.R.J., Jones, E., Kern, R., Larson, E., Carey, C.J., Polat, İ., Feng, Y., Moore, E.W., VanderPlas, J., Laxalde, D., Perktold, J., Cimrman, R., Henriksen, I., Quintero, E.A., Harris, C.R., Archibald, A.M., Ribeiro, A.H., Pedregosa, F., van Mulbregt, P., Vijaykumar, A., Bardelli, A.P., Rothberg, A., Hilboll, A., Kloeckner, A., Scopatz, A., Lee, A., Rokem, A., Woods, C.N., Fulton, C., Masson, C., Häggström, C., Fitzgerald, C., Nicholson, D.A., Hagen, D.R., Pasechnik, D.V., Olivetti, 33 E., Martin, E., Wieser, E., Silva, F., Lenders, F., Wilhelm, F., Young, G., Price, G.A., Ingold, G.-L., Allen, G.E., Lee, G.R., Audren, H., Probst, I., Dietrich, J.P., Silterra, J., Webber, J.T., Slavič, J., Nothman, J., Buchner, J., Kulick, J., Schönberger, J.L., de Miranda Cardoso, J.V., Reimer, J., Harrington, J., Rodríguez, J.L.C., Nunez-Iglesias, J., Kuczynski, J., Tritz, K., Thoma, M., Newville, M., Kümmerer, M., Bolingbroke, M., Tartre, M., Pak, M., Smith, N.J., Nowaczyk, N., Shebanov, N., Pavlyk, O., Brodtkorb, P.A., Lee, P., McGibbon, R.T., Feldbauer, R., Lewis, S., Tygier, S., Sievert, S., Vigna, S., Peterson, S., More, S., Pudlik, T., Oshima, T. _, et al._, 2020. SciPy 1.0: fundamental algorithms for scientific computing in Python. Nature Methods 17, 261-272. Wang, R.Y.-R., Song, Y., Barad, B.A., Cheng, Y., Fraser, J.S., DiMaio, F., 2016. Automated structure refinement of macromolecular assemblies from cryo-EM maps using Rosetta. eLife 5, e17219. Wang, Z., Schröder, G.F., 2012. Real-space refinement with DireX: from global fitting to side chain improvements. Biopolymers 97, 687-697. Wasilewski, S., Rosenthal, P.B., 2014. Web server for tilt-pair validation of single particle maps from electron cryomicroscopy. Journal of structural biology 186, 122-131. Wilkinson, M.E., Kumar, A., Casanal, A., 2019. Methods for merging data sets in electron cryo-microscopy. Acta Crystallographica Section D 75, 782-791. Wrobel, A.G., Benton, D.J., Xu, P., Roustan, C., Martin, S.R., Rosenthal, P.B., Skehel, J.J., Gamblin, S.J., 2020. SARS-CoV-2 and bat RaTG13 spike glycoprotein structures inform on virus evolution and furin-cleavage effects. Nat Struct Mol Biol 27, 763-767. Yamashita, K., Palmer, C.M., Burnley, T., Murshudov, G.N., 2021. Cryo-EM single-particle structure refinement and map calculation using Servalcat. Acta Crystallographica Section D 77, 1282-1291. 34

섹션 본문 146문단 · 55,745자

(제목 없음)

1An open-source Python library EMDA for cryo-EM map and model manipulation is presented with a specific focus on validation. The use of several functionalities in the library is presented through several examples. The utility of local correlation as a metric for identifying map-model differences and unmodeled regions in maps, and how it is used as a metric of map-model validation is demonstrated. The mapping of local correlation to individual atoms, and its use to draw insights on local signal variations are discussed. EMDA's likelihood-based map overlay is demonstrated by carrying out a superposition of two domains in two related structures. The overlay is carried out first to bring both maps into the same coordinate frame and then to estimate the relative movement of domains. Finally, the map magnification refinement in EMDA is presented with an example to highlight the importance of adjusting the map magnification in structural comparison studies.

Introduction

2Single-particle cryo-electron microscopy (cryo-EM) has become an increasingly popular structure determination tool among structural biologists (Faruqi and McMullan, 2011;Kühlbrandt, 2014;Lyumkis, 2019;Lyumkis et al., 2013;Scheres, 2014). The technique has evolved at an unprecedented speed in the past few years as shown by the rapid growth of cryo-EM structure depositions into the Electron Microscopy Data Bank -EMDB (Lawson et al., 2020). As the number of depositions into EMDB increases, it is important to maintain quality standards for both maps and atomic models not only to ensure their reliability, but also to prevent accumulation of errors.

3The EM validation task force 2010 (Henderson et al., 2012) has recognized the critical need of validation standards to assess the quality of EM maps, models and their fits. The task force's recommendations for map validation included the tilt-pair experiments for the absolute hand determination (Rosenthal and Henderson, 2003), the raw image to 3D structure projection matching for validating reconstruction accuracy and the data coverage (Orlova et al., 1996;Tang et al., 2007), statistical tests using map variances for assessing the map quality and interpretability (Ménétret et al., 2007;Penczek et al., 2006), resolution estimation through Fourier Shell Correlation (FSC) using fully independent half data sets (Scheres and Chen, 2012), visual assessment of map features to the claimed resolution, and the identification and validation of the map symmetry where applicable (Reboul et al., 2020).

4The task force has identified the model validation in cryo-EM as an area for further research, mainly due to the fact that, at the time, there were few high resolution cryo-EM structures. Thus, the recommendations for model validation included, among others, the assessment of subunits and their interfaces according to the guidelines proposed by the PDB (Read et al., 2011), the assessment of agreement between the model and the map utilizing chemical measures such as chemical properties and atomic interactions and their clashes as employed in EMFIT program (Rossmann, 2000;Rossmann et al., 2001) or statistical measures such as correlation coefficient.

5Since the first meeting in 2010, the field has grown by accumulating many methods and tools to address the issue of map validation. Examples include the gold standard FSC to monitor the map overfitting into noise during reconstruction (Rosenthal and Henderson, 2003;Scheres and Chen, 2012), tilt-pair validation to assess the accuracy of initial angle assignment (Wasilewski and Rosenthal, 2014) and the false discovery maps for visual assessment of map features (Beckers et al., 2019).

6The progress in atomic model building, refinement and validation has also been substantial. Resolution in cryo-EM reconstructions vary widely, however the progress made in the field of atomic model building encapsulates modelling tools for low, medium to high resolution.

7Examples include Chimera (Pettersen et al., 2004), DockEM (Roseman, 2000), FlexEM (Topf et al., 2008), COOT (Brown et al., 2015), DireX (Wang and Schröder, 2012), MDFF (Trabuco et al., 2009), Cryo-Fit (Kim et al., 2019), Rosetta (Wang et al., 2016), MDeNM-EMfit (Costa et al., 2020). The atomic model refinement has also gained a significant progress. Unlike in crystallography, cryo-EM maps contain both amplitudes and phases and the atomic model refinement programs can use a phased likelihood target function as employed in REFMAC5 (Murshudov, 2016;Nicholls et al., 2018) or real space target functions as used in phenix.real_space_refine (Afonine et al., 2018a), ISOLDE (Croll, 2018) and COOT (Brown et al., 2015). There has also been a considerable progress in map and model validation. Examples include various metrics for map-model fit validation (Afonine et al., 2018b;Barad et al., 2015;Brown et al., 2015;Pintilie et al., 2020;Ramírez-Aportela et al., 2021), and chemistry and geometry based tools for model validation (Emsley et al., 2010;Prisant et al., 2020). The EM practitioners can access these methods and tools as parts of stand-alone packages, separate tools in collaborative projects such as CCP-EM (Burnley et al., 2017), or as web based tools such as EMDB validation server (https:// www.ebi.ac.uk/pdbe/emdb/validation/fsc/), Molprobity server (htt p://molprobity.biochem.duke.edu/) etc.

8Developing better validation methods and tools in cryo-EM is an active area of research because the goal of validation in cryo-EM is a changing target (Lawson et al., 2020). The metrics for validation should evolve as the field progresses towards the atomic resolution because the methods that are applicable to low and medium resolution may not be equally applicable to atomic resolution data and derived models.

9In this paper we present Electron Microscopy Data Analytical toolkit (EMDA) -a new Python package for post reconstruction/atomic model refinement analysis and validation of cryo-EM maps and models. EMDA is a portable Python package with a command line and an Application Programming Interface (API) for Python programmers.

10EMDA's capabilities are fully described at https://emda.readth edocs.io. This manuscript focuses on three main functions:

11(1) Local correlation evaluating the map signal and the local agreement between an atomic model and a cryo-EM map. We describe the mathematics relevant to correlation calculation in Section 3.1 and examples are presented in Section 4.1.

12(2) Likelihood-based map superposition enhancing structure comparison analysis. Map superposition is an important operation in cryo-EM. In structure comparison studies, it brings all maps into a common coordinate frame for comparison. In the difference and average map calculations, the superposition is an essential first step to align the input maps. The available tools for superposing maps include Chimera's Fit-in-map (Pettersen et al., 2004), TEMPy2 (Cragnolini et al., 2021). EMDA map overlay is based on the maximisation of the likelihood function described in Section 3.2 and demonstrated on examples in Section 4.2.

13(3) Likelihood-based map magnification correction. Magnification of an EM map is related to the microscope optics on which the data has been collected. During merging of several data sets collected on different microscopes or on the same microscope with different optical alignments, their magnifications may need to be adjusted to a reference (Wilkinson et al., 2019). The reference can be another map whose accurate pixel size is already known or an atomic model derived independently of the map whose magnification is sought. The use of EMDA for map magnification correction is demonstrated in Section 4.2.2.

14The rest of the paper is organised into three sections. The first section covers the design and the infrastructure of EMDA with an introduction to the EMDA command line and Application Programming Interface (API). The second section describes the mathematical framework of EMDA behind those three functionalities. In the third section, we demonstrate each functionality by examples. Lastly, the conclusions and outlook followed by information about the package availability are given.

EMDA architecture

15EMDA is written primarily in Python using Numpy , Scipy and Matplotlib (Hunter, 2007), however, numerically intensive tasks are written in Fortran. F2PY (Peterson, 2009)

mediates the communication between Python and

16Fortran. This combination allows us to integrate powerful numerical calculations with abstraction features in Python.

17EMDA code is organized into three layers as shown in Fig. 1. The innermost layer (Layer 3) consists of core and extension modules. The core modules provide basic services such as read & write, format conversion, resampling, binning etc. All higher-level functionalities such as rigid-body fitting, magnification refinement, difference map calculations are provided through extensions. The extension modules use the basic services provided by the core modules. Both core and extension modules are wrapped into another module to form the EMDA API (Layer 2). API abstracts the underlying complexity of the code into methods and objects providing a simplified mechanism for other developers to gain advantage of EMDA infrastructure. EMDA-API functions are further wrapped to form the EMDA command-line-interface (Layer 1). The users can access the underlying functionalities through the command line. Each functionality is callable with a keyword followed by a set of arguments. A list of up-to-date functionalities with their arguments are given in https://emda.readthedocs.io. In addition, a tutorial describing the presented examples in this paper can be found in https://www2. mrc-lmb.cam.ac.uk/groups/murshudov/.

18EMDA uses open-source, standalone Python library mrcfile (Burnley et al., 2017) for the reading, writing and validating EM files in the standard MRC2014 format . Also, EMDA uses gemmi (https://gemmi.readthedocs.io) for reading and writing atomic coordinate files, and ProSHADE (Nicholls et al., 2018;Tykac, 2018) for symmetry detection in EM maps.

Methods

19In this section we outline the mathematical framework for local correlation and probability-based methods in EMDA. The notations we use throughout this text and in the appendices are summarised in Table 1.

Local correlation in real space

20Pearson's product-moment sample correlation coefficient (CC) has been extensively used for various purposes in X-ray crystallography (Karplus and Diederichs, 2012;Tickle, 2012) and in cryo-EM (Van Heel, 1987). The CC depends on the signal and noise levels. If we assume that the noise variance is constant within the masked map then for a given data the CC will be an indicator of the signal in the data. Care should be exercised in its interpretation as any systematic behaviour will be considered as signal. Since the CC is calculated using the data, its variance depends on the volume of the data being used.

21Local CC in real space can be calculated using the formula for the weighted Pearson's product moment sample correlation coefficient with weights defined by the kernel. The local CC for two maps ψ 1 (x) and ψ 2 (x) is:

22(1) cov 12,m (ψ 1 (x), ψ 2 (x) ) and var i,m (ψ i (x) ) are the local covariance and variances for ψ 1 (x) and ψ 2 (x) calculated with a kernel m(x). The kernel is normalized such that ∫ R 3 m(x)dx = 1. The expression for local covariance is, Similar expressions can be written for local variances var i,m (ψ i (x)). Note that the Eq. (2) can be readily evaluated using the convolution theorem (see Appendix A).

23Such correlations could be calculated for any pairs of maps. When it is calculated using half maps (CC half,m (x)) reconstructed from randomly chosen half of the particles, then it indicates the local signal to noise ratio, whereas the local correlation between observed and calculated maps (CC map,model,m (x)) indicates local agreement between atomic model and observed map. Similarly, the local correlation between two different observed maps indicates local common signals between them.

24The correlation calculated using half maps is converted to that of fullmap using the following formula (Rosenthal and Henderson, 2003)

25In the local correlation calculation, EMDA uses a spherically symmetric kernel defined as:

26where r 0 and r 1 are the radii of inner and outer concentric spheres. Z is the coefficient that makes sure that the total integral of m(x) is equal to 1. The size of the kernel (i.e. r 1 ) should be chosen such that the number of data points included is sufficient to calculate a reliable statistic. Both too small or too large kernels lead to inaccurate correlations due to insufficient data points or loss of locality, respectively. In the current implementation of EMDA, r 1 should be chosen by trial-and-error. Both r 0 and r 1 are in pixel unit and by default 2 pixels are used to soften the edge of the mask, in other words r 1 = r 0 + 2.

27The CC full,m (x) (hereafter CC full ) depends on the local signal strength. It has two implications: 1) it depends on the local variation of the signal, and hence different parts of the map with different mobilities will have differing correlations; 2) it will depend on global sharpening/blurring parameters, i.e. maps sharpened with different B values will have different local CC full .

28It should also be noted that the CC map,model,m (x) (hereafter CC map,model ) calculated between an atomic model and a given map (fullmap) depends on atomic coordinates, occupancies and B values. Therefore, to obtain the best possible CC map,model it should be calculated using a refined model with optimized atomic B values. In order to compare CC map,model with CC full all maps should be weighted appropriately. To achieve this, Fourier coefficients of all maps are normalized and weighted by FSC in resolution bins. All correlation examples discussed in this paper used such normalized and weighted maps. The details are in Appendix D.

29Let us assume that errors in the observations are additive and they follow a Gaussian distribution with zero mean. Also, assume that there is no correlation between the noise and the calculated map from the atomic model. This is true only when there's no overfitting. Under these assumptions, a relationship between CC map,model and CC full useful for validation is given by Eq. (4). The full derivation of Eq. (4) is given in Appendix A as well as in (Nicholls et al., 2018).

30According to Eq. (4), the CC map,model (x) is equal to ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅ ̅ CC full,m (x) √ only when CC truemap,model,m (x) = 1, i.e. perfect model. Since this situation is almost never realised, the CC map,model,m (x) should always be less than

31, that could be an indication of overfitting.

Parameter estimation and map calculation: Likelihood and posterior distribution

32As in any application of Bayesian computations to the data analysis we need two probability distributions: 1) probability distribution of observations given parameters to be estimatedlikelihood function and 2) probability distribution of unknown signal given observations and current model parametersposterior probability distribution. The details are given in Appendix C.

Likelihood function

33The negative log likelihood function in the absence of atomic models and in the presence of multiple related maps is (see Appendix C for details):

34where

35and t are the vectors formed by rotation and translation parameters for each map, respectively, Σ o,s is the covariance matrix between "true" maps calculated using observed maps and σ 2 is a diagonal matrix of noise variances. In EMDA, the above likelihood function is implemented to estimate parameters between a pair of maps where one map is static the other moves onto it. In the case of estimation of transformation parameters, the only terms that depend on adjustable parameters are the cross-terms in the Eq. (5):

36F o,i and F o,j are the Fourier transforms of i th and j th maps, R j and t j are the rotation and translation parameters. w i,j is related to the corresponding term in the inverse of the covariance matrix and is related to FSC between maps. For parameter estimation Σ o,s and σ 2 do not need to be estimated separately, their sum is used in Eq. (5).

37Note that if we relax the conditions that R is a rotation matrix, the same formula also allows refining the magnification parameters. In cryo-EM, we assume that the magnification is a scalar parameter and R becomes a diagonal matrix with the same magnification parameter in magnification-only-refinements. The covariance matrices and transformation parameters are estimated iteratively.

38The algorithm in EMDA for transformation estimation includes following steps. 1) starting with initial rotation and translation parameters the covariances are calculated and converted them into weights to calculate the functional value. 2) the derivatives of translation and rotation are calculated and the shifts are estimated. 3) the current translation and rotation are updated and applied on maps. The covariances are recalculated and the new functional value is evaluated. 5) the new functional value is compared with that of the previous iteration, and if the convergence criterion is met the final maps are output and the transformation is retained. Otherwise, the process continues at step 2 with the next cycle of iteration.

39Posterior distribution: For map calculations we need the probability distribution of the unobserved "true" maps given the current state of atomic models as well as observations. In the absence of atomic models this distribution is a multivariate Gaussian with mean (see Appendix C for details):

40where k is the diagonal matrix formed by the blurring parameters, σ 2 is the diagonal matrix formed with the variance of the noise in the observations, Σ o,s is the covariance matrix between "true" maps calculated using observed maps, F o is a vector of Fourier coefficients of observed maps, < F t > is a vector of expectation values of the "true" map Fourier (X, Y) Covariance between random variables X and Y var (X) Variance of the random variable X

41x and s 3D column vectors in real and Fourier space m(x)

42Convolution kernel

43Local correlation calculated between halfmaps

44Local correlation in the fullmap (Rosenthal and Henderson, 2003) CC map,model,m (x) Local correlation calculated between the fullmap and the atomic model-based map

45Two-dimensional Gaussian distribution with mean kjFt,j and variance 1 2 σ 2 n,j of j th map. Since there is no correlation between real and imaginary parts, a single variance is used to describe this distribution.

46with mean kFt and covariance 1 2 Σ. Since there is no correlation between real and imaginary parts N×N covariance matrix is used to describe the 2 N dimensional random variable*. A column vector formed by complex Fourier coefficients calculated from models Eo(s) = (Eo,1(s), Eo,2(s), ⋯., Eo,N(s)) A column vector formed by normalized complex Fourier coefficients of observed maps

47Normalized complex Fourier coefficients of j th map.

Rj and tj

48Transformation matrix and translational vector in 3D to be applied for the map number j

FN(RNs)e 2πιs T tN )

49N dimensional column vector of complex Fourier coefficients after application of transformation. Usually, but not necessarily, (R1 = I, t1= 0) is the identity transformation.

50Diagonal matrix formed by scale factors between the true and calculated Fourier coefficients

51Diagonal matrix formed by blurring parameters Σ N × N covariance matrix of "true" maps without blurring

52Σo,s = k T Σk = kΣk N × N covariance matrix of signals calculated using observed maps

53A column vector formed by the expectation values of the true maps fsc = 2fsc half /(1 + fsc half ) FSC in the fullmap converted from halfmap FSC (Rosenthal and Henderson, 2003)

54Diagonal matrix formed by square root of fullmap FSC values. It is also an estimate for FSC between fullmap and "true" signal (Rosenthal and Henderson, 2003) ρ s N × N correlation matrix between true maps

55Correlation coefficient between observed maps i and j. An element in ρ o . * It should be noted that the covariance matrix is Σ ⊗ I 2 , i.e. Kronecker product of N × N covariance and 2-dimensional identity matrices. The reason of such covariance matrix structure is that there are not correlations between real and imaginary parts of Fourier coefficients and the variance of real and imaginary parts of each Fourier coefficient are equal to each other.

56coefficients.

57Since k is unknown, we replace it with the standard deviation of the signal as explained in (Yamashita et al., 2021). After some algebraic manipulation we get (see Appendix C):

58where ρ s is the correlation matrix between Fourier coefficients of "true" maps, ρ o is the correlation matrix between Fourier coefficients of observed maps, E o is a vector of normalised Fourier coefficients of observed maps and < F t > is a vector of the expectation values of the normalised Fourier coefficients of the "true" maps. Note that if we know the blurring factor, it might be better to use them in the map calculation. However, observations alone do not allow us to calculate these quantities, and they need to be estimated using different methods.

Results and discussion

59In this section, we demonstrate the use of local correlation, map overlay and magnification refinement implemented in EMDA package through examples.

Model-map differences by local correlation

60To demonstrate the use of local correlation to detect model-map differences, we used archaeal 20S proteasome (EMD-5623) map with overall resolution 3.3 Å and the corresponding atomic model 3j9i (Li et al., 2013). The atomic model was refined against the fullmap to a resolution of 3.3 Å using REFMAC5 (Nicholls et al., 2018). Using the refined model, an EM map to 3.3 Å was computed in EMDA using gemmi (https://gemmi.readthedocs.io). Local correlations were calculated within a kernel of radius r 1 = 4 pixels (pixel size = 1.22 Å). The CC full was calculated using the normalized and weighted halfmaps (see Appendix A). Similarly, the CC map,model was calculated between the normalized and weighted fullmap and the normalized and weighted calculated map. Fig. 2a shows the primary map density near residues Lys52-Val54 of chain U of the 3j9i model coloured by the ̅̅̅̅̅̅̅̅̅̅̅ ̅ CC full √ and the superimposed model. One can appreciate a moderate signal, but the model is outside the density. The same density coloured by CC map,model (Fig. 2b) shows a low correlation resulting from the misplaced model. Fig. 2c shows the corresponding part of the refined atomic model coloured by CC map,model and it also highlights those residues with low correlation. Thus, CC map,model can highlight areas with map-model discrepancies, while ̅̅̅̅̅̅̅̅̅̅̅ ̅ CC full √ can be used to validate the existence of a signal. A comparison of CC map,model versus ̅̅̅̅̅̅̅̅̅̅̅ ̅ CC full √ is useful not only to pinpoint map-model differences, but also to identify viable ways to minimise them. Moreover, colouring the atomic coordinates by CC map,model is an effective way to identify misplaced regions in the model.

Unmodeled regions by local correlation

61Next, we used SARS-CoV-2 spike protein structure EMD-11203 and the corresponding model 6zge (Wrobel et al., 2020) to demonstrate the use of local correlation to highlight an unmodeled density. This density has been modelled as linoleic acid (LA) in the homology model 6z5d (Toelzer et al., 2020).

62First, we present the use of ̅̅̅̅̅̅̅̅̅̅̅ ̅ CC full √ and CC map,model to identify the unmodeled density in the map. Then, we compare those local correlations against the local correlation calculated from the model with the ligand.

63Using the normalized and weighted EMD-11203 halfmaps the CC full was calculated within a kernel of radius r 1 = 3 pixels (pixel size = 1.087 Å). The size of the kernel was chosen to maximize the variation of local correlation and minimize the leakage of correlation from the surrounding (a comparison of correlations calculated using different kernel sizes is given in Supplementary materials). The model 6zge was refined against the EMD-11203 fullmap using REFMAC5 (Nicholls et al., 2018) to optimise atomic coordinates and the B values. Using the refined model an EM map was computed to 2.6 Å in EMDA using gemmi (htt ps://gemmi.readthedocs.io). The CC map,model was calculated using the normalized and weighted EMD-11203 fullmap and the normalized and weighted model-based map. EMD-11203 primary map was coloured by ̅̅̅̅̅̅̅̅̅̅̅ ̅ CC full √ and CC map,model , and their comparison highlighted an unmodeled structured densities located near all receptor binding domains. One such density coloured by ̅̅̅̅̅̅̅̅̅̅̅ ̅ CC full √

64and CC map,model is shown in Fig. 3a and 3b, respectively. The high ̅̅̅̅̅̅̅̅̅̅̅ ̅ CC full √ implies the density is real, but low CC map,model implies there is no corresponding model. Next, the homology model 6zb5 with LA was fitted on the EMD-11203 fullmap and refined using REFMAC5 (Nicholls et al., 2018), and the CC map,model was recalculated. The improved CC map,model for the ligand region is shown in Fig. 3c and this improvement is due to the presence of LA in the model. Fig. 3d shows the refined LA molecule whose atoms are coloured according to the atomic B values. The overall trend shows that B values in the hydrophobic tail are relatively small, but they gradually increase towards the hydrophilic carboxyl group. In Fig. 3e, atomic ̅̅̅̅̅̅̅̅̅̅̅ ̅ CC full √ and CC map,model are plotted in blue and orange, respectively, along with the atomic B values in grey. The atomic correlation values were obtained from correlation maps by interpolating at atomic positions.

65The ̅̅̅̅̅̅̅̅̅̅̅ ̅ CC full √ is close to 1 throughout the molecule, but largest variation is seen in the carboxyl group. The CC map,model is lower than the ̅̅̅̅̅̅̅̅̅̅̅ ̅ CC full √ in all atoms, and its variation is larger than that of ̅̅̅̅̅̅̅̅̅̅̅ ̅ CC full √ . The difference in atomic CC map,model for carbonyl O1 and O2 is significant despite their similar B values. The carbonyl group is anchored by the neighbouring Arg408 and Gln409 residues through H-bonding with O2 atom (Toelzer et al., 2020, Fig. 3c), but O1 atom does not seem to have close neighbours thus its atomic correlation may be compromised by the surrounding noise. It should also be noted that at some atoms there is a leakage of correlation. This effect is pronounced at atoms O2, C10, C14 and C18 in Fig. 3b (Henderson et al., 2020) of SARS-CoV-2 spike protein, whose resolutions are 2.7 Å and 3.3 Å, respectively. The former map is in rS2d locked state in which all three receptor binding domains (RBDs) are down and locked, thus maintaining C3 symmetry. Whereas the latter map is in u1S2q state in which one of the RBDs is open causing the whole structure to be in C1. In this example, we estimate the movement of one of the down RBDs in EMD-21999 map relative to one of the down RBDs in EMD-21997 map using EMDA overlay operation. We kept the primary EMD-21997 map and the corresponding 6x29 atomic model static, while the primary EMD-21999 map and the corresponding 6x2a atomic model moving. First, we overlaid EMD-21999 map (Fig. 4a(ii)) on EMD-21997 map (Fig. 4a(i)) and the resulting transformation (relative rotation = 8.35 • , translation = 4.14 Å) was applied on the 6x2a atomic model. The overlaid maps are shown in Fig. 4a(iii), and they are the starting maps for the subsequent domain overlay (shown by 4a(iv) and (v) for static and moving maps, respectively). Next, a pair of RBDs located proximity to each other on 4a (iii) were extracted within model generated masks. The extracted RBDs . High correlation indicates the presence of a strong signal. b) the same density coloured by CC map,model calculated between the fullmap and the refined 6zge model using normalized and weighted densities. The correlation in this region is low compared to its surrounding. c) ligand density coloured by CC map,model calculated between the fullmap and the refined model with LA using normalized and weighted densities. Densities in a, b and c panels were contoured at the same level. Those figures were made with Chimera (Pettersen et al., 2004). d) distribution of atomic B values of refined LA where the atoms are coloured by the B values. This figure was made with PyMOL (Schrödinger and DeLano, 2020). e) distribution of atomic correlation values at refined LA coordinates. CC map,model and ̅̅̅̅̅̅̅̅̅̅̅ ̅ CC full √ are shown with orange and blue, respectively. Also, the atomic B values are shown in grey. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.) are shown in 4a(vi) and 4a(vii) and their superposition before fit optimisation is shown in 4a(viii). Next, their relative fit was optimized and at the convergence the relative rotation and translation values were 3.38 • and 1.76 Å, respectively. The superposed domains after the fit optimisation is shown in 4a(ix). These rotation and translation values indicate the movement of the selected RBD of EMD-21999 map relative to the corresponding RBD of EMD-21997 map in the same coordinate frame. Finally, the estimated transformation between domains was applied on the 6x2a RBD coordinates to bring it on the static model (6x29). Fig. 4a(x) and (xi) present the superposition of models before and after the transformation has been applied, respectively. Fig. 4b shows the FSC curves calculated between the two domains before and after the overlay optimisation.

EMDA magnification refinement

66Magnification refinement in EMDA involves 1) resampling the target map on the reference grid to make sure both maps refer to the same coordinate system, 2) superposition of the target map on the reference and refining the magnification of the target map, iteratively. To demonstrate the magnification refinement in EMDA, we intentionally introduced a -5% magnification error in one of the half maps of Haemoglobin (half1 of EMD-3651; (Khoshouei et al., 2017)) to yield the initial map, and let EMDA to refine its magnification against the half1 map (original map). The pixel sizes of the original and the magnification modified maps (initial map, Fig. 5a) are 1.05 and 0.998 Å, respectively. EMDA optimized the magnification of the initial map relative to the original map to yield the magnification adjusted map (Fig. 5a) with the pixel size 1.05 Å. Fig. 5b shows the FSC curves for the initial and the adjusted maps calculated against the original map. The increase from initial map to adjusted map is due to the correction in the magnification. To validate the accuracy of refinement, the FSC for adjusted map is compared with the half data FSC (Fig. 5c) and they are in very good agreement.

67In the next example, we illustrate the estimation of the relative Fig. 4. Map superposition in EMDA illustrated using EMD-21997 and EMD-21999 maps. (a) keeping EMD-21997 map (i) static, EMD-21999 map (ii) was moved to obtain the optimal overlay between them (iii). Starting from the overlaid maps (iv) and (v), RBDs were extracted using masks. The extracted RBDs (vi) and (vii) were superposed (viii) and optimized their overlay (ix) in EMDA. The final values of relative rotation and translation are 3.38 • and 1.76 Å, respectively. The same transformation was applied on the model 6x2a of the moving map. The superposition of 6x29 (static, grey) and 6x2a (moving, cyan) RBD models before (x) and after (xi) the domain transformation being applied. This figure was made with Chimera (Pettersen et al., 2004). (b) FSC between static and moving RBDs before (blue) and after (orange) the overlay optimization. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.) magnification differences of two cryo-EM maps of beta-galactosidase [EMD-7770 (Bartesaghi et al., 2018) and EMD-10574 (Saur et al., 2020)] relative to an X-ray crystallography model 3dyp (Juers et al., 2009). The resolution of EMD-7770 and EMD-10574 are 1.9 and 2.2 Å, respectively. The model 3dyp has been derived from X-ray data with resolution 1.75 Å. Both cryo-EM maps and the crystallographic model possess D2 point-group symmetry. Since one of the cryo-EM primary maps (i.e. EMD-10574) has been lowpass filtered, we used fullmaps generated from half maps for both cryo-EM entries in this analysis. First, all non-polymer atoms of 3dyp model were removed and just the polymers were fitted onto EMD-7770 map in Chimera (Pettersen et al., 2004). Then the model-based map was calculated up to 1.9 Å using REFMAC5 (Nicholls et al., 2018) and it was kept as the crystallographic reference for the subsequent magnification analysis. Both the reference map and the EMD-7770 map have the same pixel size 0.637 Å, while EMD-10574 map has 0.68 Å. Thus, the latter map was resampled on the reference to bring all maps on the same coordinate system. Next, a principal component analysis was performed on the variance-covariance matrices of the reference and resampled maps to bring the orientation of the latter approximately matches that of the reference.

68Lastly, the fits and the magnifications of EMD-7770 and the resampled EMD-10574 maps were optimized relative to the reference map, iteratively. This resulted in +0.3% and +1.7% magnification differences in EMD-7770 and EMD-10574 maps relative to the reference, respectively. Fig. 6a(i) and (ii) show the superpositions of EMD-7770 (yellow) and EMD-10574 (cyan) maps on the reference (grey). Their magnified portions enclosed by red rectangles are shown in Fig. 6b on the left two columns. The yellow density overlaid on the grey density does not show an obvious offset discernible to human eye in both centre or periphery regions. However, the cyan density shows an offset relative to the grey density. Moreover, this offset increases from the centre to periphery; an indication of the magnification problem. Fig. 6a(iii) and (iv) show the magnification corrected EMD-7770 and EMD-10574 maps overlaid on the reference map, respectively. The magnified portions marked by red rectangles are shown in Fig. 6b on the right two columns for centre and periphery regions. Both yellow and cyan densities overlay on grey density, and the offset seen in the cyan density before the correction has now disappeared confirming that EMD-10574 map indeed suffers from magnification problem. Furthermore, Fig. 6a(v) and (vi) present the masked FSC curves for EMD-7770 and EMD-10574, respectively, before (half1) map (in grey) on the initial map (in cyan) obtained by introducing a -5% magnification error on the original map is improved after magnification correction (adjusted map shown in cyan). This figure was made with Chimera (Pettersen et al., 2004). (b) FSC between initial and adjusted maps against the original map indicating improvement in the superposition due to correction in magnification. (c) FSC curves for initial and adjusted maps calculated against the half2 are shown in blue and orange, respectively. The increase of FSC from blue to orange is due to the improved magnification. The green curve is the FSC between the half maps and it serves as the ground truth. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.) (blue) and after (orange) the magnification has been corrected. The increase in FSC, especially in (vi) is attributed to the improved magnification.

69Even after the magnification correction, some discrepancies in density overlay were apparent in both EMD-7770 and EMD-10574 maps relative to the reference map. We focused on one monomer unit of EMD-7770 map and extracted it using a model generated mask. The corresponding monomer unit of the reference map was also extracted in similar manner. Fig. 7(i) shows the overlaid EMD-7770 map on the reference after the magnification correction. The monomer units chosen is highlighted within the mask. Extracted monomers are shown in Fig. 7 (ii), and one can easily appreciate the rotation of the yellow density relative to the reference grey density due to movements between domains. We estimated the relative transformation between those yellow) and EMD-10574 (ii, cyan) maps on the reference map (grey) before the magnification optimisation. (iii) and (iv) are the same maps after the optimisation. The magnification differences in EMD-7770 and EMD-10574 relative to the reference are +0.3% and +1.7%, respectively. The FSC curves for EMD-7770 and EMD-10574 maps against the reference before and after the magnification adjustment are shown in (v) and (vi), respectively. The blue and orange curves correspond to FSCs before and after the magnification refinement, respectively. The increase in FSC is attributed to the corrected magnification. This figure was made with Chimera (Pettersen et al., 2004). (b) comparison of EMD-7770 map (yellow) and EMD-10574 map (cyan) densities against the reference map (grey) in different regions before and after the magnification correction. See text for details. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.) monomer units and that resulted in 1.02 • rotation and 0.12 Å translation (similar analysis was performed using monomers from EMD-10574 map and the reference. That resulted in 0.28 • rotation and 0.17 Å translation). Fig. 7(iii) and (iv) show the optimized fit of the monomers and the FSCs between them before (blue) and after (orange) the fit optimisation, respectively. The increase in FSC is attributed to the improved fit.

70As illustrated in this example, the map magnification is an important factor to consider during structural comparison studies. It should be refined and make sure all structures have the same magnification before comparing for other structural variations. Internal motions such as domain movements should be estimated and compared to other similar structures only if their magnifications are comparable.

Conclusions

71We presented the EMDA Python package to serve the need of map and model validation in cryo-EM. We showed the use of map-model local correlation to identify residues outside the density or those poorly fitted. Since the fullmap local correlation gives an indication of the signal level in the map, it can be used to draw insights about the presence of a signal. Moreover, a comparison of map-model local correlation with fullmap local correlation can be used for validating the model-to-map fit. In one of the examples, we used the local correlation to identify an unmodeled ligand in a map, thereby demonstrating its complementary nature to the difference map. The use of local correlation to identify ligands has the advantage that the correlation naturally offers a way to validate the presence/absence of the density as revealed by the half map local correlation. Also, we showed that correlation values mapped into atoms are useful to study the local signal variations.

72Secondly, we presented the likelihood-based map-to-map fitting using an example, where two SARS-CoV-2 structures were first fitted to bring them on the same coordinate frame. Then two receptor binding domains were fitted in the same coordinate frame to estimate their relative movement. The last example illustrated the use of likelihoodbased magnification adjustment where the magnifications of two cryo-EM maps relative to an X-ray crystallography derived atomic model have been estimated. The importance of correcting the relative magnification between structures in structure comparison studies have been highlighted.

Software availability

73EMDA is released under the Mozilla Public License Version 2.0 (MPL 2.0) and it is free and open source. The source code is accessible at https://gitlab.com/ccpem/emda. EMDA is distributed as a part of CCP-EM suite and also available via Python Package Installer (pip). EMDA's documentation is available at https://emda.readthedocs.io, and we encourage the reader to look at the documentation for most recent Fig. 7. Movement of one monomer unit of EMD-7770 (yellow) relative to the corresponding monomer unit of the reference map (grey). Selected monomers are highlighted in (i) and those extracted are shown in (ii) before the fit optimisation. (iii) the monomer units after the fit optimisation. (iv) FSCs between monomer units before (blue) and after (orange) the fit optimisation. This figure was made with Chimera (Pettersen et al., 2004). (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.) functionalities and up-to-date instructions.

CRediT authorship contribution statement

74Rangana Warshamanage: Software, methodology, investigation, writing-original draft, review and editing. Keitaro Yamashita: Investigation, methodology, validation, review and editing. Garib N. Murshudov: Funding acquisition, conceptualization, project administration, supervision, writing review and editing.

Declaration of Competing Interest

75The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgements

76RW was supported by the MRC and the Wellcome Trust (grant numbers: MC_UP_A025_1012, 208398/Z/17/Z), GNM and KY were supported by MC_UP_A025_1012, We thank Takanori Nakane for useful discussions, providing test cases and comments on the initial manuscript, Jake Grimmett and Toby Darling for providing scientific computing resources, UKRI, CCP-EM, UK Cryo-EM validation group, the MRC-LMB for creative environment and the users for their valuable feedback.

A.1. Local correlation in real space

77Let ψ(x) and m(x) be two functions where the latter is normalized

78Then the local averages of ψ(x) with the kernel m(x) can be written as a convolution operation:

79This can be calculated using the convolution theorem:

80where F is the Fourier transformation operator and F − 1 is its inverse.

81Similarly, the local covariance between ψ 1 (x) and ψ 2 (x) is given by

82The local correlation between the two functions can be written as

83Now, let us assume that there are two noisy maps, each has

84where ψ i (x) and n i (x) are the signal and the noise components in i th map.

85If the noise components between the maps, and the noise and signal within as well as between maps are uncorrelated, then the local variance and covariance can be written:

86cov 12,m (ψ 1,n (x), ψ 2,n (x)) = cov 12,m (ψ 1 (x), ψ 2 (x) )

87And finally, the local correlation can be written

88̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅ var 1,m (ψ 1 (x) ) + var 1,m (n 1 (x)) √ ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅ var 2,m (ψ 2 (x) ) + var 2,m (n 2 (x)) √ .

89If two maps are cryo-EM half maps, then they share a common signal. In addition, if the noise components have the same variance for both halves then the following relationships hold cov(ψ 1 (x), ψ 2 (x) ) = var(ψ 1 (x) ) = var(ψ 2 (x) ) (A10) var(n 1 (x) ) = var(n 2 (x) ) = 2var(n(x) )

90where var(n(x) ) is the noise variance in the averaged map. Thus, the local correlation between half maps is:

91The corresponding local correlation in the full map (Rosenthal and Henderson, 2003) is

A.2. Relationship between correlations

92Let us assume that we have a map with the Fourier coefficients F o (s). The observation was made for the true map with the Fourier coefficients F t (s). And we have a model describing the true map with the Fourier coefficients F c (s). We assume that noise on the observations F n (s) is additive as well as that noise and signal are uncorrelated:

93We also assume that noise in the observation is uncorrelated with the Fourier coefficients from atomic model (cov(F c , F n ) = 0). Correlation between observed and calculated Fourier coefficients calculated within thin resolution shells is:

94Since we assume that the correlation between observed noise and atomic model is zero we can write:

95Correlation between observed and "true" Fourier coefficients can be written as:

96If we multiply the numerator and denominator of (A17) by

̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅ var(F t (s))

97√ then we can write:

98In practice we do not know "true" Fourier coefficients. However, if we can assume that we have two independent data sets (i.e. independent half data reconstructions) then we can use the expression (Rosenthal and Henderson, 2003) cor (F o

99Therefore, we can write:

100Although formulas are derived for correlations calculated in Fourier space, under above assumptions (uncorrelatedness of the noise and true and the noise and model) they are valid also for real space correlation.

B.1. Calculation of variances and covariances using the data

101Let us assume that we have N observations and they are made for "true" maps. Noise is additive and uncorrelated with each other and with the signals. We also have half data reconstructed maps for each map. Thus:

102The noise components between half maps are uncorrelated, they have 0 mean and they have the same variance (i.e σ 2 o,j,h1 = σ 2 o,j,h2 ). Variances are calculated within resolution bins. This is described in a number of papers (Murshudov, 2016;Rosenthal and Henderson, 2003).

103Covariances between different maps within resolution bins are calculated using the formula:

104where N i is the number of Fourier coefficients within the resolution bin b i . Then the covariances are:

105And using the half maps:

106Using (B7) and (B8), variance of the noise for each map is calculated. It should be noted that when maps are being fitted into each other, the covariance matrix should be recalculated at every cycle. Also, the covariances should be adjusted to account for the effect of a mask (Chen et al., 2013).

C.1. Derivation of likelihood function and posterior probability distribution

107Let us assume that we have N observed maps with Fourier coefficients -F o (s) = (F o,1 (s),F o,2 (s),⋯.,F o,N (s)). Each of F o,j (s) is a complex number, i.e. it has two componentsreal and imaginary. Let us assume that these observations have been made for N "true" maps -F t (s) = (F t,1 (s),F t,2 (s),⋯.,F t,N (s)).

108In practice, the number of "true" maps could be less than the number of observed maps.

109We assume that the underlying signals in those maps are related. For instance, those maps can be liganded-unliganded protein complexes, molecules in slightly different conformations, or related but not exactly the same macromolecules. Let us assume that for each "true" map we have a model usually an atomic model from which we can calculate Fourier coefficients accounting for the nature of the experiment: F c (s) = (F c,1 (s), F c,2 (s), ⋯., F c,N (s)). We further assume that noise in the observations is additive, independent and with zero mean normal distribution.

110We also assume that the conditional probability distributions of Fourier coefficients of the maps given the Fourier coefficients of true signals are Gaussian. Because of the central limit theorem this assumption holds in practice with sufficient accuracy.

111where N 2 denotes two-dimensional normal distribution with mean equal to k j (s)F t,j (s) and variance equal to 1 2 σ 2 n,j . k j is the scale parameter for the "true" map number j implying that "true" signal is blurred with a position independent point spread function before/during observations and/or data processing. Under an assumption that blurring is with an isotropic Gaussian kernel then k j can be expressed in a form of Gaussian with a B value, k 0,j e − B j |s| 2 4 . We will further assume that the "true" signals are on the same coordinate frame, however, observations may have been made for rotated and translated molecules. Then the probability distribution of individual Fourier coefficients will have the form:

112To get the total conditional probability distribution of observed Fourier coefficients all individual components are multiplied. Then, we can apply transformations to the observed Fourier coefficients. To do this, it is assumed that variances of noise are the same on the surface of each sphere with a radius |s|. We also ignore correlation between different Fourier coefficients after transformation:

113The probability distribution of the "true" Fourier coefficients given atomic model is also Gaussian, justification of which can be found in (Luzzati, 1952). Since "true" maps are related, we need to account for the relationship between different maps. We assume that the distribution of all "true" maps given all atomic models is Gaussian. This form of the distribution can be derived using the same technique used by Luzzati or the central limit theorem:

114where the subscript 2N signifies 2 N dimensional normal distribution. D is a diagonal matrix formed by scale factors between calculated and "true" Fourier coefficients and Σ is the matrix of covariances

115j ) * > to be estimated using data and atomic model. We also assume that observations are conditionally independent on model if the true map is known. In other words, if we know the true map, then atomic models would not say anything more about observations. Then the joint probability distribution of observed and "true" Fourier coefficients can be written as (Murshudov, 2016):

116Since both distributions on the right-hand side are Gaussian, their product also will be Gaussian. In a multivariate Gaussian probability distribution, both marginal (integrating out some of the random variables) and conditional probability distributions of one subset given another subset of random variables are also Gaussian distributions (Eaton, 2007). To fully specify a Gaussian distribution, we need its mean vector and the covariance matrix.

117Likelihood function is derived by integrating out the "true" unknown Fourier coefficients from the joint probability distribution of observations and "true" Fourier coefficients. I.e. it is a marginal probability distribution of observed Fourier coefficients. Since we know that the resultant probability distribution will be Gaussian with the mean and covariance matrix equal to the corresponding terms of the joint probability distribution of observed and "true" Fourier coefficients, we only need to find these terms. Since we know that:

118Therefore:

119These fully specify the probability distribution of observed Fourier coefficients given calculated one. In practice, we cannot estimate all k j without additional information. Relative scale values between observations i and j, k i k − 1 j , can be estimated using observed maps. Coming back to our matrix/vector form using short notations F o , F t , F c for F o (s), F t (s), F c (s) for clarity, we have

120where Σ is the covariance matrix of "true" map without blurring and Σ o,s = k T Σk = kΣk is the covariance matrix calculated using observed maps including half maps (Appendix B), k is a diagonal matrix formed by the scale factors of "true" Fourier coefficient.

121In the absence of models (D→0), the probability distribution will have the form:

122where atoms signifies that observations are made for a molecule that consists of atoms, but we do not know their positions. The negative log likelihood function including all Fourier coefficients has the form:

123The formula (C13) is used in EMDA to estimate rotations and translations of maps into each other as well as for magnification refinement. EMDA uses a special case of this, the two-observation case to fit two maps into each other. In general, R is a rotation matrix. However, if we relax this condition then we can also account for relative magnification of maps. If the only difference between maps is the relative isotropic magnification, then R will become a diagonal matrix where diagonal elements are relative magnification parameter.

124Posterior probability of "true" Fourier coefficients given observations and atomic model is a conditional probability distribution of "true" maps given observations and model parameters:

125Again, the conditional probability distribution of a subset of random variables given another subset of variables in multivariate Gaussian distribution is also a Gaussian distribution (Eaton, 2007). So, we need to find the mean and covariance matrix. We know that the logarithm of a Gaussian distribution is a quadratic function. Argument that maximises this function is the mean of the random variable and the second derivative of this function with respect to the random variable we are interested in is related to the covariance matrix:

126We need to find the argument that maximises the following function and its second derivative:

127Since the third term on the RHS does not depend on F t it can be ignored. We can also ignore normalisation coefficients in the probability distributions, because they depend on covariances not on the "true" Fourier coefficients.

128In the following treatment, we will use the fact that all involved matrices are symmetric. The covariance matrix is symmetric by its nature, and the rest of the matrices are diagonal and therefore symmetric.

129So, we need to get the derivatives of (after ignoring terms independent on F t ):

130We can write:

131To find the maximum we need to solve:

132It can be conveniently solved:

133It shows that the mean value of the posterior probability distribution is a linear combination of observed and calculated Fourier coefficients with suitable weights.

134Using the properties of matrices and their inverses we can write these formulas in a more convenient way:

135A special case of this when there is one model and one observation is considered in (Yamashita et al., 2021). When there are no atomic models then D→0 and the formula becomes:

136Further we denote Σ o,s = kΣk that can be estimated using the observed data:

137For completeness we also give the covariance matrix of the posterior probability distribution of the "true" Fourier coefficients (this can be used for estimation posterior noise variance and covariances in the calculated maps):

138Since not all components of k can be estimated using the observations only, for current calculations we replace the elements of k with the standard deviations of the observed signal k j = ̅̅̅̅̅̅̅ ̅ Σ o,jj √ (explained in (Yamashita et al., 2021)). If k 1 is a diagonal matrix formed with

̅̅̅̅̅̅̅̅̅̅̅̅̅̅ ̅

139Σ o,jj+ σ 2 j √ then we can write:

140Here we used the notation E o,j = Fo,j ̅̅̅̅̅̅̅̅̅̅̅ ̅ Σ o,jj +σ 2 j √ . We recognise that ρ s = k − 1 Σ o,s k − 1 is the correlation matrix between "true" maps, ̅̅̅̅̅̅ ̅ f sc √ = kk − 1 1 is the diagonal matrix formed with square root of fullmap FSCs, ρ o = k − 1 1 (Σ o,s +σ 2 )k − 1 1 is the correlation matrix between observed maps. Now we can write:

141When there is only one map then this formula gives normalised and fsc weighted map. Next, we consider the case when N = 2. Then we can write the formulas in an explicit form:

142It must be stressed that since correlations are calculated using observed maps and when signal to noise ratio is very small then this estimation can vary dramatically. Therefore, for accurate estimations we may need to improve the estimation of the correlations, especially those between signal components, for example using smoothening or using prior knowledge derived from the PDB.

D.1. Use of normalized and weighted maps in local correlation calculation

143In order to compare local correlations calculated using various maps, they need to be weighted appropriately in the same way. The normalized expected map for a single map according to Bayesian interpretation is

144F o is the observed Fourier coefficients, and w 1 = Σo,s Σo,s+σ 2 1 k in which Σ o,s and σ 2 are the covariance and the noise variance in the fullmap estimated using half maps in resolution bins as explained in Appendix B. k is a scale factor that associated with distortions of the true signal such as blurring. In the current implementation, k is replaced with the standard deviation of the observed signal (i.e. k(s) = ̅̅̅̅̅̅̅ Σ o,s √ ) to yield

145While FSC-type weighting dampening down the noise, the normalisation works as a position independent deblurring operation. Similar to (D1), weights can be assigned on the calculated map as follows:

146where F c are calculated Fourier coefficients. The weights on calculated Fourier coefficients should be selected to dampen high resolution frequencies as in the weighted observed maps. Otherwise, the variance contribution of calculated high-resolution Fourier coefficients will reduce the correlation making it incomparable to that calculated for observed maps. We would also like to remove overall B value effect as in (D2). This way correlation in observed maps calculated using half maps will be comparable to that calculated between observed and calculated maps. To achieve this, we chose

참고문헌 65건

  1. EMRinger: side chain–directed model and map validation for 3D cryo-electron microscopy Nature Methods · Nature Portfolio · 2015 10.1038/nmeth.3541
  2. F2PY: a tool for connecting Fortran and Python programs International Journal of Computational Science and Engineering · Inderscience Publishers · 2009 10.1504/ijcse.2009.029165
  3. Combining Electron Microscopic with X-Ray Crystallographic Structures Journal of Structural Biology · Elsevier BV · 2001 10.1006/jsbi.2002.4435
  4. Real‐space refinement with DireX: From global fitting to side‐chain improvements Biopolymers · Wiley · 2012 10.1002/bip.22046
  5. Web server for tilt-pair validation of single particle maps from electron cryomicroscopy Journal of Structural Biology · Elsevier BV · 2014 10.1016/j.jsb.2014.02.012
  6. Cryo-EM Structure of a Fully Glycosylated Soluble Cleaved HIV-1 Envelope Trimer Science · American Association for the Advancement of Science · 2013 10.1126/science.1245627
  7. Two structural configurations of the skeletal muscle calcium release channel Nature Structural & Molecular Biology · Nature Portfolio · 1996 10.1038/nsb0696-547
  8. Matplotlib: A 2D Graphics Environment Computing in Science & Engineering · AIP Publishing · 2007 10.1109/mcse.2007.55
  9. Traitement statistique des erreurs dans la determination des structures cristallines Acta Crystallographica · Wiley · 1952 10.1107/s0365110x52002161
  10. The Resolution Revolution Science · American Association for the Advancement of Science · 2014 10.1126/science.1251652
  11. Similarity measures between images Ultramicroscopy · Elsevier BV · 1987 10.1016/0304-3991(87)90010-6
  12. High-resolution noise substitution to measure overfitting and validate resolution in 3D structure determination by single particle electron cryomicroscopy Ultramicroscopy · Elsevier BV · 2013 10.1016/j.ultramic.2013.06.004
  13. A method of focused classification, based on the bootstrap 3D variance analysis, and its application to EF-G-dependent translocation Journal of Structural Biology · Elsevier BV · 2006 10.1016/j.jsb.2005.12.013
  14. Prevention of overfitting in cryo-EM structure determination Nature Methods · Nature Portfolio · 2012 10.1038/nmeth.2115
  15. Electronic detectors for electron microscopy Quarterly Reviews of Biophysics · Cambridge University Press · 2011 10.1017/s0033583511000035
  16. Molecular dynamics flexible fitting: A practical guide to combine cryo-electron microscopy and X-ray crystallography Methods · Elsevier BV · 2009 10.1016/j.ymeth.2009.04.005
  17. MRC2014: Extensions to the MRC format header for electron cryo-microscopy and tomography Journal of Structural Biology · Elsevier BV · 2015 10.1016/j.jsb.2015.04.002
  18. Tools for macromolecular model building and refinement into electron cryo-microscopy reconstructions Acta Crystallographica Section D Biological Crystallography · Wiley · 2014 10.1107/s1399004714021683
  19. Direct and indirect roles of His‐418 in metal binding and in the activity of β‐galactosidase (<i>E. coli</i>) Protein Science · Wiley · 2009 10.1002/pro.140
  20. EMAN2: An extensible image processing suite for electron microscopy Journal of Structural Biology · Elsevier BV · 2006 10.1016/j.jsb.2006.05.009
  21. Linking Crystallographic Model and Data Quality Science · American Association for the Advancement of Science · 2012 10.1126/science.1218231
  22. Protein Structure Fitting and Refinement Guided by Cryo-EM Density Structure · Elsevier BV · 2008 10.1016/j.str.2007.11.016
  23. Docking structures of domains into maps from cryo-electron microscopy using local correlation Acta Crystallographica Section D Biological Crystallography · Wiley · 2000 10.1107/s0907444900010908
  24. Features and development of <i>Coot</i> Acta Crystallographica Section D Biological Crystallography · Wiley · 2010 10.1107/s0907444910007493
  25. A New Generation of Crystallographic Validation Tools for the Protein Data Bank Structure · Elsevier BV · 2011 10.1016/j.str.2011.08.006
  26. Fitting atomic models into electron-microscopy maps Acta Crystallographica Section D Biological Crystallography · Wiley · 2000 10.1107/s0907444900009562
  27. UCSF Chimera—A visualization system for exploratory research and analysis Journal of Computational Chemistry · Wiley · 2004 10.1002/jcc.20084
  28. Outcome of the First Electron Microscopy Validation Task Force Meeting Structure · Elsevier BV · 2012 10.1016/j.str.2011.12.014
  29. Ribosome Binding of a Single Copy of the SecY Complex: Implications for Protein Translocation Molecular Cell · Elsevier BV · 2007 10.1016/j.molcel.2007.10.034
  30. Beam-induced motion correction for sub-megadalton cryo-EM particles eLife · eLife Sciences Publications Ltd · 2014 10.7554/elife.03665
  31. Electron counting and beam-induced motion correction enable near-atomic-resolution single-particle cryo-EM Nature Methods · Nature Portfolio · 2013 10.1038/nmeth.2472
  32. Optimal Determination of Particle Orientation, Absolute Hand, and Contrast Loss in Single-particle Electron Cryomicroscopy Journal of Molecular Biology · Elsevier BV · 2003 10.1016/j.jmb.2003.07.013
  33. Statistical quality indicators for electron-density maps Acta Crystallographica Section D Biological Crystallography · Wiley · 2012 10.1107/s0907444911035918
  34. Automated structure refinement of macromolecular assemblies from cryo-EM maps using Rosetta eLife · eLife Sciences Publications Ltd · 2016 10.7554/elife.17219
  35. Refinement of Atomic Structures Against cryo-EM Maps Methods in enzymology on CD-ROM/Methods in enzymology · Academic Press · 2016 10.1016/bs.mie.2016.05.033
  36. Recent developments in the<i>CCP-EM</i>software suite Acta Crystallographica Section D Structural Biology · 2017 10.1107/s2059798317007859
  37. Real-space refinement in <i>PHENIX</i> for cryo-EM and crystallography Acta Crystallographica Section D Structural Biology · 2018 10.1107/s2059798318006551
  38. New tools for the analysis and validation of cryo-EM maps and atomic models Acta Crystallographica Section D Structural Biology · 2018 10.1107/s2059798318009324
  39. Atomic Resolution Cryo-EM Structure of β-Galactosidase Structure · Elsevier BV · 2018 10.1016/j.str.2018.04.004
  40. <i>ISOLDE</i>: a physically realistic environment for model building into low-resolution electron-density maps Acta Crystallographica Section D Structural Biology · 2018 10.1107/s2059798318002425
  41. Current approaches for the fitting and refinement of atomic models into cryo-EM maps using<i>CCP-EM</i> Acta Crystallographica Section D Structural Biology · 2018 10.1107/s2059798318007313
  42. Thresholding of cryo-EM density maps by false discovery rate control IUCrJ · International Union of Crystallography · 2018 10.1107/s2052252518014434
  43. Protein Shape Description and its Application to Shape Comparison 2018 10.17863/cam.31783
  44. Challenges and opportunities in cryo-EM single-particle analysis Journal of Biological Chemistry · Elsevier BV · 2019 10.1074/jbc.rev118.005602
  45. Cryo-EM structure of haemoglobin at 3.2 Å determined with the Volta phase plate Nature Communications · Nature Portfolio · 2017 10.1038/ncomms16099
  46. Cryo_fit: Democratization of flexible fitting for cryo-EM Journal of Structural Biology · Elsevier BV · 2019 10.1016/j.jsb.2019.05.012
  47. Methods for merging data sets in electron cryo-microscopy Acta Crystallographica Section D Structural Biology · 2019 101107s2059798319010519
  48. New tools in MolProbity validation: CaBLAM for CryoEM backbone, UnDowser to rethink “waters,” and NGL Viewer to recapture online 3D graphics Protein Science · Wiley · 2019 10.1002/pro.3786
  49. Point-group symmetry detection in three-dimensional charge density of biomolecules Bioinformatics · Oxford University Press · 2019 10.1093/bioinformatics/btz904
  50. Fragment-based drug discovery using cryo-EM Drug Discovery Today · Elsevier BV · 2019 10.1016/j.drudis.2019.12.006
  51. A New Strategy for Atomic Flexible Fitting in Cryo-EM Maps by Molecular Dynamics with Excited Normal Modes (MDeNM-EMfit) Journal of Chemical Information and Modeling · American Chemical Society · 2020 10.1021/acs.jcim.9b01148
  52. Evolving data standards for cryo-EM structures Structural Dynamics · AIP Publishing · 2020 10.1063/1.5138589
  53. SciPy 1.0: fundamental algorithms for scientific computing in Python Nature Methods · Nature Portfolio · 2020 10.1038/s41592-019-0686-2
  54. Measurement of atom resolvability in cryo-EM maps with Q-scores Nature Methods · Nature Portfolio · 2020 10.1038/s41592-020-0731-1
  55. Array programming with NumPy Nature · Nature Portfolio · 2020 10.1038/s41586-020-2649-2
  56. SARS-CoV-2 and bat RaTG13 spike glycoprotein structures inform on virus evolution and furin-cleavage effects Nature Structural & Molecular Biology · Nature Portfolio · 2020 10.1038/s41594-020-0468-7
  57. Controlling the SARS-CoV-2 spike glycoprotein conformation Nature Structural & Molecular Biology · Nature Portfolio · 2020 10.1038/s41594-020-0479-4
  58. <scp>UCSF ChimeraX</scp>: Structure visualization for researchers, educators, and developers Protein Science · Wiley · 2020 10.1002/pro.3943
  59. Free fatty acid binding pocket in the locked structure of SARS-CoV-2 spike protein Science · American Association for the Advancement of Science · 2020 10.1126/science.abd3255
  60. Array programming with NumPy Nature · Nature Portfolio · 2020 10.1038/s41586-020-2649-2
  61. SciPy 1.0: fundamental algorithms for scientific computing in Python Nature Methods · Nature Portfolio · 2020 10.1038/s41592-019-0686-2
  62. <i>TEMPy</i>2: a Python library with improved 3D electron microscopy density-fitting and validation workflows Acta Crystallographica Section D Structural Biology · 2020 10.1107/s2059798320014928
  63. FSC-Q: a CryoEM map-to-atomic model quality validation based on the local Fourier shell correlation Nature Communications · Nature Portfolio · 2021 10.1038/s41467-020-20295-w
  64. Cryo-EM single-particle structure refinement and map calculation using<i>Servalcat</i> Acta Crystallographica Section D Structural Biology · 2021 10.1107/s2059798321009475
  65. Methods for merging data sets in electron cryo-microscopy Acta Crystallographica Section D Structural Biology · 2019 10.1107/s2059798319010519