FreeBayes: Bayesian genetic variant detector

Haplotype-based variant detection from short-read sequencing.


Installing dependencies

sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install -f
sudo apt-get install g++
sudo apt-get install zlib1g-dev
sudo apt-get install tabix

CMAKE dependence

sudo make install

Installation of FreeBayes

$sudo apt-get install git
$git clone --recursive git://
$make && sudo make install

Steps to SNP call

#index the reference fasta
samtools faidx ref.fasta

#convert all SAM files to BAM files by using samtools and the reference fasta indexed (*.fasta.fai)
samtools view -bt ref.fasta.fai alignment.sam > alignment.bam

#sort the BAM files
samtools sort alignment.bam $alignment.sorted

#index BAM files
samtools index $indexar

#apply BAQ
samtools calmd -Abr alignment.sorted.bam ref.fasta > alignment.baq.bam

#index the *.baq.bam files
samtools index alignment.baq.bam

#SNP call using the *.baq.bam files
freebayes --min-base-quality 20 -p 1 --fasta-reference ref.fasta alignment.baq.bam > snpcall.vcf

See more about SAMtools here.

This entry was posted in Local Tools. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s