User Tools

Site Tools

This version (2021/03/16 10:44) is a draft.
Approvals: 0/1


Bayesian Polishing : Apply Relion Bayesian Polishing on SPHIRE generated stack.


Usage in command line post_refine_folder motioncorr_starfile output_folder training_params --first_frame --last_frame --bfac_minfreq --bfac_maxfreq --min_no_particles --submission_template --submission_command --relion_mpirun_executable --relion_polishing_executable --mpi_procs --no_of_threads --mrc_reloc_folder

Typical usage

sp_polishing exists in both MPI and non-MPI versions (Running MPI version does not require –MPI flag).

The purpose of is to :

: Apply Relion Bayesian Polishing using the stack generated from Meridien.

: The SPHIRE module provides a wrapper around the polishing command for training as well
  motion estimation

: After running the polishing routine, the wrapper automatically converts the in
  the Output folder to a BDB stack and saves it in the folder name of Polish Stack.


Main Parameters

The user has to be provide the location of the post refiner directory so that the script can automatically detect all the required information for the polishing. (default required string)
The metadata star file which is being generated by MotionCorr. (default required string)
Toplevel directory where outputs will be written. (default required string)
In case if the user wants to do the training part of the polishing then this is None. Otherwise provide the optimize_params.txt file. (default none)
Number of particles to inlcude for training. (default 5000)
Submission template for MPI command. In case of running this tool on a cluster, always a submission template. The number of MPI processors and threads in the submission template should be the same as the one specified below in the MPI procs and threads value.(default none)
Submission commmand for cluster (default sbatch)
Since there can be more than one mpirun environment installed on a workstation or on a cluster. It can be sometimes necessary to provide the relion specific mpirun executable. Just type which mpirun -a in a terminal and choose the one which relion requires. (default mpirun)
Similar to the issue of relion mpirun executable, it can be sometime necessary to provide the specific relion polishing executable also. Just type which relion_motion_refine_mpi and copy the path here. (default relion_motion_refine_mpi)
The number of MPI processors used for Relion multiprocessing. For training part only one MPI processors is used. In case when running the program on cluster, the MPI processors value should be same as used in the submission template.(default 1)
The number of threads use during the polishing. In case when running the program on cluster, the thread value should be same as used in the submission template.(default 1)

Advanced Parameters

The 1st frame number from where it should start. (default 1)
The last frame number where it should end. (default -1)
The minimum frequency range which is normally the maximum inner shell to include in enhancement. (default 20)
The minimum frequency range which is normally the maximum outer shell to include in enhancement. (default -1)
In case if the mrcs images were moved from original location where they were generated to a new location. Then the user has to provide a path directory link to the new location . (default none)

Output star file for polishing particles.
: Polished particles stack.
Using sphire2relion tool , the bdb stack is converted to star file so that it can be used in relion. The star file is saved in BDB2STAR folder.
Since the input to the tool is Post refiner directory, the tool can automatically create the necessary file in PostProcess folder which is necessary to provide for polishing.

To run it properly on cluster. Do the following task before running in case if you are running from MPI dortmund. These settings can be different if you are using it outside.

module unload sphire (unload the module sphire) 

module load sphire/clem/Polishing_SPHIRE_v1.2 or sphire/clr/Polishing_SPHIRE_v1.2 (this has to be done only in case if you have a different installation then the default one, since this tool is still not released, the git branch is different). 

module load relion

Then go to the directory where you have all the data folders. Like Meridien , Post Refiner, ISAC etc etc. It is recommended to start SPHIRE in the folder structure where all the output folders are present e.g Post refinenment output folder, motioncorr output folder , ISAC substack output folder.




Jasenko Zivanov, Takanori Nakane and Sjors H W Scheres: A Bayesian approach to beam-induced motion correction in cryo-EM single-particle analysis, IUCrJ 6, 5-17, January, 2019..

Developer Notes

Applying polishing using SPHIRE GUI.

Author / Maintainer

Adnan Ali





See also


Beta:: Under evaluation and testing. Please let us know if there are any bugs.


pipeline/meridien/sp_polishing.txt · Last modified: 2021/03/16 10:44 by aali