Commit 9856de0a authored by Andreas Tille's avatar Andreas Tille
Browse files

New upstream version 3.2.0

parent 65c61e44
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.1.0" )
set( SEQAN_APP_VERSION "3.2.0" )

include_directories( ${FLEXBAR_SOURCE_DIR}/include )
# link_directories( ${FLEXBAR_SOURCE_DIR}/lib )
+6 −6
Original line number Diff line number Diff line
@@ -28,20 +28,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.2.0 [here](https://github.com/seqan/seqan/releases/download/seqan-v2.2.0/seqan-library-2.2.0.tar.xz)
* Download Flexbar 3.1 source code [release](https://github.com/seqan/flexbar/releases)
* Download Flexbar 3.2 source code [release](https://github.com/seqan/flexbar/releases)

Decompress both files:

	tar xzf flexbar-3.1.0.tar.gz
	tar xzf flexbar-3.2.0.tar.gz
	tar xJf seqan-library-2.2.0.tar.xz

Move SeqAn include folder to Flexbar:

	mv seqan-library-2.2.0/include flexbar-3.1.0
	mv seqan-library-2.2.0/include flexbar-3.2.0

Use these commands for building:

	cd flexbar-3.1.0
	cd flexbar-3.2.0
	cmake .
	make

@@ -77,9 +77,9 @@ In this example, reads that are barcoded on left side are demultiplexed by speci

	flexbar -r reads.fq -t target -b brc.fa -be LTAIL -a adp.fa

The second example shows how to trim compressed reads based on their quality scores in illumina version 1.8 format. Afterwards, provided adapters are removed in right trim-end mode, only if the overlap of adapter and read has at least length five with at most 40% errors.
The second example shows how to trim compressed reads based on their quality scores in illumina version 1.8 format. Afterwards, provided adapters are removed in right trim-end mode, only if the overlap of adapter and read has at least length 5 with at most 20% errors.

	flexbar -r reads.fq.gz -q TAIL -qf i1.8 -a adp.fa -ao 5 -at 0.4
	flexbar -r reads.fq.gz -q TAIL -qf i1.8 -a adp.fa -ao 5 -at 0.2

For further examples visit the [manual](https://github.com/seqan/flexbar/wiki) page.
+5 −3
Original line number Diff line number Diff line
@@ -2,7 +2,9 @@
   
   Flexbar - flexible barcode and adapter removal
   
   Version 3.1.0
   Version 3.2.0
   
   BSD 3-Clause License
   
   uses SeqAn library release 2.2.0
   and TBB library 4.0 or later
@@ -27,8 +29,8 @@ int main(int argc, const char* argv[]){
	using namespace std;
	using namespace seqan;
	
	const string version = "3.1";
	const string date    = "April 2018";
	const string version = "3.2";
	const string date    = "May 2018";
	
	ArgumentParser parser("flexbar");
	
+8 −7
Original line number Diff line number Diff line
@@ -98,17 +98,18 @@ void loadAdapters(Options &o, const bool secondSet, const bool useAdapterFile){
		}
	}
	else{
		if(o.rcMode == RCOFF || o.rcMode == RCON){
			TBar bar;
			bar.id  = "cmdline";
			bar.seq = o.adapterSeq;
			o.adapters.push_back(bar);
		
		if(o.revCompAdapter){
		}
		if(o.rcMode == RCON || o.rcMode == RCONLY){
			TSeqStr adapterSeqRC = o.adapterSeq;
			seqan::reverseComplement(adapterSeqRC);
			
			TBar barRC;
			barRC.id  = "cmdline revcomp";
			barRC.id  = "cmdline_rc";
			barRC.seq = adapterSeqRC;
			o.adapters.push_back(barRC);
		}
+27 −9
Original line number Diff line number Diff line
@@ -11,17 +11,21 @@ class SeqRead {
	TSeqStr seq;
	TString id, qual, umi;
	
	bool rmAdapter, rmAdapterRC;
	
	SeqRead(TSeqStr& sequence, TString& seqID) :
		seq(sequence),
		id(seqID),
		umi(""){
		rmAdapter(false),
		rmAdapterRC(false){
	}
	
	SeqRead(TSeqStr& sequence, TString& seqID, TString& quality) :
		seq(sequence),
		id(seqID),
		qual(quality),
		umi(""){
		rmAdapter(false),
		rmAdapterRC(false){
	}
};

@@ -60,7 +64,7 @@ struct AlignResults{
	int overlapLength, queryLength, tailLength;
	
	float allowedErrors;
	TSeqStr randTag;
	TSeqStr umiTag;
	std::string alString;
	
	AlignResults(){}
@@ -116,16 +120,30 @@ namespace flexbar{
		
		FString id;
		FSeqStr seq;
		bool rcAdapter;
		
		tbb::atomic<unsigned long> rmOverlap, rmFull;
		
		TBar() :
			rmOverlap(0),
			rmFull(0){
			rmFull(0),
			rcAdapter(false){
	    }
	};
	
	
	enum RevCompMode {
		RCOFF,
		RCON,
		RCONLY
	};
	
	enum AlignmentMode {
		ALIGNALL,
		ALIGNRCOFF,
		ALIGNRC
	};
	
	enum ComputeCycle {
		PRELOAD,
		COMPUTE,
Loading