{"id":1816,"date":"2014-09-15T17:37:21","date_gmt":"2014-09-15T17:37:21","guid":{"rendered":"http:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/?page_id=1816"},"modified":"2017-08-04T09:14:34","modified_gmt":"2017-08-04T09:14:34","slug":"relion","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/software\/applications\/relion\/","title":{"rendered":"Relion"},"content":{"rendered":"<h2>Overview<\/h2>\n<p><a href=\"http:\/\/www2.mrc-lmb.cam.ac.uk\/relion\/index.php\/Main_Page\">Relion<\/a> is program that employs an empirical Bayesian approach to refinement of (multiple) 3D reconstructions or 2D class averages in electron cryo-microscopy (cryo-EM). It is developed in the group of <a href=\"http:\/\/www2.mrc-lmb.cam.ac.uk\/groups\/scheres\/\">Sjors Scheres<\/a> at the <a href=\"http:\/\/www2.mrc-lmb.cam.ac.uk\/\">MRC Laboratory of Molecular Biology<\/a>.<\/p>\n<p>Versions 1.3 and 1.4 are installed on the CSF. They have been compiled from source using the Intel v12.0.5 compilers and OpenMPI 1.6.<\/p>\n<h2>Restrictions on use<\/h2>\n<p>There are no restrictions on accessing this software on the CSF. The software is released under the GNU GPL v2 license. The authors request you cite the use of the software in your publications &#8211; please see <a href=\"http:\/\/www2.mrc-lmb.cam.ac.uk\/relion\/index.php\/Main_Page\">the Relion website<\/a> for details.<\/p>\n<h2>Set up procedure<\/h2>\n<p>To access the software you must first load <strong>one<\/strong> of the following modulefiles, according to whether you wish to run on Ethernet networked nodes (also if using single node SMP jobs) or InfiniBand networked nodes (faster networking for multi-node jobs):<\/p>\n<pre>\r\n# Multi-node job (using all cores on the nodes) with fast InfiniBand networking\r\nmodule load apps\/intel-12.0\/relion\/2.0.3-ib\r\nmodule load apps\/intel-12.0\/relion\/1.4-ib\r\nmodule load apps\/intel-12.0\/relion\/1.3-ib\r\n\r\n# Single-node multicore job\r\nmodule load apps\/intel-12.0\/relion\/2.0.3\r\nmodule load apps\/intel-12.0\/relion\/1.4\r\nmodule load apps\/intel-12.0\/relion\/1.3\r\n<\/pre>\n<p>These modulefiles will load automatically the compiler and MPI modulefiles for you.<\/p>\n<h2>Running the application<\/h2>\n<p>Relion can be run with a GUI on the login node. This is mainly used to select input files and set up job parameters. The GUI will then submit your job to the batch queues.<\/p>\n<p>Users must <em>always<\/em> run the main processing in <strong>batch<\/strong> (where the GUI permits submission to the batch system), never directly on the login node. This requires correct settings in the GUI, as instructed below. <\/p>\n<p>Relion tools other than the GUI found running on the login node will be terminated <em>without warning<\/em> and access to the GUI may be withdrawn.<\/p>\n<p>Please note, a tutorial on using Relion to process your data is beyong the scope of this page, which only describes how to run the application on the CSF. Please follow the <a href=\"http:\/\/www2.mrc-lmb.cam.ac.uk\/groups\/scheres\/relion13_tutorial.pdf\">Relion Turorial (pdf)<\/a> on the Relion website if you are new to the software.<\/p>\n<h3>Running the GUI<\/h3>\n<p>Once the modulefile file is loaded you should navigate to your Relion project directory (this is important &#8211; it will usually contain a <code>Micrographs<\/code> subdirectory) and then run <code>relion<\/code> on the login node. For example:<\/p>\n<pre>\r\ncd ~\/scratch\/my_relion_project\/\r\nrelion\r\n<\/pre>\n<p>It will display the following GUI (click on image to enlarge):<br \/>\n<a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-content\/uploads\/relion-general.png\"><img decoding=\"async\" src=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-content\/uploads\/relion-general.png\" alt=\"Relion GUI\" width=\"500\" class=\"alignnone size-full wp-image-1817\" srcset=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-content\/uploads\/relion-general.png 804w, https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-content\/uploads\/relion-general-300x159.png 300w\" sizes=\"(max-width: 804px) 100vw, 804px\" \/><\/a><\/p>\n<p>Various operations can be performed by selecting from the list on the left hand side (Micrograph inspection, CTF estimation and so on). These operations allow you to specify use of the batch system, as detailed below.<\/p>\n<p>Note: To re-activate a greyed-out <code>Run<\/code> button, press <code>Alt+R<\/code> in the GUI.<\/p>\n<h3>Using the GUI to run in Batch<\/h3>\n<p>Each Relion processing operation (Micrograph inspection, CTF estimation etc) has a <em>Running<\/em> tab in its GUI page. There are three possible types of <em>Running<\/em> tab:<\/p>\n<ol class=\"gaplist\">\n<li>Greyed-out (e.g., select <em>Micrograph inspection<\/em> from the list). This operation does not require the batch system:<br \/>\n<a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-content\/uploads\/relion-micrograph-running-red.png\"><img decoding=\"async\" src=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-content\/uploads\/relion-micrograph-running-red.png\" alt=\"Relion Running Tab greyed out\" width=\"500\" class=\"alignnone size-full wp-image-1818\" srcset=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-content\/uploads\/relion-micrograph-running-red.png 804w, https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-content\/uploads\/relion-micrograph-running-red-300x159.png 300w\" sizes=\"(max-width: 804px) 100vw, 804px\" \/><\/a><\/li>\n<li>Active for MPI job (e.g., select <em>CTF estimation<\/em> from the list). This operation will generate a batch script and submit it:<br \/>\n<a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-content\/uploads\/relion-ctfest-running-red.png\"><img decoding=\"async\" src=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-content\/uploads\/relion-ctfest-running-red.png\" alt=\"Relion Running MPI\" width=\"500\" class=\"alignnone size-full wp-image-1819\" srcset=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-content\/uploads\/relion-ctfest-running-red.png 804w, https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-content\/uploads\/relion-ctfest-running-red-300x159.png 300w\" sizes=\"(max-width: 804px) 100vw, 804px\" \/><\/a> The options should be set as follows:<\/p>\n<ul class=\"nogaplist\">\n<li>Number of MPI procs: 1 for serial jobs, 2-24 for single-node jobs (see Queue name below), 48-120 (in multiples of 24) for multi-node jobs. We recommend using 2-24 initially.<\/li>\n<li><strong>Submit to queue?<\/strong>: You <strong>must<\/strong> set this to <strong>Yes<\/strong>. If you fail to do this your job will run on the login node and will be killed by the sysadmins. <em>Users found repeatedly forgetting to turn on the Submit to queue option will be banned from using this software.<\/em><\/li>\n<li>Queue name: Use <code>smp.pe<\/code> for single node jobs  (2-24 cores) or <code>orte-24-ib.pe<\/code> for multi-node jobs (48 or more cores and in multiples of 24, ensure you have loaded the relion <code>-ib<\/code> modulefile).<\/li>\n<li>Queue submit command: leave as <code>qsub<\/code><\/li>\n<li>Standard submission script: leave as\n<pre>\/opt\/gridware\/apps\/intel-12.0\/relion\/<em>version<\/em>\/bin\/qsub.sh<\/pre>\n<\/li>\n<li>Additional arguments: leave blank<\/li>\n<\/ul>\n<\/li>\n<li>Active for MPI+OpenMP job (e.g., select <em>2D classification<\/em> from the list). This operation will generate a batch script and submit it:<br \/>\n<a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-content\/uploads\/relion-2Dclass-running-red.png\"><img decoding=\"async\" src=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-content\/uploads\/relion-2Dclass-running-red.png\" alt=\"Relion 2D Classification Running MPI\" width=\"500\" class=\"alignnone size-full wp-image-1830\" srcset=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-content\/uploads\/relion-2Dclass-running-red.png 804w, https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-content\/uploads\/relion-2Dclass-running-red-300x159.png 300w\" sizes=\"(max-width: 804px) 100vw, 804px\" \/><\/a> The options should be set as follows:<\/p>\n<ul class=\"nogaplist\">\n<li>Number of MPI procs: 1 for serial jobs, 2-24 for single-node jobs (see Queue name below), 48-120 (in multiples of 24) for multi-node jobs (see Queue name below). We recommend using 2-24 initially.<\/li>\n<li>Number of threads: leave as 1.<\/li>\n<li>Available RAM (in Gb) per thread: leave as 4<\/li>\n<li><strong>Submit to queue?<\/strong>: You <strong>must<\/strong> set this to <strong>Yes<\/strong>. If you fail to do this your job will run on the login node and will be killed by the sysadmins. <em>Users found repeatedly forgetting to turn on the Submit to queue option will be banned from using this software.<\/em><\/li>\n<li>Queue name: Use <code>smp.pe<\/code> for single node jobs  (2-24 cores) or <code>orte-24-ib.pe<\/code> for multi-node jobs (48 or more cores and in multiples of 24, ensure you have loaded the relion <code>-ib<\/code> modulefile).<\/li>\n<li>Queue submit command: leave as <code>qsub<\/code><\/li>\n<li>Standard submission script: leave as\n<pre>\/opt\/gridware\/apps\/intel-12.0\/relion\/<em>version<\/em>\/bin\/qsub.sh<\/pre>\n<\/li>\n<li>Additional arguments: leave blank<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3>Submitting the Batch Job from the GUI<\/h3>\n<p>Once you have set the <em>Running<\/em> tab options as indicated above press the <code>Run!<\/code> button to submit an auto-generated jobscript to the batch system. It may appear that nothing has happened when you do this. However, you should check on the job using the usual <code>qstat<\/code> command by running it in a command-line window on the CSF. It will report whether your job is queued or running. If you see no output then you job has finished (either successfully or because an error occurred).<\/p>\n<p>The auto-generated jobscript will be written to your current directory (your Relion project directory) and will be named similar to the operation being performed with a <code>.script<\/code> extension. For example:<\/p>\n<pre>\r\nrun_ctffind_submit.script\r\n<\/pre>\n<p>The usual output and error output from the job will be written to files with <code>.out<\/code> and <code>.err<\/code> extensions respectively. You should check these for further information about your job. For example:<\/p>\n<pre>\r\nrun_ctffind.out\r\nrun_ctffind.err\r\n<\/pre>\n<h3>Summary<\/h3>\n<ul>\n<li>Where the <em>Running<\/em> panel is active, ensure you set the <em>Submit to Queue<\/em> option to be <em>Yes<\/em>.<\/li>\n<li>Select the number of MPI procs to use.<\/li>\n<li>If available, set the number of threads to be 1.<\/li>\n<li>Set the <em>Queue Name<\/em> so be <em>smp.pe<\/em> or <em>orte-24-ib.pe<\/em>.\n<li>If using <em>orte-24-ib.pe<\/em> ensure you have loaded the relion <em>-ib<\/em> version of the modulefile.\n<li>Pressing the <em>Run!<\/em> button will submit an auto-generated jobscript to the batch system.<\/li>\n<li>Check on your job by running <code>qstat<\/code> in a terminal window on the CSF.<\/li>\n<\/ul>\n<h2>Advanced: Custom Batch Script Template<\/h2>\n<p>This section is for advanced users familiar with Relion and the CSF batch system. In most cases the default settings will work for you and you should not need to follow this section.<\/p>\n<p>Relion auto-generates jobscripts by filling in place-holders in a <em>qsub template file<\/em> named <code>qsub.sh<\/code>. It is possible for you to take a copy of this file, modify it and have Relion use your new template each time you submit a job via the Relion GUI. The following steps are required:<\/p>\n<ol>\n<li>Exit Relion if the GUI is currently running<\/li>\n<li>Copy the system-wide template file (for example in to a directory in your home area):\n<pre>\r\ncp $RELION_QSUB_TEMPLATE ~\/my_relion_project\/\r\n<\/pre>\n<\/li>\n<li>Edit the template (see below for more information):\n<pre>\r\ngedit ~\/my_relion_project\/qsub.sh\r\n<\/pre>\n<\/li>\n<li>Update the environment setting indicating where the template file is:\n<pre>\r\nexport RELION_QSUB_TEMPLATE=~\/my_relion_project\/qsub.sh\r\n<\/pre>\n<\/li>\n<li>Restart Relion:\n<pre>\r\nrelion\r\n<\/pre>\n<\/li>\n<\/ol>\n<p>The default template file contains:<\/p>\n<pre>\r\n#!\/bin\/bash\r\n#$ -pe XXXqueueXXX XXXmpinodesXXX\r\n#$ -e XXXerrfileXXX\r\n#$ -o XXXoutfileXXX\r\n#$ -cwd\r\n#$ -S \/bin\/bash\r\n#$ -V\r\n\r\nmpiexec -n XXXmpinodesXXX  XXXcommandXXX\r\n<\/pre>\n<p>The <code>XXX.....XXX<\/code> keywords are the place-holders that will be replaced with the settings you specify in the Relion GUI. You should leave the <code>-pe<\/code> setting as is. However, you may wish to add other <a href=\/csf2\/csf-user-documentation\/batch-scriptqsub-options\/\">CSF options<\/a> such as<\/p>\n<pre>\r\n#$ -l twoday      # Run in two-day area of the CSF\r\n#$ -m ea          # Email me when job ends or aborts\r\n<\/pre>\n<p>Alternatively you may want to add other commands to the jobscript, for example:<\/p>\n<pre>\r\n# Report the date before running\r\ndate\r\nmpiexec -n XXXmpinodesXXX  XXXcommandXXX\r\n<\/pre>\n<h2>Advanced: Hand-crafting Jobscripts<\/h2>\n<p>If you wish to submit a batch job <em>manually<\/em> from the command-line (using your own batch script) in the traditional CSF manner, then you can ask Relion to display the command it will use in its auto-generated jobscript. <\/p>\n<p>Start the Relion GUI, select the operation to perform (e.g., 2D Classification), select the <em>Running<\/em> tab, make any changes to the settings then press the <code>Print command<\/code> button to display in your shell window what Relion uses in its jobscript. <\/p>\n<p>For example, the following is displayed for the <em>2D Classification example above<\/em>:<\/p>\n<pre>\r\n`which relion_refine_mpi` --o Class2D\/run1 --i  --particle_diameter 200 \\\r\n--angpix 3.54 --ctf  --iter 25 --tau2_fudge 2 --K 1 --flatten_solvent  \\\r\n--zero_mask  --oversampling 1 --psi_step 10 --offset_range 5 --offset_step 2 \\\r\n--norm --scale  --j 1 --memory_per_thread 4 \r\n<\/pre>\n<p>Hence you can write your own jobscript to run this command. Ensure that you add the usual <code>mpirun<\/code> command and specify the correct number of cores. For example:<\/p>\n<pre>\r\n#!\/bin\/bash\r\n#$ -S bash\r\n#$ -cwd                  # Run from current directory\r\n#$ -V                    # Inherit modulefile settings\r\n#$ -pe smp.pe 8          # We'll use 8 cores (single-node)\r\n\r\n# We must add the usual mpirun command as used in many CSF jobscripts\r\n\r\n<strong>mpirun -n $NSLOTS<\/strong> `which relion_refine_mpi` --o Class2D\/run1 --i  \\\r\n--particle_diameter 200 --angpix 3.54 --ctf  --iter 25 --tau2_fudge 2 --K 1 \\\r\n--flatten_solvent  --zero_mask  --oversampling 1 --psi_step 10 --offset_range 5 \\\r\n--offset_step 2 --norm --scale  --j 1 --memory_per_thread 4 \r\n\r\n# We can add any other commands we wish to run from the jobscript. EG:\r\ndate\r\n<\/pre>\n<p>Notice that we have added <code>mpirun -n $NSLOTS<\/code> to the start of the command that Relion reported. Relion will automatically add this when it auto-generates a jobscript.<\/p>\n<p>You should then submit your jobscript using the usual <code>qsub<\/code> command:<\/p>\n<pre>\r\nqsub <em>myjobscript<\/em>\r\n<\/pre>\n<p>where <em>myjobscript<\/em> is the name of your jobscript.<\/p>\n<h2>Further info<\/h2>\n<ul>\n<li><a href=\"http:\/\/www2.mrc-lmb.cam.ac.uk\/relion\/index.php\/Main_Page\">Relion website<\/a><\/li>\n<\/ul>\n<h2>Updates<\/h2>\n<p>None.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview Relion is program that employs an empirical Bayesian approach to refinement of (multiple) 3D reconstructions or 2D class averages in electron cryo-microscopy (cryo-EM). It is developed in the group of Sjors Scheres at the MRC Laboratory of Molecular Biology. Versions 1.3 and 1.4 are installed on the CSF. They have been compiled from source using the Intel v12.0.5 compilers and OpenMPI 1.6. Restrictions on use There are no restrictions on accessing this software on.. <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/software\/applications\/relion\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":31,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1816","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/1816","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/comments?post=1816"}],"version-history":[{"count":20,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/1816\/revisions"}],"predecessor-version":[{"id":4106,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/1816\/revisions\/4106"}],"up":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/31"}],"wp:attachment":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/media?parent=1816"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}