CTFFIND 4

February 2015

What's new?

  • Much faster (approximately 10x)
  • Backward compatibility with CTFFIND 3 by giving --old-school-input. Should not break existing scripts
  • Completely rewritten, in object-oriented Fortran
  • New interactive user interface with friendly help
  • Improved output diagonstics, including an estimate of the maximum resolution at which Thon rings were detected
  • Outputs 1D profiles which accurately account for astigmatism
  • Accepts stack of micrographs as input
  • Accepts stack of movie frames as input
  • Finds the phase shift from micrographs collected using a phase plate
New in version 4.0.10: find phase shift due to phase plate, new command-line options to give amplitude spectra rather than images as input, buildable using GNU compilers (>=4.9.1), support for MRC mode 6 files, bug fixes New in version 4.0.8: improved contrast in diagnostic image, improved estimate of resolution at which Thon rings were detected, minor bug fixes

Why is it faster?

Mainly because the astigmatism azimuth angle is estimated separately from defocus parameters, making the search & refinement 2- rather than 3-dimensional. Also, many parts of the code were optimized for speed.

Does it do exactly the same thing as CTFFIND 3?

No, and it doesn't give exactly the same results, but the results should be very, very similar. Below are some of main differences in processing between CTFFIND 3 and CTFFIND 4: Other aspects of the algorithm have not changed from CTFFIND 3 to CTFFIND 4.

Should I switch from CTFFIND 3 to CTFFIND 4?

If you are working on micrographs which were collected on photographic film and scanned in, you should probably stick with CTFFIND 3, because micrograph features such as film labels or scratches may throw CTFFIND 4 off, whereas CTFFIND 3 should ignore them. Otherwise, if you are working on images from CCDs or direct detectors, you should switch to CTFFIND 4: it is significantly faster and may give better estimates of the power spectrum because it will not discard any part of the micrograph.

Should I use CTFFIND on unaligned movie frames, or on aligned and averaged frames?

If you think there may be significant errors in your alignment of the movie frames, it may be beneficial to give the unaligned frames as input to CTFFIND 4. If however you are confident in your frame alignment, giving the aligned average as input should give better results and will run much faster. In fact, using CTFFIND both ways for a few test micrographs may give you an indication of whether you had significant alignment errors.

Dependencies for ctffind_plot_results.sh script

This scripts requires

What is plotted by the ctffind_plot_results.sh script?

Here is an example of the output from the script:

Experimental power spectrum - green line

The green line is a 1D average of the experimental power spectrum obtained from the micrograph. It is computed by taking into account astigmatism. Also, it is normalised to optimise visualisation in the plot: One consequence of all these normalisation steps is that you should not use this 1D profile to estimate anything quantitative about, say, envelope functions of the microscope.

CTF fit - orange line

The orange line is a 1D average of the 2D theoretical CTF which was fit to the power spectrum. The 1D averaging is done taking astigmatism into account.

Quality of fit - blue line

The blue line plots a measure of the quality of fit between the theoretical CTF (orange) and the experimental power spectrum (green). The quality of fit is calculated once per "cycle" of the squared CTF - the interval from one maximum to the next. This estimate is computed as a normalised cross-correlation between the 1D profile of the experimental power spectrum and the 1D profile of the fit CTF.

How does ctffind estimate the highest spacing to which CTF rings were fit successfully?

This value is in the 6th column of the summary output .txt file. It is estimated as the last spatial frequency at which the quality of fit measure is still above 0.2 and the normalized 1D experimental power spectrum (green line) is within -2.0 and 2.0. This threshold was chosen heuristically. Please take this estimate with a pinch of salt.

Running ctffind4 from Relion

To use ctffind4 from Relion 1.3, you need to supply ctffind with the --old-school-input command-line flag. You also need to surround the whole command with double quotes. Here is a simplified example from the command line: --ctffind3_exe "/lmb/home/tmartin/programs/ctffind-4.0.9-linux64/ctffind --omp-num-threads 1 --old-school-input" Or from the Relion GUI, replace the executable with: "/lmb/home/tmartin/programs/ctffind-4.0.9-linux64/ctffind --omp-num-threads 1 --old-school-input"

Giving amplitude spectra as inputs

Rather than letting ctffind compute them from input micrographs, you can give your own amplitude spectra as inputs to the program. To do this, give --amplitude-spectrum-input at the command line. If you want to give amplitude spectra from which you have already subtracted the background (i.e. you just want ctffind to do CTF fitting, no processing of the spectra themselves), use option --filtered-amplitude-spectrum-input.

OpenMP threading

On most systems, the program will use as many OpenMP threads as are available. You can control how many threads are available using standard OpenMP means, such as setting the environment variable OMP_NUM_THREADS. In addition, you can use the command-line option --omp-num-threads=N or --omp-num-threads N to limit the program to N threads maximum.

Compiling from source

GNU-style configure & make scripts are provided. We recommend linking against Intel's MKL for faster Fourier transforms.

Author

CTFFIND 4 was written by Alexis Rohou. It is a rewrite of CTFFIND 3, written by Nikolaus Grigorieff.

Known issues

Bug reports, questions

Please direct requests for help and bug reports to the Grigorieff lab forum: http://grigoriefflab.janelia.org/ctf/forum