Particle Reextraction: Rewindow particles from micrographs using the information stored in rebox files.
Usage in command line
sp_rewindow.py input_micrograph_pattern input_rebox_pattern output_directory --selection_list=SELECTION_TEXT_FILE --box_size=BOX_SIZE --skip_invert --mic_resample_ratio=RATIO --swap_ctf_params=CTER_PARTRES_FILE_PATH --check_consistency
sp_rewindow 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 rebox 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 rebox file. bdb files cannot be selected as 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_rewindow.py './mic*.hdf' 'outdir_rebox/centered_rebox/mic*_centered_rebox.rbx' outdir_rewindow --box_size=64
You can also ignore per-particle CTF information stored in rebox files and use CTF information stored in the CTER partres.txt instead.
mpirun -np 32 sp_rewindow.py './mic*.hdf' 'outdir_rebox/centered_rebox/mic*_centered_rebox.rbx' outdir_rewindow --box_size=64 --swap_ctf_params='outdir_cter/partres.txt'
2. Selected Micrographs Mode - Process all micrographs in a selection list file:
In addition to input micrographs path pattern, rebox files path pattern, and output directry arguments, 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_rewindow.py './mic*.hdf' 'outdir_rebox/centered_rebox/mic*_centered_rebox.rbx' outdir_rewindow --selection_list=mic_list.txt --box_size=64
3. Single Micrograph Mode - Process a single micrograph:
In addition to input micrographs path pattern, rebox files path pattern, CTF paramters source, and output directry arguments, 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. Use single processor for this mode.
sp_rewindow.py './mic*.hdf' 'outdir_rebox/centered_rebox/mic*_centered_rebox.rbx' outdir_rewindow --selection_list=mic0.hdf --box_size=64
For negative staining data, use –skip_invert.
mpirun -np 32 sp_rewindow.py './mic*.hdf' 'outdir_rebox/centered_rebox/mic*_centered_rebox.rbx' outdir_rewindow --box_size=64 --skip_invert
NOTE: Please remember to adjust box_size also when setting mic_resample_ratio < 0.1.
Inside the output directory, the program will write a local bdb stack image for each micrograph. The files are named micrograph name with “_ptcls” suffix. For example, outdir_rewindow/EMAN2DB/mic0_ptcls.bdb
or bdb:outdir_rewindow#mic0_ptcls
This command executes the following processes:
Toshio Moriya
Category 1:: FUNDAMENTALS, UTILITIES, APPLICATIONS
sparx/bin/sp_rewindow.py
Alpha:: Under development.
There are no known bugs so far.