STAR file utilities: Difference between revisions

From Relion
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
__TOC__
== Overview of utilities ==


For any of the programs below, instructions on how to use them are printed to the screen if no arguments are given.
For any of the programs below, instructions on how to use them are printed to the screen if no arguments are given.


== relion_star_loopheader ==
* '''relion_star_loopheader''' : generates the header of STAR-file (with given labels)
* '''relion_star_datablock_stack''' : generates the datablock for a given number of images in a stack
* '''relion_star_datablock_singlefiles''' : generates the datablock for all images represented by a wildcard
* '''relion_star_datablock_ctfdat''' : generates the datablock for all images inside an XMIPP-style <code>ctfdat</code> file.
* '''relion_star_printtable''' : prints the contents of specified labels of a given datablock to the screen.
* '''relion_star_plottable''' : uses gnuplot to produce XY-plots of columns in a datablock


Generates the header of STAR-file with the given labels, ''in that order''. '''Note that the order of the labels in the STAR header should be the same as the order of the entries on each line of the following datablock!!'''
== Example use ==
* Generate a STAR file for images that are stored per-micrograph and in single-file SPIDER format:
relion_star_loopheader rlnImageName rlnMicrographName rlnDefocusU rlnDefocusV rlnDefocusAngle rlnVoltage rlnSphericalAberration rlnAmplitudeConstrast > all_images.star
relion_star_datablock_singlefiles "micrograph1/images*.spi" micrograph1 10000 10500 34 200 2.26 0.1 >> all_images.star
relion_star_datablock_singlefiles "micrograph2/images*.spi" micrograph2 15000 14500 37 200 2.26 0.1 >> all_images.star
relion_star_datablock_singlefiles "micrograph3/images*.spi" micrograph3 22300 22000 43 200 2.26 0.1 >> all_images.star


Example:
* Generate a STAR file for images that are as an individual stack for each micrograph:
  relion_star_loopheader rlnImageName rlnDefocusU rlnDefocusV rlnDefocusAngle rlnVoltage rlnSphericalAberration rlnAmplitudeConstrast
  relion_star_loopheader rlnImageName rlnMicrographName rlnDefocusU rlnDefocusV rlnDefocusAngle rlnVoltage rlnSphericalAberration rlnAmplitudeConstrast > all_images.star
will yield:
  relion_star_datablock_stack 126 mic1.mrcs mic1.mrcs 10000 10500 34 200 2.26 0.1 >> all_images.star
data_
  relion_star_datablock_stack 102 mic2.mrcs mic2.mrcs 15000 14500 34 200 2.26 0.1 >> all_images.star
loop_
  relion_star_datablock_stack 135 mic3.mrcs mic3.mrcs 22300 22000 34 200 2.26 0.1 >> all_images.star
_rlnImageName
_rlnDefocusU
_rlnDefocusV
_rlnDefocusAngle
  _rlnVoltage
  _rlnSphericalAberration
  _rlnAmplitudeConstrast


== relion_star_datablock_stack ==
* Generate STAR file from an XMIPP-style <code>ctfdat</code> file:
Generates the datablock for N images in a stack, any number of additional data values (such as DefocusU/V, AmplitudeConstrast, etc values) are in subsequent arguments.
relion_star_loopheader rlnImageName rlnMicrographName rlnDefocusU rlnDefocusV rlnDefocusAngle rlnVoltage rlnSphericalAberration rlnAmplitudeContrast>  all_images.star
 
  relion_star_datablock_ctfdat all_images.ctfdat>> all_images.star
Example (N=3):
relion_star_datablock_stack 3 my_images.mrcs 10000 10500 0.0 200 2 0.1
will yield:
000001@my_images.mrcs 10000 10500 0.0 200 2 0.1
000002@my_images.mrcs 10000 10500 0.0 200 2 0.1
000003@my_images.mrcs 10000 10500 0.0 200 2 0.1
 
