Skip to content
code for estimating the effect of background selection
C C++ Makefile
Branch: master
Clone or download


This repository contains code for estimating the strength of
background selection. This software was written by Graham McVicker and
is described in detail in the methods section of our paper, McVicker
et al. 2009:

Some additional mathematical details are provided in the file

If you have any questions about the software please contact me at:


The calc_bkgd program computes the reduction in neutral diversity due
to background selection (B-values) at every site in a genome.  As
input the program takes a recombination map, a list of chromosomes to
run on, and the locations of elements that are believed to be under
purifying selection. All of the options for the program are provided
through a configuration file. An example file that explains all of the
options is provided in the conf/calc_bkgd.conf

calc_bkgd depends on glib-2.x ( for
several data structures (e.g. hashtables, linked lists, stacks), and
on the gnu scientific library ( for
numerical integration and function minimization. Both of these
software libraries must be installed before calc_bkgd can be compiled.

To compile:
  cd bkgd


This program uses the B-values computed by calc_bkgd and a
multi-species sequence alignment to perform maximum likelihood
estimation of evolutionary parameters such as mutation rates,
deleterious mutation rates, effective population sizes, and speciation
times. The program is written specifically for multiple alignments of
human, chimp, gorilla, orangutan macaque genome sequences, but could
probably be adapted to other purposes. Currently this program is not
built by the makefile. Contact me if you are interested in using this
part of the code and I can help get you started.

Precomputed B-values for the human genome are provided in the data directory.

You can’t perform that action at this time.