To run BetaScan on an input file named SNPFreqs.txt with default parameters:
python BetaScan.py -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.
Any feedback or questions are very welcome. You can e-mail Katie at firstname.lastname@example.org 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.