Sub-tomogram averaging: Difference between revisions

From Relion
Jump to navigation Jump to search
No edit summary
Line 36: Line 36:
== Generating 3D CTF models for sub-tomogram averaging ==  
== Generating 3D CTF models for sub-tomogram averaging ==  


The previous script generates a shell script called <code>bla</code>, which needs to be executed from the command line to perform the reconstructions for the 3D CTF models of all subtomograms. You may parallelise its execution as is most suited for your computer setup.
The [[relion_prepare_subtomograms.py]] script also generates a shell script called <code>do_all_reconstruct_ctfs.sh</code>, which calls to each of the <code>tomo_reconstruct_ctfs.sh</code> in the <code>Tomograms/</code> subdirectories. This script needs to be executed from the command line to perform the reconstructions for the 3D CTF models of all subtomograms from all tomograms. You may parallelise its execution as is most suited for your computer setup.


*  First CTFFIND should be run for all images of the tilt series (that was used to generate the tomogram). The results should be written out in a text file with the syntax:
== Sub-tomogram extraction ==
 
<code>Tilt_angle  average_defocus_value_from_CTFFIND</code>
 
This can be done automatically using the script [[run_ctffind.py]]. Please modify the header values of the script.
 
*  Now the coordinates from the text file and the average defocus values from CTFFIND will be used to calculate local CTF parameters for each sub-tomogram in each image of the tilt series. This can be done using the
script [[make_ctfstar.py]]. Please modify the header values in this python script. For each subtomogram, a RELION .star file will be written out. This will be used by relion_reconstruct to generate the 3D CTF volume.


* Run relion_reconstruct to generate all 3D CTF model volumes. This can be done using the script <code>reconstruct_CTF_volumes.sh</code> that was written out in the last step. This script uses the .star file to read the local CTF
* Extract sub-tomograms using RELION as you would do for 2D micrographs. Use the <code>all_tomograms.star</code> file generated above as the "micrograph STAR file" on the I/O tab of the particle extraction jobtype. The "Coordinate-file suffix on that tab should be set to ".coords". The "Extract rootname" on the I/O tab and the "Particle box size" on the extract tab should be set to the same values as used in the header of the[[relion_prepare_subtomograms.py]] script. Do not forget to fill in the parameters of pixel size and particle diameter on the General jobtype of the GUI as well!
parameters and use them to make the 3D CTF model volume.
 
== Sub-tomogram extraction ==


* Extract sub-tomograms using RELION as you would do for 2D micrographs. If the image file is a volume and the coordinates values contain X,Y,Z entries, automatically sub-tomograms will be written out rather than 2D particles. If you add <code>--project3d</code> to the RELION extraction command, then 2D projections of each sub-tomogram will be written out. This may be useful to run reference-free 2D-class averaging in order to identify junk or otherwise unsuitable particles in your data set.
Executing this RELION command will extract and normalize all 3D subtomograms. Note that this job will generate a STAR file called <code>subtomo.star</code> (assuming the "Extract rootname" was subtomo). This STAR file should NOT be used for further processing. Instead, one should use the <code>particles_subtomo.star</code> file that was generated by the [[relion_prepare_subtomograms.py]] script.


* Run [[Refine_a_structure_to_high-resolution | 3D Auto-Refine]] or [[Classify_3D_structural_heterogeneity | 3D classification]] jobs, just like you would for single-particles, but specifying the CTF volume for each image in a .star file (using the label "rlnCtfImage"). This can be done using the script [[prepare_subtomo.py]]. A sample output is shown in the script.
Note that at the particle extraction step, one could also project each subtomogram along the Z-direction by providing the additional argument <code>--project3d</code> on the Running tab. In this case, you should use a different "Extract rootname" (e.g. particles2d), and use the generated particles2d.star file for standard single-particle processing in RELION.
 
== Sub-tomogram averaging ==


* All [[Analyse_results | analyse results]] options (e.g. post-processing) stay the same as for single-particles.
You can now run [[Refine_a_structure_to_high-resolution | 3D Auto-Refine]] or [[Classify_3D_structural_heterogeneity | 3D classification]] jobs using your 3D subtomogram particles by using the <code>particles_subtomo.star</code> file as Input images STAR file on the I/O tab. From here on, everything is analogous to the single-particle cases, including all  [[Analyse_results | analyse results]] options.

