BreakDancer-1.1, released under GPLv3, is a Perl/Cpp package that provides genome-wide detection of structural variants from next generation paired-end sequencing reads. It includes two complementary programs.
BreakDancerMax predicts five types of structural variants: insertions, deletions, inversions, inter- and intra-chromosomal translocations from next-generation short paired-end sequencing reads using read pairs that are mapped with unexpected separation distances or orientation.
Breakdancer requires sudo access due to installing the required perl modules.
sudo apt-get install subversion svn co https://breakdancer.svn.sourceforge.net/svnroot/breakdancer cd breakdancer |
wget http://sourceforge.net/projects/samtools/files/samtools/0.1.6/samtools-0.1.6.tar.bz2 tar xjf samtools-0.1.6.tar.bz2 cd samtools-0.1.6 make |
Should you receive an error when making and are on an Ubuntu/Linux system try changing the following line in Makefile:
samtools:lib $(AOBJS) $(CC) $(CFLAGS) -o $@ $(AOBJS) -lm $(LIBPATH) $(LIBCURSES) -lz -L. -lbam |
to
samtools:lib $(AOBJS) $(CC) $(CFLAGS) -o $@ $(AOBJS) -lm $(LIBPATH) $(LIBCURSES) -L. -lbam -lz |
And running 'make' again.
It is now assumed that you are in the breakdancer directory, inside it you've placed a samtools-0.1.6 directory and have compiled the samtools directory
Change the following line in Makefile:
all: g++ -g -Wall -O2 -I/Users/kchen/samtools/samtools-0.1.6 BreakDancerMax.cpp AlnParser.cpp Poisson.cpp -o breakdancer-max -lm -lz -L/Users/kchen/samtools/samtools-0.1.6 -lbam |
to
all: g++ -g -Wall -O2 -I samtools-0.1.6/ BreakDancerMax.cpp AlnParser.cpp Poisson.cpp -o breakdancer_max -lm -L samtools-0.1.6/ -lbam -lz |
Changing both the path of the -I and -L flag and also moving the -lz library flag after -lbam
Congrats! You've, hopefully, installed the CPP portion of Breakdancer. But there is also a Perl script that Breakdancer must run so we need to handle the prerequisites for that.
Change the shebang/header in the bam2cfp.pl from:
#!/gsc/bin/perl |
to
#!/usr/bin/env perl |
Install the required perl modules.
sudo cpan install Math::CDF sudo cpan install Statistics::Descriptive sudo cpan install GD::Graph sudo cpan install GD::Graph::histogram |
For sanity just update you PATH environmental variable to include looking into the breakdancer directory for bam2cfg.pl and breakdancer_max.