Skip to content

FreeBayes

FreeBayes is a Bayesian genetic variant detector designed to find small polymorphisms, specifically single-nucleotide polymorphisms, indels (insertions and deletions), multi-nucleotide polymorphisms, and complex events (composite insertion and substitution events) smaller than the length of a short-read sequencing alignment.

FreeBayes is available as a module on Apocrita.

Usage

To run the latest installed version of FreeBayes, simply load the freebayes module:

$ module load freebayes
$ freebayes -h

Usage:   freebayes [OPTION] ... [BAM FILE] ...
$ module load freebayes
$ freebayes-parallel -h

Usage:   freebayes-parallel [regions file] [ncpus] [freebayes arguments]

For full usage documentation, run freebayes -h or freebayes-parallel -h.

Example jobs

Serial job

Here is an example job using 1 core and 1GB of memory:

#!/bin/sh
#$ -cwd
#$ -j y
#$ -pe smp 1
#$ -l h_vmem=1G
#$ -l h_rt=1:0:0

module load freebayes

freebayes --fasta-reference <fastafile> <bamfile>

Single node parallel job

Here is an example job using 12 cores:

#!/bin/sh
#$ -cwd
#$ -j y
#$ -pe smp 12
#$ -l h_rt=1:0:0

module load freebayes

freebayes-parallel <(fasta_generate_regions.py <fastafile> <region size>) \
${NSLOTS} -f <fastafile> <bamfile> > <output>

References