Folder Arrangement in EMAN2.2 projects

Detailed description of files

You will find a detailed description of the contents of many files produced by refinements and other programs here: Output file descriptions and details

Overall project folder arrangement

When using e2projectmanager.py and following canonical EMAN2 procedures, your data will be contained within a "project" with a very specific organization. For things to work properly you must not break this organization. If you are just running EMAN2 command-line programs yourself, and are not using the projectmanager or other GUI tools, you can do what you like, of course, but regardless we strongly suggest following the canonical structure.

This file/folder organization is important for a number of reasons. First, if you do things this way, all of your work in the project is preserved, so you can track back the full history of what you did to get to your final result. This can be extremely helpful when trying to write a manuscript. Second, it means that anyone familiar with EMAN2 can easily browse the files in your project and understand what you did without trying to follow notes in your lab notebook. Finally, it means that all EMAN2 programs know where to look for files without having to continuously ask you for locations/names (when the user doesn't need to make a decision anyway).

Note: It is critical when running command-line programs within a project that you run them from the project folder, not from subfolders. For example, if you are in the particles folder, then try to build a set by referencing ../sets you can create all sorts of havoc.

A project directory will normally contain these folders, and some other (unlisted) files:

0README.txt
info/
particles/
micrographs/  (optional)
movies/ (optional)
sets/
multi_xx/
r2d_xx/
refine_xx/

The micrographs/ folder, if present, will contain the raw micrograph images. These are used for particle picking, whole frame CTF fitting, etc. If pre-boxed particles have been imported into the project, then this folder will not exist. Once particles have been extracted in the "Generate Output" step, the contents of this folder are not used again in the standard workflow.

The movies/ folder, if present, will contain movie-mode stack files for each micrograph present in the micrographs/ folder. These movies can be aligned with e2ddd_movie or e2ddd_particles to produce drift-corrected micrographs or particle images (see the appropriate program Wiki pages for more information on this).

The particles/ folder will contain files like:

img00001.hdf
img00001__ctf_flip_fullres.hdf
img00001__ctf_flip_lp14.hdf
img00001__ctf_flip_lp5.hdf
img00002.hdf
img00002__ctf_flip_fullres.hdf
img00002__ctf_flip_lp14.hdf
img00002__ctf_flip_lp5.hdf

where the __ (double underscore) denotes modifications of the same set of particles. That is, if you have a file XXX.hdf and XXX__YYY.hdf, both files will contain the same particles, but XXX__YYY.hdf may have undergone some processing. XXX.hdf should represent the original, unprocessed particle images.

The info/ folder will then contain files like:

img00001_info.json
img00001_info_jsonimg.hdf
img00002_info.json
img00002_info_jsonimg.hdf
img00003_info.json
img00003_info_jsonimg.hdf

Where each file contains the information for a particular micrograph as documented http://blake.bcm.edu/emanwiki/Eman2InfoMetadata. These JSON files are generally human-readable and editable. The e2display.py browser can be used to look at the contents of .json files in a more organized fashion. The .hdf files accompany the .json files and contain any binary image data which would otherwise have been packed into the JSON files.

sets/ will contain files like:

all.lst
all__ctf_flip_fullres.lst
all__ctf_flip_lp14.lst
all__ctf_flip_lp5_even.lst
all__ctf_flip_lp5.lst
all__ctf_flip_lp5_odd.lst
goodlosnr__ctf_flip_fullres.lst
goodlosnr__ctf_flip_lp14_even.lst
goodlosnr__ctf_flip_lp14.lst
goodlosnr__ctf_flip_lp14_odd.lst
goodlosnr__ctf_flip_lp5.lst
goodlosnr.lst

Each of these files is a text file containing references to particles in the particles/ folder. A "set" is something like the '.star' files used in packages like Relion and XMIPP. That is, it allows you to combine particles from many micrographs without having to have two copies of the (disk hungry) image data. The names of the .lst files follow the same convention as the particles/ folder. The contents of one of these .lst files will look like:

#LSX
# This file is in fast LST format. All lines after the next line have exactly the number of characters shown on the next line. This MUST be preserved if editing.
# 47
0       particles/01252014_AE_100_ptcls.hdf
1       particles/01252014_AE_100_ptcls.hdf
2       particles/01252014_AE_100_ptcls.hdf
3       particles/01252014_AE_100_ptcls.hdf
4       particles/01252014_AE_100_ptcls.hdf
5       particles/01252014_AE_100_ptcls.hdf

Note that the references to individual particles are from the project folder. You can run e2proc2d.py or any other program on an LST file just as if it actually contained the images it references, but you MUST do this from the project folder, not from any other place. Hand-editing LSX files is not recommended, since every line must have exactly the same number of characters in it, or the file will become invalid.

The multi_xx/, r2d_xx/ and refine_xx/ folders contain the results of e2refinemulti.py, e2refine2d.py and e2refine_easy.py runs, which are documented here: EMAN2/ProgramFiles

Why this structure ?

This structure is not arbitrary, and its logic has been carefully designed. If, for example, LST files contained an absolute path to a referenced image file, like /home/stevel/data/particles/abc.hdf, then if I later decided to move my project to a different hard drive, the LST file would no longer work properly. Similarly, if the LST files in sets contained references to ../particles/abc.hdf, it would be confusing because that means you would have to run programs from within the sets directory for the references to be valid.

To deal with these and other issues, the overall structure is such that all references are made relative to the project folder, and it is expected that command-line programs will all be executed from the project folder. This makes the project the main organizational unit for data. A project folder can be moved around from disk to disk or machine to machine without anything breaking. Additional sub-folders can be made within a project, as long as the rules are followed, and programs are run from the project level. That is, with this scheme, you never have to ask yourself, "now what folder should I be in when I run my refinement?" The answer is always "the project folder".

EMAN2/DirectoryStructure (last edited 2018-12-09 14:38:28 by SteveLudtke)