PyTom: Align subtomograms

Overview

To obtain a coherent average from a set of subtomograms you have to iteratively determine the orientations and translations of all subtomograms ('alignment'). The alignment process can become time-consuming, depending on the number of subtomograms, their size, and the power of your computer setup (number of CPUs). Hence, subtomogram alignment is parallelized and typically performed on a CPU cluster.

Subtomogram Alignment using ./bin/GLocalJob.py

The script bin/GLocalJob.py performs iterative quasi-expectation maximization alignment using constrained correlation. The rotational sampling is performed in real space (in contrast to FRM alignment!). A function call looks like this:

mpirun -n "numberOfCPUs" PathToPytom/bin/pytom PathToPytom/bin/GLocalJob.py -p MyParticleList.xml -r MyReference.em -m MyMask.em --SphericalMask --angleShells 3 --angleIncrement 3. --symmetry MyNSym --symmetryAngleZ -d ./ -n 10 -b 2 --pixelSize 2.7 --particleDiameter 250

If you call the script without any arguments the following help will appear:

NAME
    GLocalJob.py
DESCRIPTION
    Create an GLocalSampling job. Documentation is available at
                          http://www.pytom.org/doc/pytom/alignment.html
OPTIONS
    -p, --particleList    Particle list : xml file storing information to all subvolumes (Is optional: No; Requires arguments: Yes)
    -r, --reference    Reference : the initial reference - if none provided average of particle list (Is optional: Yes; Requires arguments: Yes)
    -m, --mask    Mask : a mask  (Is optional: No; Requires arguments: Yes)
    --SphericalMask    Mask is spherical / speed up! (Is optional: Yes; Requires arguments: No)
    --angleShells    # angle shells used for angular refinement. Default= 3 (Is optional: Yes; Requires arguments: Yes)
    --angleIncrement    Angular increment for refinement. Default = 3 (Is optional: Yes; Requires arguments: Yes)
    --symmetry    PointSymmetry : specify n-fold symmetry (n) (Is optional: Yes; Requires arguments: Yes)
    --symmetryAngleZ    PointSymmetry axis tilt around Z axis (Is optional: Yes; Requires arguments: Yes)
    --symmetryAngleX    PointSymmetry axis tilt around X axis (Is optional: Yes; Requires arguments: Yes)
    -d, --destination    Destination : destination directory (Is optional: No; Requires arguments: Yes)
    -n, --numberIterations    Number of iterations (Is optional: No; Requires arguments: Yes)
    -b, --binning    Perform binning (downscale) of subvolumes by factor. Default=1. (Is optional: Yes; Requires arguments: Yes)
    --pixelSize    Pixelsize in Angstrom (Is optional: No; Requires arguments: Yes)
    --particleDiameter    Particle diameter in Angstrom (Is optional: No; Requires arguments: Yes)
    -w, --weighting    Weight particles by exp of CC (Is optional: Yes; Requires arguments: No)
    -c, --compound    Use compound weighting in Fourier space (Is optional: Yes; Requires arguments: No)
    -j, --jobName    Specify job.xml output filename (Is optional: No; Requires arguments: Yes)
    -h, --help    Help. (Is optional: Yes; Requires arguments: No)
AUTHORS
    Friedrich Foerster
	            

In more detail the options are the following:

Local Sampling
Fig. 1. Angular scanning. The angles Psi (Z1) and Theta (X1) scanned around the old \Psi and \Theta, whereby the old values act as a ‘pole’. Here the Angular Increment \Delta\Theta is 3 degrees and the Number of Shells N_{shell} is 2. That means the vector ( \Psi, \Theta) is rotated by \Delta\Theta=3 two times (the visible rings). The increment along \Psi is chosen as \Delta\Psi=\frac{N_{shell}}{sin(\Delta\theta*i_{shell})}, which accounts for the higher density of angles near the pole. The third Euler angle \Phi (Z2) is scanned with a constant increment \Delta \Phi=\Delta \Theta from \Phi_{min}=\Phi_{old}-N_{shell}*\Delta\Theta to \Phi_{max}=\Phi_{old}+N_{shell}*\Delta\Theta.

Results of alignment

At this point the script is pretty talkative and writes out quite a lot for each iteration Iter:

Alignment of the tutorial data

Alignment of the previously localized and roughly classified particles is shown in the alignment directory. Here, you will find: