Skip to content

BayeScan

BayeScan aims at identifying candidate loci under natural selection from genetic data, using differences in allele frequencies between populations. The analysis is based on the multinomial-Dirichlet model.

License

Free to use and open source under GNU GPLv3

Available

  • Roihu-CPU: 2.1

Usage

To use BayeScan, first run command

module load bayescan

After that you can launch BayeScan with a command like:

bayescan_2.1 -threads 1 test_binary_AFLP.txt 

With bayescan_2.1, it is important to define the number of threads always explicitly. This is because, by default, BayeScan tries to use all available cores.

On Roihu, BayeScan tasks should be executed as batch jobs. Below is a sample batch job file for BayeScan:

#!/bin/bash
#SBATCH --job-name=bayescan
#SBATCH --account=project_XXXXXX
#SBATCH --time=08:00:00
#SBATCH --mem=6G
#SBATCH --partition=small
#SBATCH --cpus-per-task=4
#SBATCH --nodes=1
#SBATCH --ntasks=1

# Set the number of threads based on cpus-per-task
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK:-1}

# Place and bind threads to single cores
# Comment the following lines if binding is not desired
export OMP_PLACES=cores
export OMP_PROC_BIND=spread

module load bayescan

bayescan_2.1 -threads ${SLURM_CPUS_PER_TASK} test_binary_AFLP.txt > bayescan_omp.out

The script above reserves 8 hours of computing time, 6 GB of memory and 4 computing cores. The project_XXXXXX in the --account definition should be replaced with the project name of your computing project.

The job can be submitted to the batch job system with command:

sbatch script

In many cases BayeScan will not benefit from using more than 8 cores, so check performance if using more.

More instructions for running batch jobs can be found in CSC batch job instructions

More information

Do you find this page useful?
Thank you for your feedback!
Thank you! Your feedback is appreciated.

Please let us know how we could improve this page by contacting us or by creating an issue in GitHub. You can also edit this page yourself and contribute your improvements by creating a pull request.