-
Notifications
You must be signed in to change notification settings - Fork 4
Extracting particles outside of Relion
Home > Extracting particles outside of Relion
The following program will make particle stacks that are raw (no CTF correction) or phase-flipped (CTF-correction). The phase flipped particle stack results from multiplying the micrograph by its own CTF, thus making all CTF values positive.
The input options will be shown if you run the program without any inputs:
$ EM-processing/makeStack.py Usage: makeStack.py --micros= --box= -o Options: -h, --help show this help message and exit --micros=FILE Path to micrographs with wildcard in quotes ('*en.mrc') (Not needed for tilt mates) -o FILE Output stack name (.img). If tilt mates, do not provide .img extension, output stack name will be the base name for tilted and untilted particles. --bin=INT Binning factor used during boxer picking (Default=1) --invert Optional: Invert contrast of micrographs --boxsize=INT Optional: Box size for final stack. (Default is size used in boxer picking) --binstack=INT Optional: Binning for final extracted particle stack. (Default=1) --phaseflip Flag to phase flip particles --ctf=STRING If phase-flipping - ctf_param.txt output file from estimateCTF_CTFFIND.py if not using tilt mates --untilt=STRING If extracting tilt mates - provide CTFTILT output file for UNtilted micrographs created by estimateCTF_CTFTILT.py. Assumes extension is '01'. --tilt=STRING If extracting tilt mates - provide CTFTILT output file for TILTED micrographs created by estimateCTF_CTFTILT.py. Assumes extension is '00'. --noinsideonly Flag to NOT exclude particles on edges of images (needed for tilt pairs) -d debug
The 'makeStack.py' program will take .mrc micrograph inputs and .box files that have the same name, except for the .mrc/.box. For instance, if you have a micrograph named 'micro1.mrc', it needs to have a .box file named 'micro1.box'.
Sometimes it is advantageous to box micrographs that have already been binned by a factor of 2 or 4. If you did this, you need to specify this to the 'makeStack.py' program so that it picks the particles accurately. If you binned by 2, then you add the option '--bin=2'.
During particle picking in boxer, there will be a box size that you use during picking. By default, the stack making program will use this box size as the final box size for the extracted particle stack. If you would like a different box size, you can specify '--box=200' to set the output box size to 200 pixels.
If the micrographs are from cryo-EM imaging, you will need to invert the contrast because almost all EM image analysis software uses 'white' particles on a 'black' background. This can be specified '--invert' when making the stack.
By default, the boxing program will exclude any particle where the box goes outside of the image boundary. Sometimes, you don't want the program to automatically exclude these particles. For instance, if you are manually making particle stacks for tilt pairs, you need to keep track of every particle tilt pair, so you don't want any removed without removing it from both. Since this program is not advanced enough to remove particles from tilt mates, there is an option '--noinsideonly' that will export a particle stack with all particles, even if the window goes over the image boundary.
For tilted datasets, you will need to provide CTFTILT output files (calculated by estimateCTF_CTFTILT.py) for the untilted and tilted micrographs. These input text files will be provided instead of the '*.mrc' input.
Example command:
$ EM-processing-master/makeStack.py -o stack1 --bin=1 --boxsize=128 --binstack=2 --untilt=ctftilt_param_untilt.txt --tilt=ctftilt_param_tilt.txt --noinsideonly
NOTE:
- The -o input option specifies the basename for untilted and stacks. In this example, two stacks would be created: stack1_untilted.img and stack1_tilted.img.
- You cannot phase flip the untilted stack when extracting from tilt mates
- The option --noinsideonly makes sure that ALL particles are output from the micrograph, so that exact correspondence is preserved between the tilted and untilted stack.
To make a raw particle stack, you just need the path to the micrographs and the box files. In the example below, the binning size for picking particles was 4, so that was specified on the command line:
$ EM-processing/makeStack.py --micros=/path/to/micros/ --box=/path/to/boxes/ -o outputStack.img --bin=4
To make a phase-flipped particle stack, you just need the output file from CTF estimation along with the path to the micrographs and the box files. In the example below, the binning size for picking particles was 4, so that was specified on the command line:
$ EM-processing/makeStack.py --micros=/path/to/micros/ --box=/path/to/boxes/ -o outputStack.img --bin=4 --ctf=ctf_params.txt