PyTom: 3D reconstruction of subtomograms from aligned
This section deals with the reconstruction of subtomograms
according to the positions stored in a particle list, which can be the
result of template matching (see Localization
Tutorial) or of interactive localization using a tool like EMAN2.
The reconstruction is performed by weighted backprojection with different
reconstruction centers (= centers of particles).
Things you should know to avoid desaster
Take care during the reconstruction process for three things:
Coordinate system of projections: Projections are aligned based on a
coordinate system that is assigned to the gold markers (or any
other reference system). Thus, if the coordinate system that is used for
alignment of the weighted projections and that used for reconstructing
the volume for picking the particles you will end up in a mess, i.e.,
your subvolumes likely will not include particles.
Reconstruction center: During reconstruction of the picking
volume you might have provided a reconstruction center of your tomogram that
deviates from the default value. Another possibility is that you might have
cropped your volume after reconstruction because part of it was simply devoid
of any interesting stuff. Both, a specific reconstruction center and cropping of
the volume lead to a shift of the coordinates in the particle list compared
to the coordinates that would result from backprojection of the aligned projections.
Thus, offset must be specified or you will end up in Nirvana.
Binning factor of particle list and projections: Moreover, you must
make sure that you interpret weighted projections and the particle list
with the correct binning factor: typically, particles will be picked
in a downsampled volume and the subtomograms will be reconstructed
from full-sized projections to get the subtomogram at its maximum
magnification. The correct binning factor interrelating the two must
be provided, otherwise you might also end up in nowhere land.
Make sure that your particle list is not a mix of particles stemming from multiple tomograms.
You should be able to tell by checking the Origin attribute in the XML file.
Reconstruct tutorial subtomograms using reconstructWB.py
Using the bin/reconstructWB.py script, you can reconstruct
a set of subtomograms (or a single tomogram) from weighted and aligned projections by
backprojection. As explained above you
need to specify the correct parameters to ensure that the coordinates
of your particle list and the projections correspond.
The script reconstructWB.py takes the following parameters:
--size: size of resulting tomogram. The volumes are always
--coordinateBinning: optional: the particle list is typically obtained from
a binned tomogram. For reconstruction of unbinned subtomograms the binning needs to
be inverted - otherwise the reconstructions would be performed at the wrong
--applyWeighting: optional: apply weighting before reconstruction
(if projections are not weighted already)
--recOffset: Volume that is used for particle
localization might have been reconstructed with a coordinate offset or it
may be cropped (often in z) to remove 'empty' parts. Since the projection
coordinate system is still un-altered the information about discarded volume in x,y,z must
be provided to perform reconstructions at the correct coordinates.
In our tutorial data-set you will find a directory reconstructParticles where you can perform reconstruction of individual particles.
The respective function call can be found in the reconstruct.sh script:
Here, we reconstruct the first 252 particles from the 1000 particles localized in the previous step (-p pl_first252.xml).
All particles will be reconstructed into the ../particles folder. Their cube size will be 25 pixels in each dimension.
In the previous tomogram reconstruction step, the tomogram was reconstructed to a size of 512,512,128 pixels.
The projections stored in ../reconstructTomo/alignedProjections have a size of 512,512, hence the coordinateBinning parameter is set to 1.
However, the only realy complicated parameter here is the reconstruction offset determined to -o 0,0,192.
A preliminary average
After successfull reconstruction of all particles, the firstAverage.py stores the commands required to generate a preliminary average from all particles.
The average should contain a ribosome. If not, please forward us a bug report through our mailing list.
The PyTom user interface
supports setting up a job for reconstruction of subtomograms using the coordinates
stored in a particle list. A single tomogram can also be reconstructed this way.
The file generated by the interface, job.sh (or whichever name you choose
in the GUI) contains the call of the reconstructWB.py script with
the specified parameters.