Real-time cryo-electron microscopy data preprocessing with Warp


The acquisition of cryo-electron microscopy (cryo-EM) data from biological specimens must be tightly coupled to data preprocessing to ensure the best data quality and microscope usage. Here we describe Warp, a software that automates all preprocessing steps of cryo-EM data acquisition and enables real-time evaluation. Warp corrects micrographs for global and local motion, estimates the local defocus and monitors key parameters for each recorded micrograph or tomographic tilt series in real time. The software further includes deep-learning-based models for accurate particle picking and image denoising. The output from Warp can be fed into established programs for particle classification and 3D-map refinement. Our benchmarks show improvement in the nominal resolution, which went from 3.9 Å to 3.2 Å, of a published cryo-EM data set for influenza virus hemagglutinin. Warp is easy to install from and computationally inexpensive, and has an intuitive, streamlined user interface.

Access options

Rent or Buy article

Get time limited or full article access on ReadCube.


All prices are NET prices.

Fig. 1: Warp handles all preprocessing steps in the 2D cryo-EM pipeline.
Fig. 2: Automated particle picking with Warp’s deep-learning-based BoxNet.
Fig. 3: Warp’s 2D pipeline improves cryo-EM density for the influenza hemagglutinin trimer.
Fig. 4: Warp’s 2D pipeline in combination with RELION 3.0 improves cryo-EM density for β-galactosidase (using the published EMPIAR-10061 dataset).
Fig. 5: Effect of using the full local 3D CTF for template matching in tomograms.
Fig. 6: Sub-tomogram averaging results obtained by using Warp’s tilt series CTF estimation and sub-tomogram export.

Data availability

Figure 1 and Supplementary Fig. 1 use exemplary data from EMPIAR-10078. Figure 2 uses a cryo-EM image of RNA Pol II complexes, available from the authors upon request. Figure 3 and the benchmark section use data from EMPIAR-10097 re-analyzed in this study. The refined maps shown in Fig. 3a are available in Supplementary Data 14. The ‘Full Warp pipeline’ map shown in Fig. 3a has been deposited in EMDB as EMD-0025. Figure 4 and the benchmark section use data from EMPIAR-10061 re-analyzed in this study, the 1.86 Å map shown in Fig. 4a is available as Supplementary Data 5. Figure 5a uses a tomogram reconstructed from data from EMPIAR-10045. Figure 6 and the benchmark section use data from EMPIAR-10045 and EMPIAR-10164 re-analyzed in this study, the maps shown in Fig. 6a,b are available in Supplementary Data 6 and 7, respectively. Supplementary Fig. 2 uses exemplary data from EMPIAR-10061. Supplementary Fig. 3 uses exemplary data from EMPIAR-10097. Supplementary Fig. 5 uses in-house data, available upon request. Supplementary Fig. 6 uses exemplary data from EMPIAR-10078. Supplementary Fig. 7 uses exemplary data from (left) EMPIAR-10078, (center) in-house data available upon request, and (right) EMPIAR-10153. Training data for BoxNet can be accessed through

Code availability

Warp binaries, source code and user guide are available as Supplementary Software and can be downloaded from BoxNet source code can be downloaded from


  1. 1.

    Saibil, H. R., Grünewald, K. & Stuart, D. I. A national facility for biological cryo-electron microscopy. Acta Crystallogr. D. 71, 127–135 (2015).

    CAS  PubMed  Google Scholar 

  2. 2.

    Suloway, C. et al. Automated molecular microscopy: the new Leginon system. J. Struct. Biol. 151, 41–60 (2005).

    CAS  PubMed  Google Scholar 

  3. 3.

    Brilot, A. F. et al. Beam-induced motion of vitrified specimen on holey carbon film. J. Struct. Biol. 177, 630–637 (2012).

    CAS  PubMed  PubMed Central  Google Scholar 

  4. 4.

    Huang, Z., Baldwin, P. R., Mullapudi, S. & Penczek, P. A. Automated determination of parameters describing power spectra of micrograph images in electron microscopy. J. Struct. Biol. 144, 79–94 (2003).

    PubMed  Google Scholar 

  5. 5.

    van Heel, M. Detection of objects in quantum-noise-limited images. Ultramicroscopy 7, 331–341 (1982).

    Google Scholar 

  6. 6.

    Li, X. et al. Electron counting and beam-induced motion correction enable near-atomic-resolution single-particle cryo-EM. Nat. Methods 10, 584–590 (2013).

    CAS  PubMed  PubMed Central  Google Scholar 

  7. 7.

    Grant, T. & Grigorieff, N. Measuring the optimal exposure for single particle cryo-EM using a 2.6 Å reconstruction of rotavirus VP6. eLife 4, e06980 (2015).

    PubMed  PubMed Central  Google Scholar 

  8. 8.

    Mastronarde, D. N. Automated electron microscope tomography using robust prediction of specimen movements. J. Struct. Biol. 152, 36–51 (2005).

    PubMed  Google Scholar 

  9. 9.

    Zheng, S. Q. et al. MotionCor2: anisotropic correction of beam-induced motion for improved cryo-electron microscopy. Nat. Methods 14, 331–332 (2017).

    CAS  PubMed  PubMed Central  Google Scholar 

  10. 10.

    Rubinstein, J. L. & Brubaker, M. A. Alignment of cryo-EM movies of individual particles by optimization of image translations. J. Struct. Biol. 192, 188–195 (2015).

    PubMed  Google Scholar 

  11. 11.

    McLeod, R. A., Kowal, J., Ringler, P. & Stahlberg, H. Robust image alignment for cryogenic transmission electron microscopy. J. Struct. Biol. 197, 279–293 (2017).

    CAS  PubMed  Google Scholar 

  12. 12.

    Rohou, A. & Grigorieff, N. CTFFIND4: Fast and accurate defocus estimation from electron micrographs. J. Struct. Biol. 192, 216–221 (2015).

    PubMed  PubMed Central  Google Scholar 

  13. 13.

    Bell, J. M., Chen, M., Baldwin, P. R. & Ludtke, S. J. High resolution single particle refinement in EMAN2.1. Methods (San. Diego, Calif.) 100, 25–34 (2016).

    CAS  Google Scholar 

  14. 14.

    Zhang, K. Gctf: Real-time CTF determination and correction. J. Struct. Biol. 193, 1–12 (2016).

    CAS  PubMed  PubMed Central  Google Scholar 

  15. 15.

    Scheres, S. H. Semi-automated selection of cryo-EM particles in RELION-1.3. J. Struct. Biol. 189, 114–122 (2015).

    CAS  PubMed  PubMed Central  Google Scholar 

  16. 16.

    Roseman, A. M. FindEM-a fast, efficient program for automatic selection of particles from electron micrographs. J. Struct. Biol. 145, 91–99 (2004).

    CAS  PubMed  Google Scholar 

  17. 17.

    Chen, J. Z. & Grigorieff, N. SIGNATURE: a single-particle selection system for molecular electron microscopy. J. Struct. Biol. 157, 168–173 (2007).

    CAS  PubMed  Google Scholar 

  18. 18.

    Sorzano, C. et al. Automatic particle selection from electron micrographs using machine learning techniques. J. Struct. Biol. 167, 252–260 (2009).

    CAS  PubMed  PubMed Central  Google Scholar 

  19. 19.

    Wang, F. et al. DeepPicker: A deep learning approach for fully automated particle picking in cryo-EM. J. Struct. Biol. 195, 325–336 (2016).

    PubMed  Google Scholar 

  20. 20.

    Lander, G. C. et al. Appion: an integrated, database-driven pipeline to facilitate EM image processing. J. Struct. Biol. 166, 95–102 (2009).

    CAS  PubMed  PubMed Central  Google Scholar 

  21. 21.

    Biyani, N. et al. Focus: The interface between data collection and data processing in cryo-EM. J. Struct. Biol. 198, 124–133 (2017).

    CAS  PubMed  Google Scholar 

  22. 22.

    de la Rosa-Trevin, J. M. et al. Scipion: A software framework toward integration, reproducibility and validation in 3D electron microscopy. J. Struct. Biol. 195, 93–99 (2016).

    PubMed  Google Scholar 

  23. 23.

    Scheres, S. H. RELION: implementation of a Bayesian approach to cryo-EM structure determination. J. Struct. Biol. 180, 519–530 (2012).

    CAS  PubMed  PubMed Central  Google Scholar 

  24. 24.

    Punjani, A., Rubinstein, J. L., Fleet, D. J. & Brubaker, M. A. cryoSPARC: algorithms for rapid unsupervised cryo-EM structure determination. Nat. Methods 14, 290 (2017).

    CAS  PubMed  PubMed Central  Google Scholar 

  25. 25.

    Tan, Y. Z. et al. Addressing preferred specimen orientation in single-particle cryo-EM through tilting. Nat. Methods 14, 793–796 (2017).

    CAS  PubMed  PubMed Central  Google Scholar 

  26. 26.

    Hagen, W. J. H., Wan, W. & Briggs, J. A. G. Implementation of a cryo-electron tomography tilt-scheme optimized for high resolution subtomogram averaging. J. Struct. Biol. 197, 191–198 (2017).

    PubMed  PubMed Central  Google Scholar 

  27. 27.

    Campbell, M. G. et al. Movies of ice-embedded particles enhance resolution in electron cryo-microscopy. Structure 20, 1823–1828 (2012).

    CAS  PubMed  PubMed Central  Google Scholar 

  28. 28.

    Noble, A. J. et al. Routine single particle cryoem sample and grid characterization by tomography. eLife 7, e34257 (2018).

    PubMed  PubMed Central  Google Scholar 

  29. 29.

    Lecun, Y., Bottou, L., Bengio, Y. & Haffner, P. Gradient-based learning applied to document recognition. Proc. IEEE 86, 2278–2324 (1998).

    Google Scholar 

  30. 30.

    Krizhevsky, A., Sutskever, I. & Hinton, G. E. ImageNet classification with deep convolutional neural networks. Proc. 25th Int. Conf. Neural Inf. Process. Syst. 1, 1097–1105 (2012).

    Google Scholar 

  31. 31.

    He, K., Zhang, X., Ren, S. & Sun, J. Deep residual learning for image recognition. IEEE Conference on Computer Vision and Pattern Recognition (CVPR). 770–778 (IEEE, 2016).

  32. 32.

    Abadi, M. et al. TensorFlow: a system for large-scale machine learning. Proceedings of the 12th USENIX conference on Operating Systems Design and Implementation 265–283 (IEEE, 2016).

  33. 33.

    Iudin, A., Korir, P. K., Salavert-Torres, J., Kleywegt, G. J. & Patwardhan, A. EMPIAR: a public archive for raw electron microscopy image data. Nat. Methods 13, 387–388 (2016).

    CAS  PubMed  Google Scholar 

  34. 34.

    Berman, H. M. et al. The Protein Data Bank. Nucleic Acids Res. 28, 235–242 (2000).

    CAS  PubMed  PubMed Central  Google Scholar 

  35. 35.

    Wagner, T. et al. SPHIRE-crYOLO is a fast and accurate fully automated particle picker for cryo-EM. Commun. Biol. 2, 218 (2019).

    PubMed  PubMed Central  Google Scholar 

  36. 36.

    Zivanov, J. et al. RELION-3: new tools for automated high-resolution cryo-EM structure determination. eLife 7, e42166 (2018).

    PubMed  PubMed Central  Google Scholar 

  37. 37.

    Tagari, M., Newman, R., Chagoyen, M., Carazo, J. M. & Henrick, K. New electron microscopy database and deposition system. Trends Biochem. Sci. 27, 589 (2002).

    CAS  PubMed  Google Scholar 

  38. 38.

    Henderson, R. Avoiding the pitfalls of single particle cryo-electron microscopy: Einstein from noise. Proc. Natl Acad. Sci. USA 110, 18037–18041 (2013).

    CAS  PubMed  Google Scholar 

  39. 39.

    Bartesaghi, A. et al. 2.2 A resolution cryo-EM structure of beta-galactosidase in complex with a cell-permeant inhibitor. Science 348, 1147–1151 (2015).

    CAS  PubMed  PubMed Central  Google Scholar 

  40. 40.

    Bharat, T. A. & Scheres, S. H. Resolving macromolecular structures from electron cryo-tomography data using subtomogram averaging in RELION. Nat. Protoc. 11, 2054–2065 (2016).

    CAS  PubMed  PubMed Central  Google Scholar 

  41. 41.

    Turonova, B., Schur, F. K. M., Wan, W. & Briggs, J. A. G. Efficient 3D-CTF correction for cryo-electron tomography using NovaCTF improves subtomogram averaging resolution to 3.4A. J. Struct. Biol. 199, 187–195 (2017).

    CAS  PubMed  PubMed Central  Google Scholar 

  42. 42.

    Nocedal, J. Updating quasi-Newton matrices with limited storage. Math. Comput. 35, 773–773 (1980).

    Google Scholar 

  43. 43.

    Sorzano, C. O., Otero, A., Olmos, E. M. & Carazo, J. M. Error analysis in the determination of the electron microscopical contrast transfer function parameters from experimental power Spectra. BMC Struct. Biol. 9, 18 (2009).

    PubMed  PubMed Central  Google Scholar 

  44. 44.

    Penczek, P. A. et al. CTER—Rapid estimation of CTF parameters with error assessment. Ultramicroscopy 140, 9–19 (2014).

    CAS  PubMed  PubMed Central  Google Scholar 

  45. 45.

    Danev, R., Tegunov, D. & Baumeister, W. Using the Volta phase plate with defocus for cryo-EM single particle analysis. eLife 6, e23006 (2017).

    PubMed  PubMed Central  Google Scholar 

  46. 46.

    Voortman, L. M., Stallinga, S., Schoenmakers, R. H. M., Vliet, L. Jv & Rieger, B. A fast algorithm for computing and correcting the CTF for tilted, thick specimens in TEM. Ultramicroscopy 111, 1029–1036 (2011).

    CAS  PubMed  Google Scholar 

  47. 47.

    Schur, F. K. et al. An atomic model of HIV-1 capsid-SP1 reveals structures regulating assembly and maturation. Science 353, 506–508 (2016).

    CAS  PubMed  Google Scholar 

  48. 48.

    Xiong, Q., Morphew, M. K., Schwartz, C. L., Hoenger, A. H. & Mastronarde, D. N. CTF determination and correction for low dose tomographic tilt series. J. Struct. Biol. 168, 378–387 (2009).

    PubMed  PubMed Central  Google Scholar 

  49. 49.

    Bharat, T. A., Russo, C. J., Lowe, J., Passmore, L. A. & Scheres, S. H. Advances in Single-Particle Electron Cryomicroscopy Structure Determination applied to Sub-tomogram Averaging. Structure 23, 1743–1753 (2015).

    CAS  PubMed  PubMed Central  Google Scholar 

  50. 50.

    Hutchings, J., Stancheva, V., Miller, E. A. & Zanetti, G. Subtomogram averaging of COPII assemblies reveals how coat organization dictates membrane shape. Nat. Commun. 9, 4154 (2018).

    PubMed  PubMed Central  Google Scholar 

  51. 51.

    Russo, C. J. & Henderson, R. Ewald sphere correction using a single side-band image processing algorithm. Ultramicroscopy 187, 26–33 (2018).

    CAS  PubMed  PubMed Central  Google Scholar 

  52. 52.

    Grigorieff, N. FREALIGN: high-resolution refinement of single particle structures. J. Struct. Biol. 157, 117–125 (2007).

    CAS  PubMed  Google Scholar 

  53. 53.

    Kunz, M. & Frangakis, A. S. Three-dimensional CTF correction improves the resolution of electron tomograms. J. Struct. Biol. 197, 114–122 (2017).

    PubMed  Google Scholar 

  54. 54.

    Grant, T. & Grigorieff, N. Automatic estimation and correction of anisotropic magnification distortion in electron microscopes. J. Struct. Biol. 192, 204–208 (2015).

    PubMed  PubMed Central  Google Scholar 

  55. 55.

    Heymann, J. B., Chagoyen, M. & Belnap, D. M. Common conventions for interchange and archiving of three-dimensional electron microscopy information in structural biology. J. Struct. Biol. 151, 196–207 (2005).

    PubMed  Google Scholar 

  56. 56.

    Ronneberger, O., Fischer, P. & Brox, T. U-Net: Convolutional Networks for Biomedical Image Segmentation. In MICCAI 2015 Lecture Notes in Computer Science (eds N., Navab et al.) Vol 9351, 234–241 (Springer, 2015).

  57. 57.

    Vulovic, M. et al. Image formation modeling in cryo-electron microscopy. J. Struct. Biol. 183, 19–32 (2013).

    CAS  PubMed  Google Scholar 

  58. 58.

    Rickgauer, J. P., Grigorieff, N. & Denk, W. Single-protein detection in crowded molecular environments in cryo-EM images. eLife 6, e25648 (2017).

    PubMed  PubMed Central  Google Scholar 

  59. 59.

    Mao, X.-J., Shen, C. & Yang, Y.-B. Image restoration using convolutional auto-encoders with symmetric skip connections. Adv. Neural Inform. Proc. Syst. 29, 2802–2810 (2016).

    Google Scholar 

  60. 60.

    Iizuka, S., Simo-Serra, E. & Ishikawa, H. Globally and locally consistent image completion. ACM Trans. Graph. (TOG) 36, 107 (2017).

    Google Scholar 

  61. 61.

    Lehtinen, J. et al. Noise2Noise: learning image restoration without clean data. Preprint at (2018).

  62. 62.

    Kremer, J. R., Mastronarde, D. N. & McIntosh, J. R. Computer visualization of three-dimensional image data using IMOD. J. Struct. Biol. 116, 71–76 (1996).

    CAS  PubMed  PubMed Central  Google Scholar 