== relion_star_datablock_singlefiles ==
Generates the datablock for all images represented by the wildcard in the first argument, any number of additional data values (such as DefocusU/V, AmplitudeConstrast, etc values) are in subsequent arguments.
 
Example:
relion_star_datablock_singlefiles "tmp/*.spi" 10000 10500 0.0 200 2 0.1
will yield:
tmp/t1.spi 10000 10500 0.0 200 2 0.1
tmp/t2.spi 10000 10500 0.0 200 2 0.1
tmp/t3.spi 10000 10500 0.0 200 2 0.1
 
== relion_star_datablock_ctfdat ==
Generates the STAR datablock for all images in an xmipp-format CTFDAT file. Note that the sign for XMIPP's defocusU, defocusV and Q0 values is reversed.
Also note that all xmipp-format CTFPARAM files that are referred to in the CTFDAT file should have the same order of the labels.
 
Example:
  /public/EM/RELION/relion/bin/relion_star_datablock_ctfdat all_images.ctfdat
 
== relion_star_printtable ==
Prints the contents of the specified labels (argument 3...N) in a given datablock (argument 2) from a starfile (argument 1) to the screen.
 
Example:
  relion_star_printtable run3_it000024_mlmodel.star data_mlmodel_class_1 _rlnResolution _rlnSsnrMap
 
== relion_star_plottable ==

Revision as of 14:53, 6 October 2011

Overview of utilities

For any of the programs below, instructions on how to use them are printed to the screen if no arguments are given.

  • relion_star_loopheader : generates the header of STAR-file (with given labels)
  • relion_star_datablock_stack : generates the datablock for a given number of images in a stack
  • relion_star_datablock_singlefiles : generates the datablock for all images represented by a wildcard
  • relion_star_datablock_ctfdat : generates the datablock for all images inside an XMIPP-style ctfdat file.
  • relion_star_printtable : prints the contents of specified labels of a given datablock to the screen.
  • relion_star_plottable : uses gnuplot to produce XY-plots of columns in a datablock

Example use

  • Generate a STAR file for images that are stored per-micrograph and in single-file SPIDER format:
relion_star_loopheader rlnImageName rlnMicrographName rlnDefocusU rlnDefocusV rlnDefocusAngle rlnVoltage rlnSphericalAberration rlnAmplitudeConstrast > all_images.star
relion_star_datablock_singlefiles "micrograph1/images*.spi" micrograph1 10000 10500 34 200 2.26 0.1 >> all_images.star
relion_star_datablock_singlefiles "micrograph2/images*.spi" micrograph2 15000 14500 37 200 2.26 0.1 >> all_images.star
relion_star_datablock_singlefiles "micrograph3/images*.spi" micrograph3 22300 22000 43 200 2.26 0.1 >> all_images.star
  • Generate a STAR file for images that are as an individual stack for each micrograph:
relion_star_loopheader rlnImageName rlnMicrographName rlnDefocusU rlnDefocusV rlnDefocusAngle rlnVoltage rlnSphericalAberration rlnAmplitudeConstrast > all_images.star
relion_star_datablock_stack 126 mic1.mrcs mic1.mrcs 10000 10500 34 200 2.26 0.1 >> all_images.star 
relion_star_datablock_stack 102 mic2.mrcs mic2.mrcs 15000 14500 34 200 2.26 0.1 >> all_images.star
relion_star_datablock_stack 135 mic3.mrcs mic3.mrcs 22300 22000 34 200 2.26 0.1 >> all_images.star
  • Generate STAR file from an XMIPP-style ctfdat file:
relion_star_loopheader rlnImageName rlnMicrographName rlnDefocusU rlnDefocusV rlnDefocusAngle rlnVoltage rlnSphericalAberration rlnAmplitudeContrast>  all_images.star
relion_star_datablock_ctfdat all_images.ctfdat>>  all_images.star