Revision as of 11:07, 13 March 2015

The following was written by Tanmay Bharat.

Getting organised

As in single-particle projects, also sub-tomogram averaging is organized in a single ProjectDirectory for each structure/project (also see the recommended procedures). Inside this directory it is recommended to make a Tomograms directory. Inside this directory, one should make a separate directories for each of the recorded tomograms (e.g. Tomograms/tomo0001). (Optionally, the Tomograms directory may contain sub-directories to group sets of tomograms, becase for example they were collected on different days (e.g. Tomograms/12Mar2015/tomo0001). You are free to choose whatever names for your directories and your tomograms. We have only used IMOD for tomogram reconstruction, but there is no reason why other software packages could not be used. The important thing is to save the tomogram in MRC format, and with a .mrc extension. In each of the individual tomogram directories you will need 4 files:

tomo.mrc    : the actual reconstructed tomogram
tomo.st     : the aligned tilt series in MRC format (e.g. save this from IMOD) 
tomo.coords : a text file with 3 columns: the X, Y and Z coordinates of the subtomograms (e.g. save this from IMOD)
tomo.order  : a text file with 2 columns: the tilt angle of each image in tomo.st and the accumulated dose in electron/A2 for that image.

You are free to change the rootname of these files (in this case "tomo"), but the extensions have to be like the ones above.

Generating STAR files and script for CTF-reconstructions

Tanmay Bharat wrote the relion_prepare_subtomograms.py script to run CTFFIND on all images of the tilt series stack (please note that an extension of this script to include CTF-estimation from two neighbouring exposure areas is still pending). This script also generates the input particles.star file for sub-tomogram refinement, and the STAR files that are required for the reconstruction of the 3D CTF models for each subtomogram. In addition, this script generates a shell script (called tomo_reconstruct_ctfs.sh) inside the directory for each tomogram.

Note that the relion_prepare_subtomograms.py script depends on python, IMOD, RELION and CTFFIND (version 3 or 4). The input for this script is a RELION-type STAR file with one line for each tomogram. It looks like this:

data_
loop_
_rlnMicrographName
Tomograms/tomo001/tomo.mrc
Tomograms/tomo002/tomo.mrc
Tomograms/tomo003/tomo.mrc

One way to make it would be:

relion_star_loopheader rlnMicrographName > all_tomograms.star
ls Tomograms/tomo???/*.mrc >>  all_tomograms.star

After making this STAR file, edit the header of the relion_prepare_subtomograms.py script to provide information about the experimental setup and execute it using:

python relion_prepare_subtomograms.py

Generating 3D CTF models for sub-tomogram averaging

The relion_prepare_subtomograms.py script also generates a shell script called do_all_reconstruct_ctfs.sh, which calls to each of the tomo_reconstruct_ctfs.sh in the Tomograms/ subdirectories. This script needs to be executed from the command line to perform the reconstructions for the 3D CTF models of all subtomograms from all tomograms. You may parallelise its execution as is most suited for your computer setup.

Sub-tomogram extraction

  • Extract sub-tomograms using RELION as you would do for 2D micrographs. Use the all_tomograms.star file generated above as the "micrograph STAR file" on the I/O tab of the particle extraction jobtype. The "Coordinate-file suffix on that tab should be set to ".coords". The "Extract rootname" on the I/O tab and the "Particle box size" on the extract tab should be set to the same values as used in the header of therelion_prepare_subtomograms.py script. Do not forget to fill in the parameters of pixel size and particle diameter on the General jobtype of the GUI as well!

Executing this RELION command will extract and normalize all 3D subtomograms. Note that this job will generate a STAR file called subtomo.star (assuming the "Extract rootname" was subtomo). This STAR file should NOT be used for further processing. Instead, one should use the particles_subtomo.star file that was generated by the relion_prepare_subtomograms.py script.

Note that at the particle extraction step, one could also project each subtomogram along the Z-direction by providing the additional argument --project3d on the Running tab. In this case, you should use a different "Extract rootname" (e.g. particles2d), and use the generated particles2d.star file for standard single-particle processing in RELION.

Sub-tomogram averaging

You can now run 3D Auto-Refine or 3D classification jobs using your 3D subtomogram particles by using the particles_subtomo.star file as Input images STAR file on the I/O tab. From here on, everything is analogous to the single-particle cases, including all analyse results options.