Skip to content
Genome-wide scan for balancing selection using beta statistic
Branch: master
Clone or download

Latest commit

Latest commit ccb0846 Feb 12, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
AFRsubset_fortutorial.txt Create AFRsubset_fortutorial.txt Mar 8, 2019 Added locus-based calculation Oct 24, 2019 Update Feb 12, 2020


Welcome! BetaScan implements the β statistic to detect ancient balancing selection, as described in Siewert & Voight, 2017. For in-depth instructions, please read the BetaScan wiki.

Basic Usage

To run BetaScan on an input file named SNPFreqs.txt with default parameters:

python -i SNPFreqs.txt

If you have a folded site frequency spectrum, you must include the -fold flag to calculate β(1)*. If your data includes substitutions with an outgroup, you can use the -B2 flag, which calculates β(2). However, if you use -B2 you must include an estimate of speciation time. See the Usage page of the wiki for details on how you can estimate.

If you also want to standardize β by its variance, you can do so using the -std flag. This flag must be accompanied by an estimate of the mutation rate using the -theta flag. Once again, see the Usage page of the wiki for details on how you can estimate the mutation rate.

Questions? Comments?

Any feedback or questions are very welcome. You can e-mail Katie at or post a github issue. We know that programs written by other people can be difficult to use, so we’ve tried our best to make this program simple and intuitive. That being said, bioinformatics is bioinformatics, and issues will arise, so don’t hesitate to contact us!


The original Beta statistics are described in Detecting Long-Term Balancing Selection Using Allele Frequency Correlation, MBE 2017.

Recent updates to BetaScan, including the β(2) statistic and standardization are now published in BetaScan2: Standardized statistics to detect balancing selection utilizing substitution data, GBE 2020.

1000 Genomes Beta Scores

If you would like the β(1) Scores for each population in the 1000 Genomes dataset, they are available here (warning: this is a 1.8 GB gzipped file). If you just want to look at the top scoring haplotypes in each population, that data is available here.

You can’t perform that action at this time.