Slaton Lipscomb
fwrap - a wrapper for EM::Tools::Frealign
fwrap [-adrv] [-f [frequency]] -c config_file
fwrap is a wrapper application for EM::Tools:Frealign. It allows the user to manage any number of rounds of refinement and/or reconstruction with Frealign. For refinement, the use of multiple processors is supported.
Frealign carries out search and refinement of particle parameters, CTF correction (allowing for astigmatism), and 3D reconstruction using interpolation in Fourier space. The magnification of each dataset and the defocus and astigmatism values of particles grouped by their film number can also be refined. On output, there are also diagnostic data, such as Fourier Shell Correlation, Fourier Shell Phase Residual, Q-factors in resolution zones, Average Particle Phase Residual between particles and 3D reconstruction, variance of the reconstruction, and point spread function indicating resolution in 3 dimensions.
Frealign uses MRC, SPIDER or IMAGIC (eventually) image file formats, and should be linked with MRC library routines for input/output of image files. The MRC mapformat is identical to that used by CCP4 crystallography programs. Current array dimensions provide space for 256x256 pixel images and the program is limited at present to transforms of even dimensions.
Some of the principles of Frealign are explained in N. Grigorieff (1998), J. Mol. Biol. 277, 1033-1046.
Frealign is available from Niko Grigorieff at http://emlab.rose2.brandeis.edu/grigorieff/downloads.html
frequency cycles of refinement. Default: 10.hostfile and rshcommand directives must also be defined in the configuration file.fwrap is configured with a flat text file containing variable settings and directives.
Each line contains either a comment or a variable definition. A comment must start with the '#' symbol. A variable definition consists of a fwrap or Frealign variable and its values, separate by any amount of whitespace (either spaces or tabs). For example:
# fwrap settings
refine_variable1 frealign_value1
refine_variable2 frealign_value2
# frealign settings
frealign_variable1 frealign_value1
frealign_variable2 frealign_value2
The following fwrap variables may be defined in your configuration file. They are required as indicated.
frealign_exeworking_dirsource_dirproject_idfirst_cyclelast_cyclenum_prochostfile and rshcommand directives must also be defined. Default: 1.hostfilenum_proc is greater than 1.rshcommandnum_proc is greater than 1.first_parlast_parfirst_vollast_voluse_phase_residThe following Frealign parameters may be defined in your configuration file. Required parameters are indicated as such, and default values are given for optional parameters.
fwrap has renamed all Frealign parameters to more clearly indicate their purpose. However, for convenience the original Frealign internal variable are listed at the end of each description, and may be used instead in your configuration file.
When you see [...], this indicates that a variable accepts multiple, comma-delimited values. See Using multiple values below for more information.
file_formatmodeastig_refineflip_testbackupbackup particles. If the program crashes, it can be restarted without much loss of data. 0 = no back up. Default: 0. NBACKUP [..]reprojectitmax_histitmax randomization trials. Default: F. FHIST [..]beautifyradiuspixel_sizeamp_contrastphase_fracnum_stdev_maskradius. If positive, calculates a mask equivalent to solvent flattening with 5-pixel-cosine-bell smoothed mask boundary. The mask is then used to multiply the input 3D map, which is then used for all parameter refinement and subsequent calculations. If negative, calculates a mask resulting in a sharp binary (0/1) mask boundary which is used for both parameter refinement and reconstruction, and to mask and output the matching projections. Each matching particle image is also always masked with a cosine bell edged function of radius radius. Default: 0.0. XSTD [..]bfactor_const W = exp (-DELTAP/bfactor_const * R^2)
avg_phase_resid), bfactor_const = conversion constant (5.0 in the example), and R^2 the squared resolution in Fourier units (R = 0.0 ... 0.5). A large value for bfactor_const (e.g. 100.0) gives equal weighting to each particle. Default: 5.0. PBC [..]avg_phase_residangular_stepitmaxpsithetaphidelta_xdelta_yfirst_partlast_partsymmetryrel_magstep_sizephase_resid_targetphase_resid_threshmode = 0, 1, 2, 3. This variable is often used with mode 0 in separate runs to calculate maps using various values of phase_resid_thresh to find the optimum value to produce the best map as judged from the statistics. Default: 90.0. THRESH [..]spherical_aberrvoltageresolutionlow_res_cutoffhigh_res_cutoffbfactoramp_contrast and bfactor can be manipulated in particle parameter refinement as if they were low pass and high pass filters. amp_contrast and the CTF are used to correct the density in the final map, whereas bfactor is not. Default: 0.0. RBFACT [..]raw_imagesOptionally, the output volume from a cycle can be filtered using an external program. This is helpful for evaluating the progress of your refinement. Currently the only supported program is Niko Grigorieff's BFACTOR.
The filtered volumes and filter program logfiles are saved in the scratch directory.
To filter output volumes with BFACTOR, define the following variables in your config file.
filter_typefilter_radiusfilter_freqSometime it is desirable to use a different value each cycle for a Frealign variable. fwrap configfiles may contain multiple values for any numeric Frealign variable. These variables are indicated by the [..] notation above.
Individual values must be comma-separated. To indicate that a particular value should be used more than once, follow it with the character x and an integer indicating the number of cycles to use this value.
DO NOT insert spaces between values in a multivalue entry, ever.
The total number of values specified for any Frealign variable must be equal to or greater than the number of cycles of refinement being run.
The following examples are all valid:
angular_step 15.0,12.0,12.0,10.0,8.0,8.0
high_res_cutoff 40,30x2,20x2,15
phase_resid_thresh 90.0,75.0,60.0x50
# fwrap vars
debug 1
verbose 0
use_phase_residual 1
save_reprojs 0
num_proc 2
hostfile hosts
rshcommand /usr/bin/ssh
# frealign factory vars
location /usr/local/bin/frealign_v6.exe
source_dir /home/slaton/tmp/refine
working_dir /home/slaton/tmp/refine/tmp
project_id pol
first_cycle 21
last_cycle 50
raw_images part.spi
# frealign vars [required]
file_format S
mode 1
first_part 1
last_part 6835
radius 100.0
pixel_size 2.5
amp_contrast 0.12
step_size 12.7
spherical_aberr 2.2
voltage 200.0
# frealign vars [optional]
flip_test T,Fx100
beautify T
bfactor_const avg_phase_resid
phase_resid_target 10.0
phase_resid_thresh 90.0,75.0x50,60.0
resolution 50,35,25x3,15.0x5,10.0x20
low_res_cutoff 300,200x20
high_res_cutoff 40,30,20x5,15x15
# bfactor vars [optional]
filter_location /usr/local/bin/bfactor.exe
filter_bfactor -3000.0
filter_type 2
filter_radius 25
filter_freq 3
The recommended initial parameters for more accurate orientation parameter determination are:
itmax, e.g. 200.angular_step, i.e. 200.0 instead of 2.0.bfactor to decrease the weight of the noisier data at higher resolution (e.g. use 2000 or 3000) but to keep it in.Currently, only 1 dataset is supported. There is no support for multiple raw image or volume inputs/outputs.
The following Frealign mode keys are supported: 0, 1, 2, 3, 4. Modes -4 and -3 require creating an input parameter file from scratch (bootstrapping), and are not currently supported.
EM::Tools::Frealign
Slaton Lipscomb <slaton@berkeley.edu>
fwrap copyright (C) 2005 Slaton Lipscomb. All rights reserved.
This is alpha-quality software that has undergone only the most superficial testing. Some features are incomplete or missing. It is provided "as is" without a warranty of any kind.