User Tools

Site Tools


sxproj_compare
This version (2019/03/19 13:50) is a draft.
Approvals: 0/1

sxproj_compare

Compares re-projections to class averages.


Usage

Usage in command line

	sxproj_compare.py stack input_volume outdir --mode=viper --classangles=angles_file --classselect=img_selection_file --prjmethod=interpolation_method --delta=angular_increment --matchshift=shift_range --matchrad=outer_radius --matchstep=ring_step --symmetry=optional_symmetry --partangles=refinement_params --partselect=substack_select --refineshift=shift_range --outliers=max_angle_diff --refinerad=outer_radius --refinestep=ring_step --align=2d_alignment_method --display --verbose


Typical usage

sxproj_compare compares re-projections of a 3D reconstruction to 2D images, typically class averages. There are three methods for this comparison:


1. Use projections angles from VIPER/RVIPER :

sxproj_compare.py Class2D/best.hdf Initial3D/main001/run002/rotated_volume.hdf Compare --mode viper --classangles Initial3D/main001/run002/rotated_reduced_params.txt --classselect Initial3D/main001/index_keep_images.txt

Note 1: The projection angles are not required if present in the image header. When in doubt, include this file explicitly.

Note 2: RVIPER, if it finds a stable solution, may exclude some images, and thus their projection angles will be excluded from the parameters file. The file containing the list of included images will have a name like main003/index_keep_image.txt.


2. Run a simple iteration of projection-matching:

sxproj_compare.py Class2D/best.hdf Initial3D/main001/average_volume.hdf Compare/ProjMatch --mode=projmatch --delta 7.5


3. Use the orientation parameters from refinement:

sxproj_compare.py Class2D/best.hdf Initial3D/main001/average_volume.hdf Compare/Meridien --mode=meridien --partangles Refine3D/final_params_037.txt --partselect Substack/isac_substack_particle_id_list.txt --outliers=15

The projection angle for a class will be calculated by taking the vector sum of the projection angles of the particles belonging to that class.

The set of classified particles may be different from the set of refined particles – for example when a substack is generated from a selection of good class averages – and thus the particle numbers will not match. The particle-selection file – e.g., Substack/isac_substack_particle_id_list.txt – will allow mapping of the particle number during classification to that during refinement.

Some particles may have been erroneously assigned to a class, as indiciated by a large angular distance between their projection angles and the average. Such particles can be excluded from the calculation of the average angles with the –outliers option. Furthermore, a list of the remaining included particles will be written to the files OUTPUT_DIRECTORY/Byclass/goodpartsclass###.txt.


Input

Main Parameters

stack
Set of 2D images to be compared. (default required string)
input_volume
Input volume
Reconstruction for which re-projections will be computed. In RVIPER, this file is of the form main003/run002/rotated_volume.hdf. (default required string)
outdir
Directory where outputs will be written. (default required string)
--mode
Comparison method. Choices are: viper, projmatch, and meridien. (default viper)
--classangles
VIPER mode – Parameters containing projection angles. Not required if the projection parameters are stored in the header of the input images, which for ISAC2 is generally not the case. In RVIPER, this file is of the form main003/run002/rotated_reduced_params.txt. This file is not required if the angles have already been written to the header.
--classselect
VIPER mode – Input selection containing list of images to be included from the input stack. For instance, RVIPER, if it finds a stable solution, may exclude some images, and thus their projection angles will be excluded from the parameters file. The file containing the list of included images will have a name like main003/index_keep_image.txt.
--delta
ProjMatch mode – Angular-sampling for reference projections.
--symmetry
ProjMatch mode – Symmetry, to limit angular projections. (default c1)
--partangles
MERIDIEN mode – Input refinement parameter file.
--partselect
MERIDIEN mode – Input substack selection file if particles removed before refinement (e.g., Substack/isac_substack_particle_id_list.txt). (default None)
--mode==meridien
--outliers
MERIDIEN mode – Outlier angle. Particles differing from average Euler angle by more than this threshold (in degrees) will be excluded from average calculation, by default keeps all.


Advanced Parameters

--prjmethod
Interpolation method. Valid choices are trilinear (default), gridding, and nn.
--display
Automatically pops up a window with the output montage.
--verbose
Writes additional messages to the terminal during execution.
--matchshift
ProjMatch mode – Maximum shift to allow during translation alignment, pixels.
--matchrad
ProjMatch mode – Outer alignment radius, defaults to automatically-determined.
--matchstep
ProjMatch mode – Alignment radius step size, pixels.
--refinerad
MERIDIEN mode – Outer alignment radius, defaults to automatically-determined.
--refineshift
MERIDIEN mode – Maximum shift to allow during translation alignment, pixels.
--refinestep
MERIDIEN mode – Alignment radius step size.
--align
MERIDIEN mode – Alignment method. Valid choices are apsh (default) and scf.


Output

angles.txt
Text file of projection parameters of input images.
proj.hdf
Stack of re-projections of input 3D reconstruction.
comp-proj-reproj.hdf
Comparison of re-projections and 2D images.


Description


Method


Reference


Developer Notes

As an input_volume, RVIPER's main003/average_volume.hdf also worked for me.

VIPER (as opposed to RVIPER) includes all class averages, so an image selection file shouldn't be needed.


Author / Maintainer

Tapu Shaikh


Keywords

Category 1:: APPLICATIONS


Files

sparx/bin/sxproj_compare.py


See also


Maturity

Beta:: Under evaluation and testing. Please let us know if there are any bugs.


Bugs

There are no known bugs so far.


sxproj_compare.txt · Last modified: 2019/03/19 13:50 by shaikh