Download references


We thank members of the Cramer lab for beta-testing early versions of Warp and providing feedback on bugs in the software. We thank C. Bernecky, S. Dodonova, W. Hagen, D. Lyumkis, C. Plaschka, J. Söding and Y. Z. Tan for critical reading of the manuscript. PC was supported by ERC Advanced Grant TRANSREGULON (grant agreement no. 693023) of the European Research Council, the Deutsche Forschungsgemeinschaft (SFB 860) and the Volkswagen Foundation.

Author information




D.T. designed Warp’s architecture and all algorithms, and carried out all implementation and application. P.C. provided scientific environment, funding and additional interpretations and implications. D.T. and P.C. wrote the manuscript.

Corresponding authors

Correspondence to Dimitry Tegunov or Patrick Cramer.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Peer review information Allison Doerr was the primary editor on this article and managed its editorial process and peer review in collaboration with the rest of the editorial team.

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Integrated supplementary information

Supplementary Figure 1 User interface of Warp.

a, The processing settings (left) specify all steps and parameters for online data evaluation, correction and processing. The ‘Overview’ tab (right) presents all important processing results and lets the user specify selection filters to remove low-quality data. b, View of a single micrograph. In Fourier space (left), the simulated 2D CTF (i), the 1D power spectrum (PS) and its fit (ii), and the 2D PS (iii) are presented. The real space view (right) shows the aligned movie average with particle positions (green dots), motion tracks (white curves) and the defocus variation (transparent magenta-cyan overlay), and applies a deconvolution filter as well as denoising. Individual display elements can be shown or hidden. The navigation bar (bottom) shows the processing status for all items and allows to quickly switch between them as well as to manually exclude single items from processing.

