Skip to content

Spider 3D refinement

Michael A. Cianfrocco edited this page Jun 7, 2018 · 1 revision

Home > 3D classification & refinement > Spider 3D refinement

Running a 3D refinement using SPIDER

The following scripts are a 'basic' 3D refinement, which means that the analysis routine has a more straightforward approach than the maximum-likelihood based routines of Relion. This program is robust, but requires command line inputs in order to run the 3D refinement.

  1. [Preparing your data] (https://github.com/temproconsulting/EM-processing-master/wiki/Spider-3D-refinement#preparing-your-data)
  2. [Setting up a refinement] (https://github.com/temproconsulting/EM-processing-master/wiki/Spider-3D-refinement#setting-up-a-refinement)
  1. [Running the refinement] (https://github.com/temproconsulting/EM-processing-master/wiki/Spider-3D-refinement#running-the-refinement)
  2. [Refinement outputs] (https://github.com/temproconsulting/EM-processing-master/wiki/Spider-3D-refinement#refinement-outputs)
  3. [Plotting FSC curves] (https://github.com/temproconsulting/EM-processing-master/wiki/Spider-3D-refinement#plotting-fsc-curves)

Preparing your data

#####Prepare 3D model

The follow conditions need to be met for your 3D model to be ready for refinement:

#####Prepare particles

To facilitate particle alignment, you can low-pass or band-pass filter your particle stack to improve euler angle assignment:

  • Low pass filter: 15 - 20 Angstroms
  • High pass filter: 300 - 500 Angstroms (no smaller than the particle diameter)
  • Read here for information on how to filter particle stacks

Setting up a refinement

In considering a 3D model refinement, you need to decide:

  1. Angular step
  2. Shift search range
  3. Cross-correlation cutoff for excluding 'bad' particles

####Angular step A typical refinement involves starting at a coarse angular step (25 degrees) and then decreasing it incrementally down to an angular step appropriate for your expected resolution. You should never refine more than 9 - 10 iterations because you will run the risk of aligning noise to your model.

For the refinement, you need to specific the starting angular step (coarse), the increment that the angular step is decreased between iterations, and the number of iterations.

A typical refinement might have the following changes in angular step:

20, 18, 16, 14, 12, 10

So, to specify this type of angular step changes, you'd have the following in your input parameter file:

20					 ;Starting angular step for refinement
6					;Number of iterations
2					;Increment for angular step decreases

This example shows that the starting angle will be 20 degrees, which will be decreased by 2 degrees over the course of 6 iterations to produce 20, 18, 16, 14, 12, 10 degree angular steps.

####Shift search range

The shift search range specifies how far around the center of the image that the program should search for shifting the particles. This is an important parameter because it will shift the particles so that they are centered for back projection.

Typical values are 1/3 of the box size:

90					;Box size (pixels)
50                  ;Radius (pixels)
30                  ;Last ring for searching (2*lastring less (BoxSize/2))

NOTE that this value is different than the radius of the particle. The radius is used for backprojection of the particles into a 3D volume, while the Last ring for searching is the area that will be searched for shifting.

You'll get an error message if the search radius ('Last ring for searching') is too close to the edge of the box. Therefore, the maximum search range needs to be less than half of the box size.

####Cross correlation cutoff

A final decision that needs to be made for your refinement is how many particles to include in the reconstruction step. Typically, you want to include 40 - 60% of your data into a 3D model. But, in some cases you know that all of your data are really good or that you are trying to fish out a small population in your dataset.

To help you with this, there is a parameter that will allow you to decide how many particles to include:

1                   ;Standard deviation cutoff (+1=25% included; -1=75%)

This number is the standard deviations away from the average to include. So, assuming a Gaussian distribution, +/- 1 standard deviation is ~33% of the data. To be more clear:

+1 - 33% of data are included
0  - 50% of data are included
-1 - 66% of data are included

Running the refinement

To help you specify the refinement parameters for SPIDER, there is an input parameter file that has all of the parameters required for the refinement commented: (EM-processing/3D-refinement/spider_refine_input.txt)

start_filt020       ;Filtered particles (no extension)
start               ;Unfiltered particles (no extension)
2000                ;Number of particles
volume_filt         ;Reference volume (no extension)
refine1             ;Output directory
/path/to/tmp        ;Absolute path to temporary working directory that does NOT exist yet. 
128                 ;Box size (pixels)
50                  ;Radius (pixels)
30                  ;Last ring for searching (2*lastring less than (Box/2))
20					;Starting angular step for refinement
4					;Number of iterations
2					;Increment for angular step decreases
1                   ;Standard deviation cutoff (+1=25% included; -1=75%)
8                   ;Number of processors

Copy all of the scripts from EM-processing/3D-refinement to your current working directory:

 cp EM-processing/3D-refinement/* .

Running the command:

spiderv13 spi @refine_w_apmq < spider_refine_input.txt

###Refinement outputs

During the refinement, the program will be writing files into the temporary working directory that you specified in the inputs. After it finishes, it will copy all files into the output folder that you specified. The iterations are numbered from 2 to the number of iterations that you specified. For instance, these are the outputs for the second step of the refinement:

####angular_file_003.spi Euler angles for each particle (phi, theta, spi).

####apmq003.spi Alignment parameter file from 'AP MQ', containing information on which reference each particle matched, shifts, etc. You can read more [here] (http://spider.wadsworth.org/spider_doc/spider/docs/man/apmq.html).

####bprp_vol003.spi Unfiltered volume from particle back projection.

####dres003.spi Resolution file containing FSC curve information. The third column is the FSC information.

####select003.spi File containing the particle numbers for the particles that were included in the reconstruction. The number of lines in this file tells you how many particles were were included.

####selecteven_003.spi File containing the particles for splitting the data in half for the FSC curve.

####selectodd_003.spi File containing the particles for splitting the data in half for the FSC curve.

####shifts003.spi Shift information for each particle.

####vol003.spi Filtered model from back projection.

####vol1003.spi Unfiltered half volume for FSC curve calculation.

####vol2003.spi
Unfiltered half volume for FSC curve calculation

###Plotting FSC curves

To plot the FSC curve for a given stage of a refinement, you can do this quickly using gnuplot:

$ gnuplot 
plot 'dres003.spi' using 3:5 w l

This will display a plot that looks like this:

In this plot, the Y-axis is FSC (correlation) and the X-axis is resolution (in reciprocal space units). The point at which this line dips below FSC=0.5 is considered to be a conservative estimate of resolution for your 3D model.

After finding where the plot dips below 0.5 on the Y-axis, read out the X-axis coordinate. In this example, it is approximately 0.142. To convert spatial frequency to resolution:

 Resolution = (Pixel size)/(Spatial frequency)

So, if the pixel size is 1.5 Angstroms/pixel, then 0.142 corresponds to 10.5 Angstroms.

Clone this wiki locally