Differences between revisions 1 and 2
Revision 1 as of 2011-09-27 17:06:12
Size: 1875
Editor: JohnFlanagan
Comment:
Revision 2 as of 2011-09-27 17:30:49
Size: 4470
Editor: JohnFlanagan
Comment:
Deletions are marked like this. Additions are marked like this.
Line 17: Line 17:
 * "PROGRAM", the name of the e2 program that runs when this tree item is clicked
 * "NAME", the name of this tree item
 * "CHILDREN", a list of dicts that list the child tree items. If the are no children then use a blank list, []
 * "MODE", an optional key-value pair, that determines the mode the program is run in more on this in the following section.
Line 18: Line 22:
"ICON", "PROGRAM", "NAME", === Enabling you 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 sublcass of argparser. The standard key-value pairs of argparsers add_argument method can be set. In additon, in EMArgumentParser the following key-value pairs are used to build the GUI.

 * guitype (required), the type of gui widget you want ot display. The possibilites are: 'intbox', 'floatbox', 'strbox', 'boolbox', 'filebox', 'combobox', 'comboparambox', 'symbox', 'automask3d'
 * row (required), determines which row the GUI is placed in (uses QGridLayout)
 * col (required), determines which colum the GUI is placed in (uses QGridLayout)
 * rowspan (required), determines the rowspan of the widget
 * colspan (required), determines the columnspan of the widget
 * choicelist, used in the combobox and comboparambox widgets. This is a string which is eval'ed to generate a list or a dictionary whose keys are displayed in the combobox widget
 * guidefault, this overides the argparse default to set the widget default value
 * mode, this is only used if in the JSON file you added the key-value pair, "MODE":"myvalue". This is used if you want to have multiple tree items that run the same program, but display diffrent GUIs. The mode allows specification of which GUI should display which option(widget). For example if in the JSON file I sed "MODE":"test", then I would add mode="test" as an option key-value pair.

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

 * add_pos_argument, this method allows a positional argument widget to set. The above key-value paris can be used, in additon to:

 1. positional, set this boolean value to True to use this as a positional argument
 1. name, the name of this argument, displayed in the widget

 * add_header, this method allows a header label to be displayed in the GUI. This method used the key-value pairs, row,col,colspan,rowspan in addition to:

 1. Tiltle, the text to display in this header label
 1. Name, the name of this widget

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

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 projectmanager 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 open a project using the menu, Project->Open Project. To create a new project, Project->New Project, and to edit an existing project, Project->Edit Project. Once a project is loaded all new data that the projectmanger creates will be placed in the project directory no matter when e2projectmanger is being run from. This represents a singificant improvement over e2workflow.py.

e2ProjectManger can, currently, be run in two modes, SPR (Single Particle Reconstruction) and Tomo(tomographic). To change modes use the menu, Mode->SPR mode or Mode->Tomo mode.

Customizing the e2projectmanager worlflow tree:

Unlike, e2workflow.py, e2projectmanager can be easily cutomized. The SPR and Tomo workflow tree are constructed using the JSON files, spr.json and tomojson, respectivly. These files reside in lib/pyemtbx 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 flowwing key-value pairs:

  • "ICON", the icon representing this item in the tree. The possibilites are: "single_image", "multiple_images", "green_boxes", "ctf", "web", "single_image_3d", "refine", "eulers", "resolution", "tomo_hunter"
  • "PROGRAM", the name of the e2 program that runs when this tree item is clicked
  • "NAME", the name of this tree item
  • "CHILDREN", a list of dicts that list the child tree items. If the are no children then use a blank list, []
  • "MODE", an optional key-value pair, that determines the mode the program is run in more on this in the following section.

Enabling you 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 sublcass of argparser. The standard key-value pairs of argparsers add_argument method can be set. In additon, in EMArgumentParser the following key-value pairs are used to build the GUI.

  • guitype (required), the type of gui widget you want ot display. The possibilites are: 'intbox', 'floatbox', 'strbox', 'boolbox', 'filebox', 'combobox', 'comboparambox', 'symbox', 'automask3d'
  • row (required), determines which row the GUI is placed in (uses QGridLayout)
  • col (required), determines which colum the GUI is placed in (uses QGridLayout)
  • rowspan (required), determines the rowspan of the widget
  • colspan (required), determines the columnspan of the widget
  • choicelist, used in the combobox and comboparambox widgets. This is a string which is eval'ed to generate a list or a dictionary whose keys are displayed in the combobox widget
  • guidefault, this overides the argparse default to set the widget default value
  • mode, this is only used if in the JSON file you added the key-value pair, "MODE":"myvalue". This is used if you want to have multiple tree items that run the same program, but display diffrent GUIs. The mode allows specification of which GUI should display which option(widget). For example if in the JSON file I sed "MODE":"test", then I would add mode="test" as an option key-value pair.

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

  • add_pos_argument, this method allows a positional argument widget to set. The above key-value paris can be used, in additon to:
  • positional, set this boolean value to True to use this as a positional argument
  • name, the name of this argument, displayed in the widget
  • add_header, this method allows a header label to be displayed in the GUI. This method used the key-value pairs, row,col,colspan,rowspan in addition to:
  • Tiltle, the text to display in this header label
  • Name, the name of this widget

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

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