Transitioning from EMAN1 to EMAN2 with command line tools

While the workflow is the correct choice for many users, we realize that some prefer to manipulate their data more directly. Many users who wish to use the command line are doing so because they are trying to update existing scripts currently using EMAN1. Note that this tutorial was written for EMAN2.03 or above.

Please note that for EMAN2 it is important to use HDF or BDB: files for all EMAN2 processing, as other formats do not support a flexible enough metadata model (header information). Chimera is able to directly read EMAN2 HDF files. When you have a structure you need to get into a different format for use in another program, feel free to convert to whatever you like (EMAN2 still supports virtually all formats). Just be aware that some header info will be lost in the conversion. Please be sure to read this Important Warning.

Introduction to the EMAN2 Commmand-Line

The first thing to note is that EMAN2 uses standard unix-style command-line arguments rather than EMAN1 style arguments. For example: proc2d abc.hed def.spi clip=64,64 --> abc.hed def.spi --clip=64,64

Basic Image Processing

In direct analog to EMAN1, EMAN2 has,, As with EMAN1, both of the proc commands can be used to convert among any of EMAN2's supported file formats, simply by using the correct extension for the output file. There is also an --outtype option to manually specify the output format.

It is important to understand how both programs deal with image stacks (a single file with multiple images). In EMAN1, only 2-D images could exist in stacks, simply because there were no 3-D file formats that supported multiple 3-D volumes at the time. That is no longer true, and HDF and BDB both support stacks of volumes. However, with 2-D images, stacks are used extensively, and with 3-D, only rarely. As a result and handle stacks differently by default. will append images to the output stack unless --inplace is specified. on the other hand will overwrite images by default, unless the --append option is specified. Finally, is capable of treating a single 3-D image as a stack of 2-D images in various ways. so:

Beyond this, a number of options have changed. In both and, it is now possible to construct filter chains; that is, a sequence of filters or other processors to apply to the image(s). This is done via the --process directive in either program. There are currently over 175 different processors in 10 different categories, such as filters, masks, thresholds, mathematical, etc. Any of these processors can be applied in sequence using the directive --process=procname:option=value:option=value. You can get a list of available processors using processor or processor -v 2 for more detail. For example:

If you prefer to adjust filter parameters in a GUI, the new program allows you to graphically construct and edit filter chains.

For comparative tasks, such as computing a FSC between two maps, note that the option order has changed, so the second parameter is an output not an input:

Note that like EMAN1, the --scale=scale_factor --clip=x[,y,z] operation performs sampling or interpolation, and does not do any averaging. If you wish to use scale factors <1.0, you may wish to consider the --meanshrink= or --medianshrink= options.

CTF determination/correction

All CTF processing is handled by the program. To display the graphical interface, you must specify the --gui option, but this requires first having run automatic parameter determination. For example, if you have particle data in the ptcl directory, with particles from each frame in a separate HDF file:

Reference-free Class-averages

Note that like EMAN1, these are used for initial evaluation of the data and initial model generation only. They are not used for final 3-D refinements.

Initial Model Generation


Resolution Testing

EMAN2/Eman1Transition/CommandLine (last edited 2015-03-06 03:49:27 by MichaelBell)