The CSF2 has been replaced by the CSF3 - please use that system! This documentation may be out of date. Please read the CSF3 documentation instead. To display this old CSF2 page click here. |
Geneland (R library)
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 session). This will use R 3.4.3.
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.
Restrictions on use
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 manual (PDF), or citing the list of papars in the citation section of the Geneland website.
Set up procedure
To access the software you must first load the modulefile:
# This will automatically load the R v3.4.3 modulefile for you module load apps/gcc/R-packages/3.4.3/geneland/4.0.8
Running the application
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 qrsh
command (see below).
To load the Geneland library in to R (either interactively or in a batch job), once R has started, ensure you run the command:
library(Geneland)
Serial batch job submission
Make sure you have the modulefile loaded then create a batch submission script, for example:
#!/bin/bash #$ -cwd # Job will run from the current directory #$ -V # Job will inherit current environment settings R CMD BATCH my_script.R my_script.R.o$JOB_ID # # -- R must be called with both the "CMD" and "BATCH" options which tell it # to run an R *program*, in this case "my_script.R", instead of presenting # an interactive prompt # # -- the final argument, "my_test.R.o$JOBID", tells R to send output to a # file with this name (without, R sends output to "my_test.Rout", which # would be over-written by a second submission of "my_test.R" via # "runmyRjob.qsub")
Submit the jobscript using:
qsub scriptname
where scriptname is the name of your jobscript.
Interactive serial job
Ensure you have logged in to the CSF with X11 forwarding 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 -X
flag (UPPERcase X) to your ssh
command.
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 qrsh
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).
Note that interactive jobs must run in the short
environment and hence will have a shorter maximum runtime than a batch job. See here for the current short runtime limit.
# From the CSF login node, try to login to a backend interactive compute node qrsh -l inter -l short # # # (lowercase letter L, not a number one)
Wait until you have been logged in to the compute node. Your command prompt will change to:
[username@node048(csf) ~]$
The node number can be different.
Now load the geneland modulefile then run R interactive:
# Load the modulefile module load apps/gcc/R-packages/3.4.3/geneland/4.0.8 # Run R and start the GUI R > library(geneland) > Geneland.GUI() > > # To exit R: > q() # Now exit the interactive session to go back to the CSF login node exit
Further info
Updates
None.