4982
Comment:
|
6104
|
Deletions are marked like this. | Additions are marked like this. |
Line 4: | Line 4: |
{{attachment:helixboxer_diagram.png}} | {{attachment:e2helixboxer_diagram.png}} |
Line 69: | Line 70: |
In command-line mode, you can only work with one micrograph at a time. You should have already boxed particles in the GUI mode; if that is done the box coordinates should be saved in the EMAN2 database. | In command-line mode, you can only work with one micrograph at a time. Before using it, helices must be boxed in the GUI mode or imported from a formatted text file. In either case, the helix-box coordinates will be saved in the EMAN2 database. |
Line 71: | Line 72: |
e2helixboxer.py <options (not --gui)> <micrograph> | Note: As in the EMAN2 convention, data is saved automatically in a database in the current working directory as you use the program. To access this data again, start programs in this same directory the next time. |
Line 73: | Line 74: |
Options: | {{{ e2helixboxer.py <options (not --gui)> <micrograph> }}} |
Line 75: | Line 76: |
--version | === Importing Helix Coordinates === --db-add-hcoords=DB_ADD_HCOORDS: Adds helix coordinates to the database from the specified file (in EMAN1 *.box format) |
Line 77: | Line 79: |
. show program's version number and exit | {{{ x1-w/2 y1-w/2 w w -1 x2-w/2 y2-w/2 w w -2 ... }}} |
Line 79: | Line 85: |
-h, --help | --db-set-hcoords=DB_SET_HCOORDS: Replaces the helix coordinates in the database with the coordinates from the specified file (in EMAN1 *.box format) |
Line 81: | Line 87: |
. show this help message and exit | -w HELIX_WIDTH, --helix-width=HELIX_WIDTH: Helix width in pixels. Overrides the width in coordinates file. |
Line 83: | Line 89: |
Examples: {{{ e2helixboxer.py --db-add-hcoords=coordinates.txt --helix-width=210 micrograph_03.hdf e2helixboxer.py --db-set-hcoords=newcoordinates.txt -w 200 }}} === Exporting Helix Data === |
|
Line 93: | Line 107: |
-w HELIX_WIDTH, --helix-width=HELIX_WIDTH . Helix width in pixels Example: {{{ e2helixboxer.py --helix-coords=hcoords.txt --helix-images=bdb:helix_images -w 215 e2helixboxer.py -X hcoords.txt -x helix.hdf --helix-width=210 }}} === Exporting Particle Data === |
|
Line 101: | Line 129: |
-w HELIX_WIDTH, --helix-width=HELIX_WIDTH . Helix width in pixels |
e2helixboxer.py: Overview
e2helixboxer.py is used to select rectangular 2D projections of helices from a micrograph, and extract overlapping particles from the boxed helices. The boxing must be done in GUI mode, but extracting particles from boxed regions may be done from the GUI or from the command line.
GUI mode
To start the program's graphic user interface, use the "--gui" option. You can follow this with a micrograph filename, a list of micrograph filenames, or nothing.
$ e2helixboxer.py --gui <micrograph1> <micrograph2> <...>
$ e2helixboxer.py --gui $ e2helixboxer.py --gui 101.mrc $ e2helixboxer.py --gui *.mrc micrograph.hdf *.img abc.dm3
The left window is the helix viewer, the middle is the micrograph viewer, and the right is the main window.
The main window shows a list of open micrographs and how many helices you have boxed in each one. (Actually, only one micrograph is loaded in memory at a time, but this allows for quick switching between particles.) Any micrographs you specified after the "--gui" option will be listed.
Box Editing |
|
Draw box |
Left click and drag |
Move box |
Left click near box center and drag |
Move one box endpoint |
Left click near box end and drag |
Delete box |
Hold shift and left click inside box |
After you have boxed the helices in a micrograph, you can go to "File->Save" to save the coordinates and image data of the helices and the particles you extract from them.
A. Write Helices checkbox:
- Helices are the rectangles that you boxed. You can save their
- 1. Coordinates to text file using the EMAN1 file format, but with a default *.txt file extension.
x1-w/2 y1-w/2 w w -1 x2-w/2 y2-w/2 w w -2 ...
- where (x1, y1) and (x2, y2) are the coordinates on the micrograph for the helical axis endpoints, and w is the width of the helix boxes.
- 2. Helix image data to image files
B. Write Particles checkbox:
- 1. Overlap: Distance in pixels that two adjacent particles overlap along the line connecting their centroids. Default: 90% of particle length
- 2. Length: Distance between the centroids of two adjacent particles. Default: same as helix width
- 3. Width: Width of particles in pixels. Default: same as helix width
- 4. Write particle coordinates: For each helix, save the coordinates for the midpoint of each particle in that helix.
- 5. Write Particle images: Save the image data for each particle in each helix. All the particles in a helix will go in a stack file if the file type supports stacks.
- a. Normalize edge-mean: Apply the "normalize.edgemean" processor to each particle before saving.
- b. Use unrotated particle: The particles will squares with horizontal and vertical sides. The length of a side of the square will be the maximum of the chosen particle width and particle height. The distance between the centroids of two adjacent particles will still equal the particle length, and the overlap will be measured along that line joining their midpoints.
Command-line mode
In command-line mode, you can only work with one micrograph at a time. Before using it, helices must be boxed in the GUI mode or imported from a formatted text file. In either case, the helix-box coordinates will be saved in the EMAN2 database.
Note: As in the EMAN2 convention, data is saved automatically in a database in the current working directory as you use the program. To access this data again, start programs in this same directory the next time.
e2helixboxer.py <options (not --gui)> <micrograph>
Importing Helix Coordinates
--db-add-hcoords=DB_ADD_HCOORDS: Adds helix coordinates to the database from the specified file (in EMAN1 *.box format)
x1-w/2 y1-w/2 w w -1 x2-w/2 y2-w/2 w w -2 ...
--db-set-hcoords=DB_SET_HCOORDS: Replaces the helix coordinates in the database with the coordinates from the specified file (in EMAN1 *.box format)
-w HELIX_WIDTH, --helix-width=HELIX_WIDTH: Helix width in pixels. Overrides the width in coordinates file.
Examples:
e2helixboxer.py --db-add-hcoords=coordinates.txt --helix-width=210 micrograph_03.hdf e2helixboxer.py --db-set-hcoords=newcoordinates.txt -w 200
Exporting Helix Data
-X HELIX_COORDS, --helix-coords=HELIX_COORDS
- Save coordinates for helices in EMAN1 *.box format:
- x1-w/2 y1-w/2 w w -1
- x2-w/2 y2-w/2 w w -2
-x HELIX_IMAGES, --helix-images=HELIX_IMAGES
- Save images of the helices. The file name specified will have helix numbers added to it.
-w HELIX_WIDTH, --helix-width=HELIX_WIDTH
- Helix width in pixels
Example:
e2helixboxer.py --helix-coords=hcoords.txt --helix-images=bdb:helix_images -w 215 e2helixboxer.py -X hcoords.txt -x helix.hdf --helix-width=210
Exporting Particle Data
-P PTCL_COORDS, --ptcl-coords=PTCL_COORDS
- Save coordinates of the centers of particles with the specified overlap in pixels
-p PTCL_IMAGES, --ptcl-images=PTCL_IMAGES
- Save images of the particles with the specified overlap in pixels. The file name specified will have helix numbers (and particle numbers if the file type does not support image stacks) added to it.
--ptcl-overlap=PTCL_OVERLAP
- Particle overlap in pixels
--ptcl-length=PTCL_LENGTH
- Particle length in pixels
--ptcl-width=PTCL_WIDTH
- Particle width in pixels
--ptcl-not-rotated Particles are oriented as on micrograph. They are
- square with length max(ptcl_length, ptcl_width).
--ptcl-norm-edge-mean
- Apply the normalize.edgemean processor to each particle.