Summary#
The postprocess.py
command-line tool can be used to analyze the results generated by match_template.py
.
postprocess.py --help
The following will call 1,000 top-scoring peaks that are separated by at least 20 voxel from each other and 30 voxel from the boundaries. A tab-separated file output.tsv will be created in the process containing eight columns. The z, y and x column correspond to the translation, the euler_z, euler_y and euler_x column to the rotation used to obtain the column score. The detail column contains peak caller specific information.
postprocess.py \
--input_file output.pickle \
--output_prefix output \
--output_format orientations \
--min_distance 30 \
--min_boundary_distance 20\
--number_of_peaks 1000
Note
pytme uses a zyx convention, following the CCP4/MRC format. In IMOD terms, a file read by Density.from_file
with data shape 500, 928, 960, will contain 960 columns, 928 rows and 500 sections. Similarly, the reported Euler angles are in intrinsic zyx convention (see euler_to_rotationmatrix
).
The code below will call peaks analogously to Orientations, but additionally also applies the identified orientation to the template and writes it to disk using the naming pattern {output_prefix}_{index}.{extension}. Index 0 corresponds to the highest scoring orientation.
postprocess.py \
--input_file output.pickle \
--output_prefix output \
--output_format alignment \
--number_of_peaks 10
The code below will call peaks analogously to Orientations, but additionally extract subsets centered around the peak with specified box size. The generated files follow the naming pattern {output_prefix}_{index}.mrc, where index 0 corresponds to the highest observed score.
postprocess.py \
--input_file output.pickle \
--output_prefix output \
--output_format extraction \
--min_distance 20 \
--number_of_peaks 500 \
--peak_caller PeakCallerMaximumFilter
This option will generate a STAR file and extract subtomograms which can be directly used input for reconstruction, refinement and downstream classification with RELION. In terms of peak calling and subtomogram extraction, this option performs identical to the output_format extraction
. The output STAR file consists of an optics group block which contains informations about the imaging conditions, pixel size, and another data group with tab separated columns containing x, y, z coordinates (in voxels), a file path to the generated cropped subtomogram file, the Euler angles, namely rotation, tilt and psi.
The output is compatible with RELION 4.0 and was tested with relion_reconstruct, and relion_refine_mpi.
postprocess.py \
--input_file output.pickle \
--output_prefix output \
--output_format relion \
--min_distance 20 \
--number_of_peaks 1000 \
-—wedge_mask mask.mrc
The code below will call peaks analogously to Orientations, and compute a simple average based on the identified orientations.
postprocess.py \
--input_file output.pickle \
--output_prefix average \
--output_format average \
--min_distance 20 \
--number_of_peaks 500 \
--peak_caller PeakCallerMaximumFilter