Supplementary Figure 2 Deconvolution and denoising of a low-defocus micrograph.

a, A raw micrograph from EMPIAR-10061 acquired at 0.8 μm defocus. b, Same micrograph after applying deconvolution. Low-resolution contrast is boosted and the defocused signal is more localized, allowing to distinguish the particles better. c, Same micrograph after applying deconvolution and denoising with a noise2noise model retrained on this dataset. The shapes of individual 400-kDa proteins nearly invisible in the raw image can be distinguished clearly against the background. d, Shape and effect of the deconvolution filter. The filter largely reverses the effect of the first CTF peak, while also suppressing the lowest and higher frequencies.

Supplementary Figure 3 Motion and CTF model fitting by Warp.

The unaligned, defocused movie (i) is parametrized with a coarse grid (black dots), divided into patches for the alignment (ii), and power spectra of these patches are computed (iii) for CTF fitting. The motion model (iv) includes 2 components: global motion (cyan trajectory) with fine temporal and no spatial resolution, and local motion (magenta trajectories) with coarse temporal, and fine spatial resolution. Both components are optimized to minimize the squared difference between the individual patch frames and their aligned average. The spatially resolved CTF model (v) is optimized to minimize the squared difference between the power spectra (iii, upper left part of each patch) and the simulated local 2D CTF (iii, bottom right part of each patch). Here, the defocus gradient follows the 40° tilt of the specimen, with the notable exception of the hole edge in the bottom left corner.

