Commit 4c5fb050 authored by Andreas Tille's avatar Andreas Tille
Browse files

New upstream version 3.5.0

parent 5d9caef2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ cmake_minimum_required( VERSION 2.8.2 )

project( FLEXBAR )

set( SEQAN_APP_VERSION "3.4.0" )
set( SEQAN_APP_VERSION "3.5.0" )

include_directories( ${FLEXBAR_SOURCE_DIR}/include )
# link_directories( ${FLEXBAR_SOURCE_DIR}/lib )
+17 −9
Original line number Diff line number Diff line
## Flexbar – flexible barcode and adapter removal

The program Flexbar preprocesses high-throughput sequencing data efficiently. It demultiplexes barcoded runs and removes adapter sequences. Moreover, trimming and filtering features are provided. Flexbar increases read mapping rates and improves genome as well as transcriptome assemblies. Unique molecular identifiers can be extracted in a flexible way. The program supports sequencing data in fasta and fastq format, e.g. from the Illumina platform.
The program Flexbar preprocesses high-throughput sequencing data efficiently. It demultiplexes barcoded runs and removes adapter sequences. Several adapter removal presets for Illumina libraries are included. Flexbar computes exact overlap alignments using SIMD and multicore parallelism. Moreover, trimming and filtering features are provided, e.g. trimming of homopolymers at read ends. Flexbar increases read mapping rates and improves genome as well as transcriptome assemblies. Unique molecular identifiers can be extracted in a flexible way. The software supports data in fasta and fastq format from multiple sequencing platforms.

