Skip to main content
Docker Image: staphb/freebayes:1.3.7
FreeBayes is a Bayesian haplotype-based variant caller developed by Erik Garrison. FreeBayes uses a direct haplotype evaluation method — it considers all possible alleles at a locus simultaneously and computes Bayesian posterior probabilities for each genotype. It was designed to be fast, simple, and capable of calling SNPs, indels, MNPs (multi-nucleotide polymorphisms), and complex events in a single pass. FreeBayes is notable for its rich set of Bayesian priors (population genetics, Hardy-Weinberg, allele balance) that can be individually toggled. This makes it the tool with the most “knobs” for controlling the statistical model.

How It Works

1. Candidate Identification

FreeBayes scans the BAM file in the target region and identifies positions where reads differ from the reference. It applies coverage and allele fraction filters to determine which sites are worth evaluating.

2. Haplotype Construction

At each candidate site, FreeBayes considers all observed alleles and constructs candidate haplotypes within a configurable window (max_complex_gap). Unlike GATK, it does not perform full local assembly — instead, it directly evaluates the alleles observed in reads.

3. Bayesian Genotyping

For each candidate site, FreeBayes calculates:
  • Data likelihood: Probability of observing the reads given each possible genotype, using base quality and mapping quality
  • Prior probability: Based on the Ewens Sampling Formula (controlled by theta), Hardy-Weinberg Equilibrium, allele balance expectations, and binomial observation model
  • Posterior probability: Combined likelihood × prior, used to call the genotype

4. Output

Sites passing the posterior probability threshold (pvar) and quality filters are emitted as variant calls.

Hyperparameters

Quality Filtering

Allele Detection Thresholds

Coverage

Read Filtering

Genotype Likelihood / Priors

These parameters control the Bayesian statistical model and affect how FreeBayes weighs evidence and applies priors.

Prior Model Toggles

FreeBayes applies several Bayesian priors by default. Turning them off removes assumptions about population genetics.

Contamination

Population Genetics

Haplotype / Complex Variants

Algorithm