Skip to content

Docs CSC now features an automatic Finnish translation. Click here for more information.

Warning!

Puhti and Mahti computing services have been decommissioned and no new jobs are accepted or executed on its compute nodes. Puhti and Mahti login nodes and storage services are planned to remain available until 15 October 2026. Clean up unnecessary files and move any data you need to keep by 31 August 2026. See the Roihu data migration guide for instructions on transferring your data to Roihu.

Structure

Structure is a software package for using multi-locus genotype data to investigate population structure. Its uses include inferring the presence of distinct populations, assigning individuals to populations, studying hybrid zones, identifying migrants and admixed individuals, and estimating population allele frequencies in situations where many individuals are migrants or admixed.

It can be applied to most of the commonly-used genetic markers, including SNPS, microsatellites, RFLPs and AFLPs.

License

Structure is free to use. Source code is available from the upstream website, but no explicit open-source license is specified.

Available

  • Roihu: 2.3.4, via the bio-apps module.

Usage

Structure is part of the bio-apps collection on Roihu. Load the bio-apps module tree and then the Structure module:

module load bio-apps/v202603
module load structure/2.3.4

Structure reads its run settings from mainparams and extraparams files in the working directory. Prepare these files (along with your genotype data file), then run Structure with:

structure

You can also point Structure at specific files and options on the command line, for example:

structure -m mainparams -e extraparams -K 3 -i infile -o outfile

Structure runs are single-core and can be long, so real analyses should be run as batch jobs. Below is a simple example batch job script:

#!/bin/bash
#SBATCH --job-name=structure
#SBATCH --account=<project>
#SBATCH --output=output_%j.txt
#SBATCH --error=errors_%j.txt
#SBATCH --partition=small
#SBATCH --time=12:00:00
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --mem=4G

module load bio-apps/v202603
module load structure/2.3.4

structure

Replace <project> with your CSC project (for example project_2001234).

See creating a batch job script for Roihu for more information about running batch jobs.

Automating Structure and post-processing

Related tools for running and post-processing Structure analyses are available as separate modules in bio-apps:

  • StrAuto (strauto) — automate Structure across a range of K values and replicate runs, and chain the results into the Evanno ΔK analysis.
  • structureharvester — StructureHarvester, for parsing Structure results and applying the Evanno ΔK method.
  • clumpp — CLUMPP, for aligning replicate cluster assignments across runs.

Support

CSC Service Desk

More information