{"id":4666,"date":"2018-04-24T14:42:23","date_gmt":"2018-04-24T14:42:23","guid":{"rendered":"http:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/?page_id=4666"},"modified":"2018-04-24T15:24:27","modified_gmt":"2018-04-24T15:24:27","slug":"geneland","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/software\/applications\/geneland\/","title":{"rendered":"Geneland (R library)"},"content":{"rendered":"<h2>Overview<\/h2>\n<p><a href=\"http:\/\/www2.imm.dtu.dk\/~gigu\/Geneland\/\">Geneland<\/a> is an R package for statistical analysis of population genetics data. Its main goal is to detect population structure in form of systematic variation of allele frequency that can be detected from departure from Hardy-Weinberg and linkage equilibrium.<\/p>\n<p>Version 4.0.8 is installed on the CSF. This can be used from the R command-line (needed for batch jobs) or interactively via a GUI (do not run this on the login node, use an <em>interactive session<\/em>). This will use R 3.4.3.<\/p>\n<p>It is strongly recommended that you use Geneland through the command-line rather than the GUI so that R script files can be processed in batch. This will allow multiple jobs to run and jobs can run for longer than interactive GUI jobs.<\/p>\n<h2>Restrictions on use<\/h2>\n<p>There are no restrictions on accessing the software on the CSF. If you use the software in your research please cite this use by following the instructions on page 7 of the <a href=\"http:\/\/www2.imm.dtu.dk\/~gigu\/Geneland\/Geneland-Doc.pdf\">manual (PDF)<\/a>, or citing the list of papars in the <a href=\"http:\/\/www2.imm.dtu.dk\/~gigu\/Geneland\/#Reference%20papers\">citation<\/a> section of the Geneland website.<\/p>\n<h2>Set up procedure<\/h2>\n<p>To access the software you must first load the modulefile:<\/p>\n<pre>\r\n# This will automatically load the R v3.4.3 modulefile for you\r\n\r\nmodule load apps\/gcc\/R-packages\/3.4.3\/geneland\/4.0.8\r\n<\/pre>\n<h2>Running the application<\/h2>\n<p>Please do not run Geneland on the login node. Jobs should be submitted to the compute nodes via batch or, if using the GUI, run in an interactive session started via the <code>qrsh<\/code> command (see below).<\/p>\n<p>To load the Geneland library in to R (either interactively or in a batch job), once R has started, ensure you run the command:<\/p>\n<pre>\r\nlibrary(Geneland)\r\n<\/pre>\n<h3>Serial batch job submission<\/h3>\n<p>Make sure you have the modulefile loaded then create a batch submission script, for example:<\/p>\n<pre>\r\n#!\/bin\/bash\r\n#$ -cwd             # Job will run from the current directory\r\n#$ -V               # Job will inherit current environment settings\r\n\r\nR CMD BATCH my_script.R my_script.R.o$JOB_ID\r\n        #\r\n        # -- R must be called with both the \"CMD\" and \"BATCH\" options which tell it\r\n        #    to run an R *program*, in this case \"my_script.R\", instead of presenting\r\n        #    an interactive prompt\r\n        #\r\n        # -- the final argument, \"my_test.R.o$JOBID\", tells R to send output to a \r\n        #    file with this name (without, R sends output to \"my_test.Rout\", which\r\n        #    would be over-written by a second submission of \"my_test.R\" via\r\n        #    \"runmyRjob.qsub\")\r\n<\/pre>\n<p>Submit the jobscript using: <\/p>\n<pre>qsub <em>scriptname<\/em><\/pre>\n<p>where <em>scriptname<\/em> is the name of your jobscript.<\/p>\n<h3>Interactive serial job<\/h3>\n<p>Ensure you have logged in to the CSF with <em>X11 forwarding<\/em> enabled in your ssh program. This will be on by default if using MobaXterm and can be enabled in the Linux and MacOS ssh command by adding the <code>-X<\/code> flag (UPPERcase X) to your <code>ssh<\/code> command.<\/p>\n<p>Now start an interactive session. This will attempt to log you in to a backend compute node so that you can run commands (away from the login node) without needing to write a batch script. Note that the <code>qrsh<\/code> command will look for a free core on the interactive nodes. If none are available you will have to try again later (the command will inform you).<\/p>\n<p>Note that interactive jobs <em>must<\/em> run in the <code>short<\/code> environment and hence will have a shorter maximum runtime than a batch job. See <a href=\"\/csf2\/batch\/time-limits-two-day-and-short-jobs\/#Short_Jobs\">here<\/a> for the current <em>short<\/em> runtime limit.<\/p>\n<pre>\r\n# From the CSF login node, try to login to a backend interactive compute node\r\nqrsh -l inter -l short \r\n      # \r\n      #\r\n      # (lowercase letter L, not a number one)\r\n<\/pre>\n<p>Wait until you have been logged in to the compute node. Your command prompt will change to:<\/p>\n<pre>\r\n[<em>username<\/em>@node<em>048<\/em>(csf) ~]$\r\n<\/pre>\n<p>The node number can be different.<\/p>\n<p>Now load the geneland modulefile then run R interactive:<\/p>\n<pre>\r\n# Load the modulefile\r\nmodule load apps\/gcc\/R-packages\/3.4.3\/geneland\/4.0.8\r\n\r\n# Run R and start the GUI\r\nR\r\n> library(geneland)\r\n> Geneland.GUI()\r\n>\r\n> # To exit R:\r\n> q()\r\n\r\n# Now exit the interactive session to go back to the CSF login node\r\nexit\r\n<\/pre>\n<h2>Further info<\/h2>\n<ul>\n<li><a href=\"http:\/\/www2.imm.dtu.dk\/~gigu\/Geneland\">Geneland website<\/a><\/li>\n<li><a href=\"http:\/\/www2.imm.dtu.dk\/~gigu\/Geneland\/Geneland-Doc.pdf\">Geneland manual (PDF)<\/a><\/li>\n<li><a href=\"http:\/\/www2.imm.dtu.dk\/~gigu\/Geneland\/GenelandGUI.html\">Geneland GUI manual (online)<\/a><\/li>\n<\/ul>\n<h2>Updates<\/h2>\n<p>None.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview Geneland is an R package for statistical analysis of population genetics data. Its main goal is to detect population structure in form of systematic variation of allele frequency that can be detected from departure from Hardy-Weinberg and linkage equilibrium. Version 4.0.8 is installed on the CSF. This can be used from the R command-line (needed for batch jobs) or interactively via a GUI (do not run this on the login node, use an interactive.. <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/software\/applications\/geneland\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":15,"featured_media":0,"parent":31,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-4666","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/4666","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\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/comments?post=4666"}],"version-history":[{"count":5,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/4666\/revisions"}],"predecessor-version":[{"id":4674,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/4666\/revisions\/4674"}],"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=4666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}