Differences between revisions 7 and 36 (spanning 29 versions)
Revision 7 as of 2011-07-01 16:32:38
Size: 6053
Editor: SteveLudtke
Comment:
Revision 36 as of 2019-04-29 03:09:16
Size: 2622
Editor: SteveLudtke
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== Porting an EMAN1 refinement project to EMAN2 == == Porting an EMAN1 refinement project to EMAN2.3 ==
Line 3: Line 3:
''Note : This page is for those who hate to read, the [[EMAN2/Tutorials|tutorials]] provide a much better way of learning EMAN2. This
will get you started if you just want to rapidly switch a project from EMAN1, though. Just remember if you find
yourself asking 'but what does THAT mean' when you read this, you're reading the wrong page :^)''
''Note : This page contains a simplified version of the EMAN2.1 tutorial, and assumes you are familiar with EMAN1. The full [[EMAN2/Tutorials|tutorials]] provide a much better way of learning EMAN2. This page will get you started if you just want to rapidly switch a project from EMAN1. If you find
yourself asking 'but what does THAT mean' when you read this, you're reading the wrong page!''
Line 7: Line 6:
=== A Quickstart Guide ===
This quickstart makes use of the workflow, as the goal here is presumably to get the
best results in EMAN2, and that is most easily accomplished in the workflow. It will take you all the way through a canonical reconstruction starting with data you've already processed in EMAN1 (or any other image processing package for that matter). This is written targeting primarily Linux/Mac users, but hopefully windows users will be able to follow along.
=== A Quick (but worse) Alternative ===
Following the guide below will effectively start your project from an EMAN1 start.hed/img. There are a variety of advantages in doing things this way, as a number of things have improved in EMAN2 vs EMAN1. However, if your goal is just to get started quickly, even if the results are good, but perhaps not optimal, there is an alternative:
Line 11: Line 9:
For purposes of this tutorial will call the directory where your eman1 data resides 'eman1'. You should also
make another directory where your EMAN2 project will reside. We will call this 'eman2', but you can use
any name you like.
 * create an empty folder adjacent to your EMAN1 refinement
 * run e2import.py --import_eman1 --curdefocushint ../folder/start.hed
  * note that the import script should work, but hasn't been updated in some time, so you will wind up with a few extra output files
 * run e2projectmanager.py and run the CTF -> CTF Autoprocess step (refer to the tutorial if you need details)
