Segmentclass¶
Program to classify excised in-plane rotated segments using SPARX’s k-means clustering
Parameters¶
Parameter |
Example (default) |
Description |
---|---|---|
Image input stack |
protein_stack.hdf |
Input stack: accepted file formats (hdf). |
Class average stack |
averages.hdf |
Stack: accepted image file formats (spi, hdf, img, hed) |
Pixel size in Angstrom |
1.163 |
Pixel size is an imaging parameter (accepted values min=0.001, max=100). |
Estimated helix width and height in Angstrom |
(200, 600) |
Generous width and height measure of helix required for rectangular mask (accepted values min=20, max=1500). |
Number of classes |
5 |
Number of classes to be clustered (accepted values min=0, max=2000). |
Sample parameter file¶
You may run the program in the command line by providing the parameters via a text file:
segmentclass --f parameterfile.txt
Where the format of the parameters is:
Image input stack = protein_stack.hdf
Class average stack = averages.hdf
Pixel size in Angstrom = 1.163
Estimated helix width and height in Angstrom = (200, 600)
Number of classes = 5
Additional parameters (intermediate level)¶
Parameter |
Example (default) |
Description |
---|---|---|
Reference image option |
False |
If reference stack desired to continue classification. |
Image reference stack |
protein_reference_stack.hdf |
Input reference stack: accepted file formats (spi, .hdf, .img, .hed). |
Spring database option |
False |
If checked will read previous spring.db (Sqlite-compatible database) otherwise will create new one. |
spring.db file |
spring.db |
Program requires a previously generated spring.db and writes an updated spring.db database in the working directory. |
Number of iterations |
5 |
Number of iteration cycles of clustering and alignment: 0 - only k-means clustering, 1 - cluster and align, 2 - cluster/align/cluster/align… (accepted values min=0, max=200). |
Keep intermediate files |
False |
Keep intermediate images from alignment which are iteratively generated - EM image stacks are deleted otherwise. |
Limit in-plane rotation |
True |
Restricts in-plane rotation alignment. |
Delta in-plane rotation angle |
10.0 |
Rotational alignment is being performed within +/- delta angle from 0 and 180 degrees (delta=0 means only 0/180 are checked, delta=180 means no rotational restraint) (accepted values min=0, max=180). |
X and Y translation range in Angstrom |
(50, 50) |
Translational range of alignment search perpendicular and along helix axis (X: off-center helical axis, Y: (minimum y-range=helical rise/2) (accepted values min=0, max=1000). |
High-pass filter option |
False |
Option to high-pass filter images before alignment or band-pass filter in combination with low-pass filter. |
Low-pass filter option |
True |
Option to low-pass filter images before alignment or band-pass filter in combination with high-pass filter. |
High and low-pass filter cutoffs in 1/Angstrom |
(0.001, 0.09) |
Filter design for high- and low-pass filter with cutoffs in 1/Angstrom. Maximum spatial frequency is 1/(2*pixelsize) (accepted values min=0, max=1). |
Binning option |
True |
Micrograph is reduced in size by binning. |
Binning factor |
6 |
Segments are reduced in size by binning factor (accepted values min=1, max=20). |
MPI option |
True |
OpenMPI installed (mpirun). |
Number of CPUs |
8 |
Number of processors to be used (accepted values min=1, max=1000). |
Temporary directory |
/tmp |
Temporary directory should have fast read and write access. |
Sample parameter file (intermediate level)¶
You may run the program in the command line by providing the parameters via a text file:
segmentclass --f parameterfile.txt
Where the format of the parameters is:
Image input stack = protein_stack.hdf
Class average stack = averages.hdf
Reference image option = False
Image reference stack = protein_reference_stack.hdf
Spring database option = False
spring.db file = spring.db
Pixel size in Angstrom = 1.163
Estimated helix width and height in Angstrom = (200, 600)
Number of classes = 5
Number of iterations = 5
Keep intermediate files = False
Limit in-plane rotation = True
Delta in-plane rotation angle = 10.0
X and Y translation range in Angstrom = (50, 50)
High-pass filter option = False
Low-pass filter option = True
High and low-pass filter cutoffs in 1/Angstrom = (0.001, 0.09)
Binning option = True
Binning factor = 6
MPI option = True
Number of CPUs = 8
Temporary directory = /tmp
Additional parameters (expert level)¶
Parameter |
Example (default) |
Description |
---|---|---|
Database prepare option |
True |
If checked will prepare database entries for 3D refinement using convolved images. |
Class variance stack |
variances.hdf |
Stack: accepted image file formats (spi, hdf, img, hed) |
Eigenimage stack |
eigenimages.hdf |
Stack: accepted image file formats (spi, hdf, img, hed) |
B-Factor |
0 |
B-Factor in 1/Angstrom^2 to be applied to images. Zero no modulation of frequencies. Negative B-factors enhance high-resolution frequencies. Positive B-factors dampen high-resolution frequencies (accepted values min=-50000, max=50000). |
Custom filter option |
False |
Option to custom filter images before alignment. |
Custom-built filter file |
filter_function.dat |
Custom-built filter function with two columns (normalized spatial frequency 0 - 0.5, Fourier filter coefficients between 0 - 1): accepted file formats (txt, .dat). |
Automatic filter option |
True |
Automatic filter design derived from decay of Fourier ring correlation between images. |
Sample parameter file (expert level)¶
You may run the program in the command line by providing the parameters via a text file:
segmentclass --f parameterfile.txt
Where the format of the parameters is:
Image input stack = protein_stack.hdf
Class average stack = averages.hdf
Reference image option = False
Image reference stack = protein_reference_stack.hdf
Spring database option = False
Database prepare option = True
spring.db file = spring.db
Class variance stack = variances.hdf
Eigenimage stack = eigenimages.hdf
Pixel size in Angstrom = 1.163
Estimated helix width and height in Angstrom = (200, 600)
Number of classes = 5
Number of iterations = 5
Keep intermediate files = False
Limit in-plane rotation = True
Delta in-plane rotation angle = 10.0
X and Y translation range in Angstrom = (50, 50)
High-pass filter option = False
Low-pass filter option = True
High and low-pass filter cutoffs in 1/Angstrom = (0.001, 0.09)
B-Factor = 0
Custom filter option = False
Custom-built filter file = filter_function.dat
Automatic filter option = True
Binning option = True
Binning factor = 6
MPI option = True
Number of CPUs = 8
Temporary directory = /tmp
Command line options¶
When invoking segmentclass, you may specify any of these options:
usage: segmentclass [-h] [--g] [--p] [--f FILENAME] [--c] [--l LOGFILENAME] [--d DIRECTORY_NAME] [--version] [--reference_image_option]
[--spring_database_option] [--database_prepare_option] [--keep_intermediate_files] [--limit_in-plane_rotation]
[--high-pass_filter_option] [--low-pass_filter_option] [--custom_filter_option] [--automatic_filter_option] [--binning_option]
[--mpi_option]
[input_output [input_output ...]]
Program to classify excised in-plane rotated segments using SPARX's k-means clustering
positional arguments:
input_output Input and output files
optional arguments:
-h, --help show this help message and exit
--g, --GUI GUI option: read input parameters from GUI
--p, --promptuser Prompt user option: read input parameters from prompt
--f FILENAME, --parameterfile FILENAME
File option: read input parameters from FILENAME
--c, --cmd Command line parameter option: read only boolean input parameters from command line and all other parameters will be assigned
from other sources
--l LOGFILENAME, --logfile LOGFILENAME
Output logfile name as specified
--d DIRECTORY_NAME, --directory DIRECTORY_NAME
Output directory name as specified
--version show program's version number and exit
--reference_image_option, --ref
If reference stack desired to continue classification. (default: False)
--spring_database_option, --spr
If checked will read previous spring.db (Sqlite-compatible database) otherwise will create new one. (default: False)
--database_prepare_option, --dat
If checked will prepare database entries for 3D refinement using convolved images. (default: False)
--keep_intermediate_files, --kee
Keep intermediate images from alignment which are iteratively generated - EM image stacks are deleted otherwise. (default:
False)
--limit_in-plane_rotation, --lim
Restricts in-plane rotation alignment. (default: False)
--high-pass_filter_option, --hig
Option to high-pass filter images before alignment or band-pass filter in combination with low-pass filter. (default: False)
--low-pass_filter_option, --low
Option to low-pass filter images before alignment or band-pass filter in combination with high-pass filter. (default: False)
--custom_filter_option, --cus
Option to custom filter images before alignment. (default: False)
--automatic_filter_option, --aut
Automatic filter design derived from decay of Fourier ring correlation between images. (default: False)
--binning_option, --bin
Micrograph is reduced in size by binning. (default: False)
--mpi_option, --mpi OpenMPI installed (mpirun). (default: False)
Program flow¶
classify: Classification of segments
segmentkmeans: K-means classification of segments
spring_align2d: Multi-reference alignment against obtained classes
compute_eigenimages_from_aligned_stack: Compute Eigenimages from aligned stack