Refer to the [manual](https://github.com/seqan/flexbar/wiki) or contact [Johannes Roehr](https://github.com/jtroehr) for support with this application.

@@ -22,7 +22,15 @@ See article on [PubMed](https://www.ncbi.nlm.nih.gov/pubmed/24832523)

### Download

Flexbar source code as well as binaries for Linux and Mac OS can be downloaded on the [release](https://github.com/seqan/flexbar/releases) page. Please follow instructions for building or setup of binaries below. Additionally, Flexbar is available via package manager on Debian systems and in Conda. Versions before 2.4 can be found on the [old](https://sourceforge.net/projects/flexbar) page.
Flexbar source code as well as binaries for Linux and Mac OS can be downloaded on the [release](https://github.com/seqan/flexbar/releases) page. Please follow instructions for building or setup of binaries below. Additionally, Flexbar is available via package manager on Debian systems, in Homebrew, and in Bioconda. Versions before 2.4 can be found on the [old](https://sourceforge.net/projects/flexbar) page.

Installation with package managers:

* Debian: `sudo apt install flexbar`
* Homebrew: `brew install brewsci/science/flexbar`
* Bioconda: `conda install -c bioconda flexbar`

To get the latest version and best performance consider to build Flexbar from source.


### Building from source
@@ -30,20 +38,20 @@ Flexbar source code as well as binaries for Linux and Mac OS can be downloaded o
Make sure that `cmake` is available, as well as development and runtime files of the TBB library 4.0 or later (Intel Threading Building Blocks). For example on Debian systems, install the packages `libtbb-dev` and `libtbb2`. Furthermore, the SeqAn library and a compiler that supports C++14 is required:

* Get SeqAn library version 2.4.0 [here](https://github.com/seqan/seqan/releases/download/seqan-v2.4.0/seqan-library-2.4.0.tar.xz)
* Download Flexbar 3.4 source code [release](https://github.com/seqan/flexbar/releases)
* Download Flexbar 3.5.0 source code [release](https://github.com/seqan/flexbar/releases)

Decompress both files:

	tar xzf flexbar-3.4.0.tar.gz
	tar xzf flexbar-3.5.0.tar.gz
	tar xJf seqan-library-2.4.0.tar.xz

Move SeqAn include folder to Flexbar:

	mv seqan-library-2.4.0/include flexbar-3.4.0
	mv seqan-library-2.4.0/include flexbar-3.5.0

Use these commands for building:

	cd flexbar-3.4.0
	cd flexbar-3.5.0
	cmake .
	make

@@ -57,12 +65,12 @@ For execution of provided Flexbar binaries, the corresponding TBB library has to
#### Linux
Adjust lib search path to include the absolute path of the Flexbar directory containing the lib file libtbb.so.2 for the current terminal session, or permanently in shell startup scripts:

	export LD_LIBRARY_PATH=/path/FlexbarDir:$LD_LIBRARY_PATH
	export LD_LIBRARY_PATH=/YourPath/flexbar-3.5.0-linux:$LD_LIBRARY_PATH

#### Mac OS
It applies the same as for Linux. Make the file libtbb.dylib available by setting the lib search path:

	export DYLD_LIBRARY_PATH=/path/FlexbarDir:$DYLD_LIBRARY_PATH
	export DYLD_LIBRARY_PATH=/YourPath/flexbar-3.5.0-macos:$DYLD_LIBRARY_PATH


### Program usage
@@ -95,7 +103,7 @@ To remove adapter sequences from single-end reads, specify a file with adapters

For paired-end libraries, specify both files with paired reads and a fasta file with adapters for removal. Given adapters are trimmed in right mode per default. It is recommended to activate the pair overlap detection in case of standard paired reads. This increases the sensitivity by removing very short parts of adapters if an overlap is detected for a pair.

	flexbar -r r1.fq -p r2.fq -a adapters.fa -ap ON
	flexbar -r r1.fq -p r2.fq -a a1.fa -a2 a2.fa -ap ON

#### Adapter removal presets

galaxy/flexbar.pl

0 → 100755
+86 −0
Original line number Diff line number Diff line
#!/usr/bin/env perl

# Flexbar wrapper for Galaxy tool definition, version 3.5.0
# Author: Johannes Roehr

use warnings;
use strict;

my $format;
my @inFiles;
my @outFiles;

my $compression = "";

foreach(0..$#ARGV){
	my $arg = $ARGV[$_];
	
	if($arg =~ /\.(fastq\w+)$/ || $arg =~ /\.(fastq\w+\.gz)$/ || $arg =~ /\.(fastq\w+\.bz2)$/){
		
		if(defined $format && $format ne $1){
			warn "Read files should have the same format.\n";
			exit 1;
		}
		$format = $1;
		
		my $file = $arg;
		
		$arg =~ s/\.fastq\w+$/\.fastq/;
		$arg =~ s/\.fastq\w+\.gz$/\.fastq\.gz/;
		$arg =~ s/\.fastq\w+\.bz2$/\.fastq\.bz2/;
		
		$compression = "GZ"  if $arg =~ /\.fastq\.gz$/;
		$compression = "BZ2" if $arg =~ /\.fastq\.bz2$/;
		
		$ARGV[$_] = $arg;
		
		if($arg =~ /\.dat_input\w\.fastq$/ || $arg =~ /\.dat_input\w\.fastq\.gz$/ || $arg =~ /\.dat_input\w\.fastq\.bz2$/){
			push @inFiles, $arg;
			rename $file, $arg;
		}
		
		push @outFiles, $arg if $arg =~ /\.dat\.fastq$/ || $arg =~ /\.dat\.fastq\.gz$/ || $arg =~ /\.dat\.fastq\.bz2$/;
	}
}

my $barcoded = 0;

$barcoded = 1 if $ARGV[$#ARGV] =~ /barcoded$/;

my $call = join " ", @ARGV[0..($#ARGV - $barcoded)];

# $call = $call ." --zip-output ". $compression if $barcoded && $compression ne "";

system $call and exit 1;


unlink $_ or warn "Could not unlink $_: $!" foreach(@inFiles);

if($barcoded){
	$format =~ s/\.gz//;
	$format =~ s/\.bz2//;
	
	foreach(<$ARGV[$#ARGV]/flexbarOut*.fastq*>){
		
		my $file = $_;
		
		s/fastq$/$format/;
		# s/fastq\.gz$/$format/;
		# s/fastq\.bz2$/$format/;
		
		rename $file, $_;
	}
}
else{
	foreach(@outFiles){
		
		my $file = $_;
		
		s/\.fastq$//;
		s/\.fastq\.gz$//;
		s/\.fastq\.bz2$//;
		
		rename $file, $_;
	}
}

galaxy/flexbar.xml

0 → 100644
+739 −0

File added.

Preview size limit exceeded, changes collapsed.

+3 −3
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
   
   Flexbar - flexible barcode and adapter removal
   
   Version 3.4.0
   Version 3.5.0
   
   BSD 3-Clause License
   
@@ -29,8 +29,8 @@ int main(int argc, const char* argv[]){
	using namespace std;
	using namespace seqan;
	
	const string version = "3.4.0";
	const string date    = "June 2018";
	const string version = "3.5.0";
	const string date    = "May 2019";
	
	ArgumentParser parser("flexbar");
	
Loading