Batch files developed by the Albany SPIDER group


Contents
Align two micrographs
Display of angular projections
Subtract a lowpass filtered version of an image from itself
Classify particles by occupancy
Remove the Quantafoil circle from micrographs
Pick particles from a micrograph using a doc file of coordinates
Draw crosses in an image
Compare two CTF images by combining their half images
Image conversion utilities: gnu2gif.py, spiconvert.py
Make particle stack files
Select a noise file from a micrograph
Compare particles picked by two different methods
Rescale an image's gray levels to match those of a second image
Volume utilities
Resize a volume to match a reference volume
Find a threshold for surface display of a volume
Clean the noise surrounding a particle within a volume


align.bat
angle.bat
Align two micrographs that are defocus pairs of the same field. The shifts and rotations must be minor, resulting from slight differences introduced during scanning. The main output is simply a one line doc file with the shift and rotation parameters. To check results, the second image can be aligned, then subtracted from the first image.
Note: the resulting aligned image has some "grid" artifacts that may be mistaken for particles. To avoid problems with this,
  • Align the low defocus (image02) to the high defocus reference (img01),
  • pick particles in the high defocus image,
  • use the alignment parameters to correct the particle coordinates in the original low defocus image.
  • Use the cross batch file (below) to show where the picked particles are located in the aligned low defocus image.


    angdisp.bat
    Display of angular projections. Input is one of the angles000.ext files generated during refinement.


    bgdsub.bat
    Subtracts a lowpass filtered version of an image from itself. Same as a highpass filter. Useful for inspecting rings in power spectrum (pw_avg***) files.


    Classify particles by occupancy
    A set of batch files and SPIDER commands to separate particles into two groups: high and low occupancy.
    Author: Christian Spahn


    cmask.bat creates a small masked micrograph, and a doc file of alignment coordinates.
    cmfull.bat creates a full sized, circle masked micrograph.
    Circle mask for images of Quantifoil grids. See an example.

    cpick.spi pick particles from a micrograph using preselected coordinates.
    goodcoords.py creates doc files with x,y coordinates and good particle numbers.

    In the usual particle picking approach, an automated picking procedure such as lfc_pick.spi generates a set of windowed particle images, and doc files of their coordinates (x,y = center of image). Then a manual selection procedure (such as using Web) generates doc files of good particle numbers. Thus the coordinates and the good particle numbers are in 2 separate doc files.
    To pick particles from a micrograph using a coordinate doc file, goodcoords.py reads the coordinate and "good" doc files, and writes out doc files with both particle numbers and coordinates for the GOOD PARTICLES ONLY. You have to edit goodcoords.py if the files have names different than coords/sndc****, good/good**** and cpick/coords****. The input to goodcoords.py is the file numbers doc file.
    First run goodcoords.py:
    goodcoords.py ../filenums.hrs
    Then run cpick.spi using these new coordinate files as input.


    cross.bat, cross_p.bat
    Draw crosses in an image. Coordinates come from a doc file. Useful for marking particle positions. See an example.


    Create split images to compare power spectra

    ctf_compare.spi
    Given 2 input images, creates a same-sized output with the left half of one image and the right half of the other. Usually used to compare power spectrum images. Images must have same dimensions.
    half.spi
    Procedure called by ctf_compare.spi.

    half.bat
    Batch file used to create split images.
    halfdiag.bat
    Same, but cuts them in half diagonally.


    Image conversion utilities - useful for making gif images for html pages.

    (see also xv, imgcopy, and other imaging resources.)

    gnu2gif.py a program to convert a file of gnuplot plot commands to a gif file.
    Usage: gnu2gif plotfile

    spiconvert.py a Python program that converts Spider images to many other common formats (tif, gif, jpg) and vice versa. Give the output file the extension '.spi' to convert to Spider format. Uses PIL (Python Imaging Library).
    spiconvert.py image.spi image.tif        (converts Spider to tif)
    spiconvert.py lena.jpg lena.spi        (converts jpg to Spider)

    The following programs are superseded by spiconvert.py, but are included for completeness:
    spi2gif.bat converts a spider image to a gif file.
    or just try spi2gif.py spider.spi (outputs spider.gif)
    spi2jpg.bat converts spider to jpg.
    tif2spi.py a python program to convert tif files to Spider files. Works on small black and white images - don't use this on a micrograph.
    Usage: tif2spi image.tif ext, where 'ext' is the spider data extension.


    mkstack.spi, rdstack.spi
    Makes particle stack files (one per micrograph) using the selection doc files, Particles/good/ngood***.


    noise.bat, noise_p.bat
    This batch file and accompanying procedure may be used to generate a noise file from a micrograph (see Automated particle selection). A gallery of candidate noise files are produced; the user must view them in Web and select one.


    pcomp.bat, pcomp_p.bat
    Compare particles picked by two different methods. See an example.


    rescale_p.bat
    Procedure to rescale an image's gray levels to match those of a second image. Useful when comparing two images with very different intensity ranges.


    Resize a volume to match a reference volume.


    Find a threshold for surface display of a volume.


    clean.bat clean the noise surrounding a particle within a volume, using EC CL to extract connected clusters.


    Source file: batch/index.html     Source updated: 8/9/06    Bill Baxter