Line 15: Line 14:
 1. It is very important that you ''cd eman2'' before starting the EMAN2 GUI. Whatever directory you are in when you run e2workflow.py will become your project directory.
 1. Run ''e2workflow.py''. Two GUI windows should appear. One will show the status of running background jobs. The other will contain a collapsible tree of workflow items.
 1. In the workflow window, click on the ''Single Particle Reconstruction'' item.
  * Note that you are not expanding the list here, but clicking on the actual words.
  * This should pop up a window containing project parameters.
  * Fill in the first 4 parameters. Don't worry about the last 2.
  * Close the window.
 1. Now, expand the ''Single Particle Reconstruction'' item so you can see the detailed workflow under it.
 1. There are now 3 possibilities, for getting your data into EMAN2. You MUST reprocess the CTF in EMAN2, rather than use the already processed data from EMAN1 (unless you don't plan on doing any CTF correction), but on the bright side, this process is MUCH easier in EMAN2. So, the data we will import is the un phase-flipped data. It must also be completely unfiltered. Just the original, raw data. Pick only one of the following 3 sections in bold:
  * '''preferred option -> If you have the original micrographs/CCD frames, and EMAN1 style ''.box'' files ''':
   1. Select ''Filter Raw Data''
   1. Press the ''Browse to Add'' button
   1. Browse to, and select your micrograph/CCD files, and click ok.
   1. Select which options you need to use, then press ''OK''
    * It is important to get ''Inversion'' right. The final particles MUST appear '''bold''' white on a darker background, so whether you check this box depends on whether you are using stain or in cryo, and how the data was digitized. You can double-click on one of the images in the list to display it an see if you need inversion.
    * ''Filter X-ray Pixels'' is important for CCD data, but not if you are using a phase-plate.
    * ''edgenorm, generate thumbnail'', and ''associate with project'' should all be checked
    * ''in-place processing'' should normally be unchecked.
   1. Under ''Particles'', select ''Coordinate Import'' and ''Browse to Add'' again. Browse to and select your ''.box'' files, then press ''OK'' in both windows. Assuming your particle and box filenames match, everything should work well.
   1. You could actually go to the interactive particle picker and check/update the boxes at this point if you like, but we will just assume they are correct, and use ''Generate Output'' under Particles. Again, there are some options:
    * Box size is the most important one. In EMAN2, it is VERY important, if you want to obtain optimal results, to use a box size that is 1.5-2x the size of the maximum dimension of your particle. If you are dealing with a huge virus particle, you may need to skimp a bit on this, to avoid having a, say, 1500 box size, but some padding is essential for CTF correction to work well, and to avoid artifacts. See [[EMAN2/BoxSize|this list]] of good sizes to use. If you decide to change the box size later, it generally requires starting a new project from scratch, so consider this point very carefully.
    * You should select ''Write box image files'', ''normalize.edgemean'' and ''bdb''.
    * Only select ''invert'' here if you made a mistake at the earlier step, and your micrographs are still dark particles on a light background.
  * '''If you don't have those, but do have individual particle stack files without CTF correction for each frame :'''
   1. Double check to make sure your particle stacks have light particles on a darker background. If they have inverted contrast, you will need to invert them before proceeding. You can do this with ''e2proc2d.py <file> <file> --mult=-1 --inplace'' or any other method you like. Having this correct is CRITICAL to getting good results in EMAN2. Some of the algorithms require this.
   1. Select ''Particle Import'' under ''Particles'', ''Browse to Add'', and select all of your particle files. Press ''OK'' on both windows.
  * '''If you only have a ''start.hed'' file containing phase-flipped particles from EMAN1 :'''
   * '''''Sorry, this section not complete yet'''''
 1. Now that your particles have been imported into the EMAN2 project, you can begin with CTF correction. It is important to note at this point that CTF correction in EMAN2 entails a lot more than just CTF correction. It also makes an SSNR evaluation for each micrograph, which is used to perform weighting and other tasks. So, even if you do not feel you need to do CTF correction (neg stain or phase plates for example), we STRONGLY encourage you to go through this process anyway. You are always free to disable the CTF amplitude correction at a later stage, but you will still be able to take advantage of the other computed image properties.
This will create a new EMAN2 project from start.hed/img. It will:
 * split the particles by defocus
 * undo the EMAN1 phase-flipping
 * redetermine the CTF using the EMAN1 parameters as a starting point (you can use --curdefocusfix as an alternative)
 * re-generate phase-flipped as well as filtered/shrunk particles
 * build sets containing all of the particles
Line 45: Line 21:
'''UNDER CONSTRUCTION''' That's it, you're ready to start a refinement, though results may not be optimal.

----
While the above process should get you started quickly, to get optimal results, you should really follow the full single particle processing [[EMAN2/Tutorials|tutorial]], starting from micrographs, with the following caveats:
 * When importing micrographs, make sure you get the inversion correct. Particles in EMAN2 should be light on a darker background just like in EMAN1, and it is best if you start with the micrographs in this state.
 * You can use the import .box file tool just like in the tutorial
 * EMAN2 is much more sensitive to having a sufficiently large [[EMAN2/BoxSize|box size]. Before doing the "Particles -> Generate Output" step, make sure the box size you plan to use is adequete.
 * While there is no harm in doing unsupervised class-averaging, you probably already have a good 3-D starting model from your EMAN1 work, so you can likely skip the 2-D class averaging and initial model generation steps if you like

Porting an EMAN1 refinement project to EMAN2.3

Note : This page contains a simplified version of the EMAN2.1 tutorial, and assumes you are familiar with EMAN1. The full tutorials provide a much better way of learning EMAN2. This page will get you started if you just want to rapidly switch a project from EMAN1. If you find yourself asking 'but what does THAT mean' when you read this, you're reading the wrong page!

A Quick (but worse) Alternative

Following the guide below will effectively start your project from an EMAN1 start.hed/img. There are a variety of advantages in doing things this way, as a number of things have improved in EMAN2 vs EMAN1. However, if your goal is just to get started quickly, even if the results are good, but perhaps not optimal, there is an alternative:

  • create an empty folder adjacent to your EMAN1 refinement
  • run e2import.py --import_eman1 --curdefocushint ../folder/start.hed
    • note that the import script should work, but hasn't been updated in some time, so you will wind up with a few extra output files
  • run e2projectmanager.py and run the CTF -> CTF Autoprocess step (refer to the tutorial if you need details)

This will create a new EMAN2 project from start.hed/img. It will:

  • split the particles by defocus
  • undo the EMAN1 phase-flipping
  • redetermine the CTF using the EMAN1 parameters as a starting point (you can use --curdefocusfix as an alternative)
  • re-generate phase-flipped as well as filtered/shrunk particles
  • build sets containing all of the particles

That's it, you're ready to start a refinement, though results may not be optimal.


While the above process should get you started quickly, to get optimal results, you should really follow the full single particle processing tutorial, starting from micrographs, with the following caveats:

  • When importing micrographs, make sure you get the inversion correct. Particles in EMAN2 should be light on a darker background just like in EMAN1, and it is best if you start with the micrographs in this state.
  • You can use the import .box file tool just like in the tutorial
  • EMAN2 is much more sensitive to having a sufficiently large [[EMAN2/BoxSize|box size]. Before doing the "Particles -> Generate Output" step, make sure the box size you plan to use is adequete.

  • While there is no harm in doing unsupervised class-averaging, you probably already have a good 3-D starting model from your EMAN1 work, so you can likely skip the 2-D class averaging and initial model generation steps if you like

EMAN2/Eman1Transition/QuickStart (last edited 2019-04-29 03:09:16 by SteveLudtke)