Supplementary Figure 4 CTF fitting of flat, tilted and tilt series data.

Fitted spectra without (left column) and with (right column) a spatially resolved model. The samples are (a) flat (EMPIAR-10078), (b) tilted at 40° (EMPIAR-10097) and (c) a tilt series ranging from –60° to +60° (EMPIAR-10045). In all three cases, using a spatially resolved model allowed to fit the sample geometry more accurately, as evidenced by the clearer Thon rings in the rescaled, averaged 1D spectra. The fitting range (grey rectangle in the 1D spectra) was chosen well below the estimated resolution to avoid overfitting the higher number of parameters in the spatially resolved model.

Supplementary Figure 5 Unbiased particle picking with Warp’s BoxNet.

Examples of automated particle picking on samples not seen by BoxNet in training. For comparison, the same micrographs were picked with crYOLO’s generic model, and RELION’s Laplacian of Gaussian (LoG) method. Micrographs were selected from in-house data to make sure they were absent in crYOLO’s knowledge base. BoxNet reliably recognizes almost all particles (yellow), and masks out all artifacts (purple). LoG is often confused by high-contrast edges and ethane impurities. crYOLO performs better than LoG, but is also routinely confused by ethane impurities and protein aggregates, and misses many of the small particles (bottom row).

Supplementary Figure 6 Neural network architecture of BoxNet.

