Defocus Determination Using Samdefocus.py

(Visit CTFFIND3 and CTFTILT website: http://emlab.rose2.brandeis.edu/ctf)

Assumptions:

  1. The micrographs after 2 X 2 binning are in a folder "dat-files_bin2", and they are named as "img_0001_bin2.dat", ..."img_0010_bin2.dat".
    EM was operated at 120 kV for negative stain. The nominal magnification is 67 kX, leading to 3.46 A/pix for binned micrographs.
  2. Amplitude contrast ratio is 0.07 for cryo, and 0.15 for negative stain.
  3. The particle coordinate files are in a folder "svco-files_bin2", named as "SVCO_img_0001_bin2.dat", etc.

Procedure:

(1) Make a folder called "defocus", go into it, and run "samdefocus.py setup".
Input the parameters as following, which are saved into a file called "samdefocus.inp".

>>>> PLEASE INPUT IMAGES FOR CTF SEARCH
**** Input images (e.g. ../mrc-files/image_####.mrc) : ../dat-files_bin2/img_####_bin2.dat

>>>> PLEASE INPUT EM SETTINGS
**** Spherical aberration, CS (mm) (e.g. 2) : 2.0
**** Electron enery (kV) (e.g. 200) : 120
**** Amplitude contrast ratio (e.g. 0.07) : 0.15
**** Maganification of EM (e.g. 50000) : 67000
**** Densitometer step (um) (e.g. 14) : 23.182

>>>> PLEASE INPUT CTF SEARCHING PARAMETERS
**** Resolution minimum (A) (e.g. 50) : 50
**** Resolution maximum (A) (e.g. 10) : 8
**** Defocus minimum (A) (e.g. 10000) : 5000
**** Defocus maximum (A) (e.g. 60000) : 20000
**** Focus searching step (A) (e.g. 500) : 500

(2) Run ctffind for all 10 micrographs by the command "samdefocus.py find 128 1 10".
(For tilted micrographs, run ctftilt by the command "samdefocus.py tilt 128 1 10".)
(3) Save the defocus results of all micrographs by the command "grep img_ RESULT_find_box128_01-10_list > RESULT_find_box128_01-10_list_all".
(4) To get a defocus file for all micrographs, run "samdefocus.py listfilm RESULT_find_box128_01-10_list_all img_####_bin2".

===> 10 sets of defocus values were read from Picked_listfile (RESULT_find_box128_01-10_list_all).
===> A list of defocus values for films/micrographs are saved:
in SPIDER format (RESULT_find_box128_01-10_list_all_DFfilm.dat).
in DEF format (RESULT_find_box128_01-10_list_all_DFfilm.def).

**** Only DEF file can be read by the following "listpart" operation ****

(5) To get a defocus file for all picked particles, run "samdefocus.py listpart RESULT_find_box128_01-10_list_all_DFfilm.def ../svco-files_bin2/SVCO_img_####_bin2.dat 2048,2048 3.46".
The resulting file is called "RESULT_find_box128_01-10_list_all_DFpart.def".
(6) Convert to FREALIGN *.par fiile by running "samdefocus.py convert RESULT_find_box128_01-10_list_all_DFpart.def output.par 67000".
Convert to RELION *.star file by running "samrelion.py new all_img.star img.mrcs,120,2.0,0.15,RESULT_find_box128_01-10_list_all_DFpart.def".

Notes:

(1) For the best results, one can run both ctffind and ctftilt, as well as different tilt sizes (64, 128 and 256).
For the step(2) above, send out all or some of the 6 following commands:
"samdefocus.py find 64 1 10 >& log_find_64 &"
"samdefocus.py find 128 1 10 >& log_find_128 &"
"samdefocus.py find 256 1 10 >& log_find_256 &"
"samdefocus.py tilt 64 1 10 >& log_tilt_64 &"
"samdefocus.py tilt 128 1 10 >& log_tilt_128 &"
"samdefocus.py tilt 256 1 10 >& log_tilt_256 &"

To combine all results from different settings, run
"samdefocus.py combine RESULT_find_box64_01-10_list RESULT_find_box128_01-10_list RESULT_find_box256_01-10_list RESULT_tilt_box64_01-10_list RESULT_tilt_box128_01-10_list RESULT_tilt_box256_01-10_list"
The resulting file is named as "RESULT_list_combine", in which there are 6 lines of defocus values for each micrographs.

One can interactively screen "RESULT_list_combine", put a marker (e.g. "CC") at the end of the best defocus line for each micrograph, and then "grep" those lines into a file called "RESULT_list_combine_pick";
or run a command like "samdefocus.py pick RESULT_list_combine img_ 5000 5" to pick the defocus lines with the least difference between df1 and df2.

Then continue as in the step(4) above by running "samdefocus.py listfilm RESULT_list_combine_pick img_####_bin2"