Docker Image:
staphb/freebayes:1.3.7How 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.
