e2ProjectManager

The e2projectmanager is a GUI project manager system for EMAN2, which guides the user through a series of steps to achieve either a single particle reconstruction or an sub tomogram average depending on the mode e2projectmanager is being used. This GUI is intended to replace the antiquated e2workflow system.

To run, simply type (in any directory):

e2projectmanager.py

If you run the project manager in a project directory, e2projectmanager will load this project. If you are not in a project directory or you want to work with a different project, simply browse to the desired directory by clicking, Project->Open Project. To edit an existing project(or configure a new project), Project->Edit Project.

e2ProjectManger can, currently, be run in two modes, SPR (Single Particle Reconstruction) and Tomo(tomographic). To change modes use the combobox above the workflow tree.

Creating a new project

To create a new project:

  1. Move to the desired directory
  2. launch e2projectmanager by, at the command prompt, typing: e2projectmanager.py
  3. In the menu bar click Project->Edit Project

  4. This will pull up a dialog box. Set the project name (what every you like), a project icon (will appear in the upper left corner of e2projectmanager), and the microscope data collection parameters (CS, Voltage, apix).
  5. Click 'ok' to apply the changes
  6. Choose the mode. For now there are only two modes, SPR and tomo mode.
  7. Begin processing you data, as you would in e2workflow.py

The above steps outline an appoach to dataprocessing that closely mirrors e2workflow.py, however e2projectmanager.py has much extended capability. :D

Using e2projectmanger.py GUI interface to e2programs

When you click on a leaf node of the workflow tree, a GUI interface to an e2program is displayed in the main frame, to the right of the workflow tree(see diagram below). This GUI has three tabs.

  1. The first Tab is a GUI interface to the e2program, you can fill out these item, and run the program by clicking 'Launch'
  2. The second tab lists the command that will be run when clicking on 'Launch'. This text can be edited and the changes will be instated when you launch the program. Alternately, when you tab to 'GUI', the text changes will be reflected in the GUI, provided the option name you listed is present.
  3. The third tab lists GUI help that is listed in the e2program.py body. This can be found in the line usage = """ blah, blah, blah """ in the e2program

When you fill the GUI with information, e2project manager will check your input for sanity. For example: Boxes supposed to contain integers will raise an error, in the status bar, if you enter a string. In addition to datatype checking, filename boxes will check to ensure that the file you list, exists. If you wish to know more information about a field in the GUI you can mouseover the field in question to popup a tooltip, which gives a quick description. If you want more help, you can use the wizard, in the projectmanager toolbar (described below).

pm.png

Using the Wizard to fill the GUI interface

For novice users it is advisable to use the wizard to help fill out the GUI interface. To use the GUI, open the desired GUI to fill out, then click on the Wizard tool: wizard.png
The wizard, usig the QT wizard framework, and walks the user through filling the fields in the GUI interface. The first step gives an introduction to the programs, and all subsequent steps give instructions on how to fill out each field in the GUI. To move from one step to the next, use the wizard next and previous buttons. When you reach the end click the finish button to close the wizard and finish filling out the GUI. At each step the wizard will check the input of sanity (data type checks and file existence). If the parameters are insane, an error will be printed to the PM status bar. You will not be permitted to proceed until these errors are corrected. :o

Description of the PM tools in the left vertical toolbar

browser.png This will display the filebrowser so you can browse through your files
e2help.png This is a GUI interface to the e2help.py. Using this GUI you can display help info for aligners, comparitors, processors, etc.
notepad.png This displays a widget to act as an electronic notebook for your project. Most programs that you run will display themselves along with all input parameters in this widget. The text is saved in your local directory as pmnotes.html
jobstatus.png This display a widget to display the job status of EMAN2 jobs, if you wish to terminate a job, use this widget to kill it. If you kill it manually your may create orpahn jobs, whereas this widget will remove the main job and all child jobs.
wiki.png This will load the wiki page in your default browser for the current e2program. If this toolbar is greyed out either there is no wiki page or it is not listed in the JSON file.
wizard.png This will load the wizard for the current e2program. If this tool is greyed out, there is no wizard available.
expert.png This will add fields to the e2program GUI interface, that are ment for expert users only. If this tool is greyed out, there are no expert fields for the current e2program.

Customizing the e2projectmanager workflow tree:

Unlike, e2workflow.py, e2projectmanager can be easily customized. The SPR and Tomo workflow tree are constructed using the JSON files, spr.json and tomo.json, respectively. These files reside in lib/pyemtbx or in the source code, libEM/pmconfig, and can be edited to customize the tree. The JSON file contains a list of dictionaries, which represents a toplevel(root/base) item in the workflow tree. Each dictionary must contain the following key-value pairs:

Enabling your e2program to be read by e2projectmanager:

To enable e2projectmanger to read your e2program and construct a GUI, some flags in the options code need to be set. You must use the EMAN2 parser, EMArgumentParser, a subclass of argparser. The standard key-value pairs of argparsers add_argument method can be set. In addition, in EMArgumentParser the following key-value pairs are used to build the GUI.

In addition to argparser's add_argument method, EMArgumentParser has the methods:

The add_pos_argument method has in addition to add_arguments key-value options:

The add_header method has in addition to add_arguments's key-value options:

For examples please see the programs, e2boxer.py, e2refine.py, e2ctf.py, etc

Resolving widget default values:

The widget default values are set according to the following rules:

  1. If a value for this widget(option) is found in the database, the default is set to the DB value
  2. If the mode flag is set and it has a defined default, this value will be used. For example mode="boxing['abc']" sets the default to 'abc' in mode "boxing".
  3. If a value is not in the database, the default is set to default key-value pair, listed in the options code
  4. otherwise the default=""

In addition to strings you can set mode['default'] to:

  1. self.getCS() which will set the default to the project spherical aberation
  2. self.getVoltage() which will set the default to the project voltage
  3. self.getAPIX() which will set the default to the project angstrom per pixel
  4. self.getMass() which will set the dafualt to the project mass

For example: mode="autofit['self.pm().getCS()']")

Adding Help information

Help information for a program (this will appear in the help tab of the GUI in e2projectmanager.py) can be added using a line of code: usage = """Blah, Blah, blah """ Most e2programs already have this information, so for an example open one of these up, such as: e2ctf.py

EMAN2/Programs/e2projectmanager (last edited 2013-01-25 19:10:47 by StephenMurray)