Skip to content

Puhti and Mahti computing services have been decommissioned. Puhti and Mahti login nodes and storage services will remain available until 15 October 2026, but are no longer covered by service contracts. Please clean up and migrate your data to Roihu ASAP. See Roihu data migration guide for instructions.

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