Particle Extraction: Window particles from micrographs using the particle coordinates.
Usage in command line
sp_window.py input_micrograph_pattern input_coordinates_pattern input_ctf_params_source output_directory --selection_list=SELECTION_TEXT_FILE --coordinates_format=FORMAT_NAME --box_size=SIZE --skip_invert --limit_ctf --astigmatism_error=ERROR_THRESHOLD --resample_ratio=RATIO --check_consistency ---filament_width=FILAMENT_WIDTH
sp_window exists in both MPI and non-MPI versions (Running MPI version does not require –MPI flag).
There are several modes to run the program:
1. All Micrographs Mode - Process all micrographs in a directory:
Specify path pattern of input micrographs and coordinates files with a wild card (*).. The path pattern must be enclosed by single quotes (') or double quotes (“). (Note: sp_gui.py automatically adds single quotes (')). The substring at the variable part must be same between a associated pair of input micrograph and coordinates file. bdb files cannot be selected as input micrographs. Next, specify the source of CTF paramters. For cryo data, this should be the file produced by sp_cter and normally called partres.txt. For negative staining data, it should be the pixel size [A/Pixels] of input micrographs. Finally, specify output directory where all outputs should be saved. In this mode, all micrographs matching the path pattern will be processed.
mpirun -np 32 sp_window.py './mic*.hdf' 'info/mic*_info.json' outdir_cter/partres/partres.txt particles --coordinates_format=eman2 --box_size=64
2. Selected Micrographs Mode - Process all micrographs in a selection list file:
In addition input micrographs path pattern, coordinates files path pattern, CTF paramters source, and output directry, specify a name of micrograph selection list text file using –selection_list option. In this mode, only micrographs in the selection list which matches the file name part of the pattern (ignoring the directory paths) will be processed. If a micrograph name in the selection list does not exists in the directory specified by the micrograph path pattern, processing of the micrograph will be skipped.
mpirun -np 32 sp_window.py './mic*.hdf' 'info/mic*_info.json' outdir_cter/partres/partres.txt particles --selection_list=mic_list.txt --coordinates_format=eman2 --box_size=64
3. Single Micrograph Mode - Process a single micrograph:
In addition input micrographs path pattern, coordinates files path pattern, CTF paramters source, and output directry, specify a single micrograph name using –selection_list option. In this mode, only the specified single micrograph will be processed. If this micrograph name does not matches the file name part of the pattern (ignoring the directory paths), the process will exit without processing it. If this micrograph name matches the file name part of the pattern but does not exists in the directory which specified by the micrograph path pattern, again the process will exit without processing it.
sp_window.py './mic*.hdf' 'info/mic*_info.json' outdir_cter/partres/partres.txt particles --selection_list=mic0.hdf --coordinates_format=eman2 --box_size=64
4. For Negative Staining Dataset:
Set the pixel size [A/Pixels] as the source of CTF paramters and use –skip_invert.
mpirun -np 32 sp_window.py './mic*.hdf' 'info/mic*_info.json' 5.2 particles --coordinates_format=eman2 --box_size=64 --skip_invert
NOTE: Please remember to adjust box_size also when setting resample_ratio < 0.1.
particles/EMAN2DB/mic0_ptcls.bdb
or bdb:particles#mic0_ptcls
This command executes the following processes:
The format of partres.txt
is changed. The old format is also supported for now, but will be removed in near future. Please also refer sp_cter.
Toshio Moriya
Category 1:: FUNDAMENTALS, UTILITIES, APPLICATIONS
sphire/bin/sp_window.py
sp_cter and e2boxer_old
Stable:: Has been evaluated and tested. Please let us know if there are any bugs.
There are no known bugs so far.