Rectangles depict the intermediate tensor dimensions. Their width and height are proportional to the number of channels and the spatial extent, respectively. Thick arrows represent convolution operations. Their format is encoded as ‘(Kx R), LxMxN /O’, where K is the number of consecutive ResNet blocks, or absent in case of a single convolution operation; L and M are the dimensions of the convolution kernel; N is the number of kernels, resulting in N channels in the output; O is the stride length (1 = no change, 2 = downsampling by factor of 2, 0.5 = upsampling by factor of 2 through transposed convolution). The stride parameter is only applied to the first convolution in a chain of ResNet blocks, whereas all subsequent convolutions use stride = 1. The contractive part of the network is colored in cyan, the expanding part in magenta. The final image shows the result of applying a per-pixel ArgMax operator to the result of the last convolution to obtain the spatial distribution of the three labels the model is trained to predict: background (black), particle (yellow), artifact (purple).

Supplementary Figure 7 Examples of data used to train BoxNet.

Examples of micrographs presented to BoxNet as input (top row), and the per-pixel labels used as the desired output during training (bottom row). The pixel classes predicted by BoxNet are background (black), particles (yellow), and artifacts (purple).

Supplementary information

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Tegunov, D., Cramer, P. Real-time cryo-electron microscopy data preprocessing with Warp. Nat Methods 16, 1146–1152 (2019).

Download citation

Further reading