(Last update 07/27/2013, Maofu Liao)


A mini package of "" can be downloaded from here: [pkg_samrelion.tar]
Untar the files. "" can run without the whole SAMUEL package.


Run operates in the following 4 modes. Each mode contains a set of functions.
===> Usage: 
     setup : Input parameters
     cmd : Print commands
     new : New star file
     data : Analyze * file
     2dcls : 2D classification

(1) "setup" mode to input parameters for printing out commands
      "samrelion.inp" is created if not already present. If present, the parameters will be displayed and ready to be modified.
      Some parameters only affect certain RELION functions, indicated as [3D only], [CLS only], etc.
(2) "cmd" mode to print out commands
===> Usage: cmd 3dcls/3dref/2dcls

    [Example] cmd 3dcls

    Note that only parameters are printed out. The RELION (and MPI) program path has to be added to complete the command.

    For example: mpirun -np 9 relion_refine_mpi ...(the printed out parameters)...
(3) "new" mode to generate a new star file
===> Usage: new Star_file Stack1_name,kV,Cs,Wgh,DF_file[--selection] [Stack2_name,kV,Cs,Wgh,DF_file[--selection]]
     Stack_name : Particle stack name (*.mrcs), the stack should match the DF_file;
     DF_file : *.par or *.def, --selection also give IDs for "ID@Stack.mrcs"
    [Example] new stack.mrcs,300,2.0,0.1,output.par
    (*.par or *.def can be generated from defocus calculation using
    This is derived from a shell script from Relion Wiki.
(4) "data" mode to analyze "*" files
===> Usage: data * METHOD PARAMETERS...
     count    Column_Name Selection
     dfmerge  Column_name(e.g. MicrographName) MinGrpSize(e.g. 20) 
     makesel  Column_name(e.g. ClassNumber)
     replace  Column_Name New_Value
     select   Column_Name Selection(or Min----Max)
     unique   Column_Name1 [Column_Name2 ...]
     stable   Column_Name(e.g. ClassNumber) File1(#)--#list [File2(#)--#list ...] [--grp=1,6--2-4]
    (count) [Example] data count ClassNumber 1-4
        This generates a "rlnct_ClassNumber.plt" file, containing the total number of each class.
    (dfmerge) [Example] data dfmerge MicrographName 20
        Some micrographs contain very few particles, and it is better to merge them with the particles with similar defocus values. (It seems that 20 is the smallest number for one group to prevent warning message shown by Relion.) Here is the grouping procedure suggested in Relion Wiki
     (makesel) [Example] data makesel ClassNumber
          Make a selection folder with a set of selectiion files ("sel/sel#####.dat") according to the * file. For example, this can generate the required selection files to display particle numbers for each class average from Relion 2D classification (in SamViewer mode 3).
     (replace) ...
    (select) [Example] data select ClassNumber 1-2
        This selects the data lines with ClassNumber = 1 or 2, and saves into a new start file "". The particle IDs are saved into a list file "rlnsel_ClassNumber_1_2.plt". Note that the selection can base on any data Column_name, and also on a range of actual data values.
    (unique) ...
    (stable) [Example] data stable ClassNumber
        According to Relion Wiki, for 3D classification, "there is currently no convergence criterion implemented, so the user is responsible for monitoring the convergence." It is not easy to tell whether 3D classification becomes stable after certain number of iterations. 
        This script checks the Class assignment of every particle in each cycle. The command above generates an overall stability analysis file "rlnstable.plt", which contains the number of stable particles (the class assignment of a certain cycle is the same as that of the last cycle), for the whole data set as well as for each class. Another generated file "rlnstable_parts.plt" summarizes, during all these 25 cycles, the chances of each particle to be grouped into each class.
        Note that 2 or more classes can be considered as one class by providing a "--grp" option. For example, "--grp=1,6--2-4" will consider 1 and 6 as one class, 2, 3 and 4 as another class.
(5) "2dcls" mode to run 2D classification
===> Usage: 2dcls setup/run
    Run Relion 2D classification. It can automatically run multiple rounds of 2D classification for predetermined groups/classes such as those from "" and "".
File pkg_samrelion.tar100 KB