[med-svn] [tn-seqexplorer] 03/04: New upstream version 1.5+dfsg

Andreas Tille tille at debian.org
Sun May 7 06:04:22 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository tn-seqexplorer.

commit 71c92bb8d957f9db2f1f77ca26310dd64cb941b7
Author: Andreas Tille <tille at debian.org>
Date:   Sun May 7 07:57:53 2017 +0200

    New upstream version 1.5+dfsg
---
 .gitignore                                         |  19 +
 src/resources/bowtie-bin/linux/bowtie2             | 583 ---------------------
 src/resources/bowtie-bin/linux/bowtie2-align-l     | Bin 11241470 -> 0 bytes
 src/resources/bowtie-bin/linux/bowtie2-align-s     | Bin 11227955 -> 0 bytes
 src/resources/bowtie-bin/linux/bowtie2-build       |  98 ----
 src/resources/bowtie-bin/linux/bowtie2-build-l     | Bin 3400174 -> 0 bytes
 src/resources/bowtie-bin/linux/bowtie2-build-s     | Bin 3420470 -> 0 bytes
 src/resources/bowtie-bin/mac/bowtie2               | 583 ---------------------
 src/resources/bowtie-bin/mac/bowtie2-align-l       | Bin 1113520 -> 0 bytes
 src/resources/bowtie-bin/mac/bowtie2-align-s       | Bin 1109448 -> 0 bytes
 src/resources/bowtie-bin/mac/bowtie2-build         |  98 ----
 src/resources/bowtie-bin/mac/bowtie2-build-l       | Bin 374916 -> 0 bytes
 src/resources/bowtie-bin/mac/bowtie2-build-s       | Bin 370340 -> 0 bytes
 .../bowtie-bin/win-64/bowtie2-align-s.exe          | Bin 31967831 -> 0 bytes
 .../bowtie-bin/win-64/bowtie2-build-s.exe          | Bin 11328963 -> 0 bytes
 src/resources/bwa-0.7.5a.tar.bz2                   | Bin 149887 -> 0 bytes
 src/resources/done.gif                             | Bin 534 -> 0 bytes
 src/resources/info.png                             | Bin 7795 -> 0 bytes
 src/resources/install-bwa-redhat.sh                |  36 --
 src/resources/install-bwa-ubuntu.sh                |  38 --
 src/resources/legaldisclaimer.png                  | Bin 8863 -> 0 bytes
 src/resources/load.gif                             | Bin 1849 -> 0 bytes
 22 files changed, 19 insertions(+), 1436 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..7b0c231
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,19 @@
+bin/
+
+log.out
+projects.dat
+
+*.class
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+
+*.war
+*.ear
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+
+bowtie2*
diff --git a/src/resources/bowtie-bin/linux/bowtie2 b/src/resources/bowtie-bin/linux/bowtie2
deleted file mode 100755
index 497a851..0000000
--- a/src/resources/bowtie-bin/linux/bowtie2
+++ /dev/null
@@ -1,583 +0,0 @@
-#!/usr/bin/env perl
-
-#
-# Copyright 2011, Ben Langmead <langmea at cs.jhu.edu>
-#
-# This file is part of Bowtie 2.
-#
-# Bowtie 2 is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Bowtie 2 is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Bowtie 2.  If not, see <http://www.gnu.org/licenses/>.
-#
-
-# bowtie2:
-#
-# A wrapper script for bowtie2.  Provides various advantages over running
-# bowtie2 directly, including:
-#
-# 1. Handling compressed inputs
-# 2. Redirecting output to various files
-# 3. Output directly to bam (not currently supported)
-
-use strict;
-use warnings;
-use Getopt::Long qw(GetOptions);
-use File::Spec;
-use POSIX;
-
-
-my ($vol,$script_path,$prog);
-$prog = File::Spec->rel2abs( __FILE__ );
-
-while (-f $prog && -l $prog){
-    my (undef, $dir, undef) = File::Spec->splitpath($prog);
-    $prog = File::Spec->rel2abs(readlink($prog), $dir);
-}
-
-($vol,$script_path,$prog) 
-                = File::Spec->splitpath($prog);
-my $os_is_nix   = ($^O eq "linux") || ($^O eq "darwin");
-my $align_bin_s = $os_is_nix ? 'bowtie2-align-s' : 'bowtie2-align-s.exe'; 
-my $build_bin   = $os_is_nix ? 'bowtie2-build' : 'bowtie2-build.exe';               
-my $align_bin_l = $os_is_nix ? 'bowtie2-align-l' : 'bowtie2-align-l.exe'; 
-my $align_prog_s= File::Spec->catpath($vol,$script_path,$align_bin_s);
-my $align_prog_l= File::Spec->catpath($vol,$script_path,$align_bin_l);
-my $align_prog  = $align_prog_s;
-my $idx_ext_l     = 'bt2l'; 
-my $idx_ext_s     = 'bt2'; 
-my $idx_ext       = $idx_ext_s; 
-my %signo       = ();
-my @signame     = ();
-
-{
-	# Get signal info
-	use Config;
-	my $i = 0;
-	for my $name (split(' ', $Config{sig_name})) {
-		$signo{$name} = $i;
-		$signame[$i] = $name;
-		$i++;
-	}
-}
-
-(-x "$align_prog") ||
-	Fail("Expected bowtie2 to be in same directory with bowtie2-align:\n$script_path\n");
-
-# Get description of arguments from Bowtie 2 so that we can distinguish Bowtie
-# 2 args from wrapper args
-sub getBt2Desc($) {
-	my $d = shift;
-	my $cmd = "$align_prog --wrapper basic-0 --arg-desc";
-	open(my $fh, "$cmd |") || Fail("Failed to run command '$cmd'\n");
-	while(readline $fh) {
-		chomp;
-		next if /^\s*$/;
-		my @ts = split(/\t/);
-		$d->{$ts[0]} = $ts[1];
-	}
-	close($fh);
-	$? == 0 || Fail("Description of arguments failed!\n");
-}
-
-my %desc = ();
-my %wrapped = ("1" => 1, "2" => 1);
-getBt2Desc(\%desc);
-
-# Given an option like -1, determine whether it's wrapped (i.e. should be
-# handled by this script rather than being passed along to Bowtie 2)
-sub isWrapped($) { return defined($wrapped{$_[0]}); }
-
-my @orig_argv = @ARGV;
-
-my @bt2w_args = (); # options for wrapper
-my @bt2_args  = (); # options for Bowtie 2
-my $saw_dd = 0;
-for(0..$#ARGV) {
-	if($ARGV[$_] eq "--") {
-		$saw_dd = 1;
-		next;
-	}
-	push @bt2w_args, $ARGV[$_] if !$saw_dd;
-	push @bt2_args,  $ARGV[$_] if  $saw_dd;
-}
-if(!$saw_dd) {
-	@bt2_args = @bt2w_args;
-	@bt2w_args= ();
-}
-
-my $debug = 0;
-my %read_fns = ();
-my %read_compress = ();
-my $cap_out = undef;       # Filename for passthrough
-my $no_unal = 0;
-my $large_idx = 0;
-# Remove whitespace
-for my $i (0..$#bt2_args) {
-	$bt2_args[$i]=~ s/^\s+//; $bt2_args[$i] =~ s/\s+$//;
-}
-
-# We've handled arguments that the user has explicitly directed either to the
-# wrapper or to bowtie2, now we capture some of the bowtie2 arguments that
-# ought to be handled in the wrapper
-for(my $i = 0; $i < scalar(@bt2_args); $i++) {
-	next unless defined($bt2_args[$i]);
-	my $arg = $bt2_args[$i];
-	my @args = split(/=/, $arg);
-	if(scalar(@args) > 2) {
-		$args[1] = join("=", @args[1..$#args]);
-	}
-	$arg = $args[0];
-	if($arg eq "-U" || $arg eq "--unpaired") {
-		$bt2_args[$i] = undef;
-		$arg =~ s/^-U//; $arg =~ s/^--unpaired//;
-		if($arg ne "") {
-			# Argument was part of this token
-			my @args = split(/,/, $arg);
-			for my $a (@args) { push @bt2w_args, ("-U", $a); }
-		} else {
-			# Argument is in the next token
-			$i < scalar(@bt2_args)-1 || Fail("Argument expected in next token!\n");
-			$i++;
-			my @args = split(/,/, $bt2_args[$i]);
-			for my $a (@args) { push @bt2w_args, ("-U", $a); }
-			$bt2_args[$i] = undef;
-		}
-	}
-	if($arg =~ /^--?([12])/ && $arg !~ /^--?12/) {
-		my $mate = $1;
-		$bt2_args[$i] = undef;
-		$arg =~ s/^--?[12]//;
-		if($arg ne "") {
-			# Argument was part of this token
-			my @args = split(/,/, $arg);
-			for my $a (@args) { push @bt2w_args, ("-$mate", $a); }
-		} else {
-			# Argument is in the next token
-			$i < scalar(@bt2_args)-1 || Fail("Argument expected in next token!\n");
-			$i++;
-			my @args = split(/,/, $bt2_args[$i]);
-			for my $a (@args) { push @bt2w_args, ("-$mate", $a); }
-			$bt2_args[$i] = undef;
-		}
-	}
-	if($arg eq "--debug") {
-		$debug = 1;
-		$bt2_args[$i] = undef;
-	}
-	if($arg eq "--no-unal") {
-		$no_unal = 1;
-		$bt2_args[$i] = undef;
-	}
-	if($arg eq "--large-index") {
-		$large_idx = 1;
-		$bt2_args[$i] = undef;
-	}
-	for my $rarg ("un-conc", "al-conc", "un", "al") {
-		if($arg =~ /^--${rarg}$/ || $arg =~ /^--${rarg}-gz$/ || $arg =~ /^--${rarg}-bz2$/) {
-			$bt2_args[$i] = undef;
-			if(scalar(@args) > 1 && $args[1] ne "") {
-				$read_fns{$rarg} = $args[1];
-			} else {
-				$i < scalar(@bt2_args)-1 || Fail("--${rarg}* option takes an argument.\n");
-				$read_fns{$rarg} = $bt2_args[$i+1];
-				$bt2_args[$i+1] = undef;
-			}
-			$read_compress{$rarg} = "";
-			$read_compress{$rarg} = "gzip"  if $arg eq "--${rarg}-gz";
-			$read_compress{$rarg} = "bzip2" if $arg eq "--${rarg}-bz2";
-			last;
-		}
-	}
-}
-# If the user asked us to redirect some reads to files, or to suppress
-# unaligned reads, then we need to capture the output from Bowtie 2 and pass it
-# through this wrapper.
-my $passthru = 0;
-if(scalar(keys %read_fns) > 0 || $no_unal) {
-	$passthru = 1;
-	push @bt2_args, "--passthrough";
-	$cap_out = "-";
-	for(my $i = 0; $i < scalar(@bt2_args); $i++) {
-		next unless defined($bt2_args[$i]);
-		my $arg = $bt2_args[$i];
-		if($arg eq "-S" || $arg eq "--output") {
-			$i < scalar(@bt2_args)-1 || Fail("-S/--output takes an argument.\n");
-			$cap_out = $bt2_args[$i+1];
-			$bt2_args[$i] = undef;
-			$bt2_args[$i+1] = undef;
-		}
-	}
-}
-my @tmp = ();
-for (@bt2_args) { push(@tmp, $_) if defined($_); }
- at bt2_args = @tmp;
-
-my @unps = ();
-my @mate1s = ();
-my @mate2s = ();
-my @to_delete = ();
-my $temp_dir = "/tmp";
-my $bam_out = 0;
-my $ref_str = undef;
-my $no_pipes = 0;
-my $keep = 0;
-my $verbose = 0;
-my $readpipe = undef;
-my $log_fName = undef;
-my $help = 0;
-
-my @bt2w_args_cp = (@bt2w_args>0) ? @bt2w_args : @bt2_args;
-Getopt::Long::Configure("pass_through","no_ignore_case");
-
-my @old_ARGV = @ARGV;
- at ARGV = @bt2w_args_cp;
-
-GetOptions(
-	"1=s"                           => \@mate1s,
-	"2=s"                           => \@mate2s,
-	"reads|U=s"                     => \@unps,
-	"temp-directory=s"              => \$temp_dir,
-	"bam"                           => \$bam_out,
-	"no-named-pipes"                => \$no_pipes,
-	"ref-string|reference-string=s" => \$ref_str,
-	"keep"                          => \$keep,
-	"verbose"                       => \$verbose,
-	"log-file=s"                    => \$log_fName,
-	"help|h"                        => \$help
-);
-
- at ARGV = @old_ARGV;
-
-my $old_stderr;
-
-if ($log_fName) {
-    open($old_stderr, ">&STDERR") or Fail("Cannot dup STDERR!\n");
-    open(STDERR, ">", $log_fName) or Fail("Cannot redirect to log file $log_fName.\n");
-}
-
-Info("Before arg handling:\n");
-Info("  Wrapper args:\n[ @bt2w_args ]\n");
-Info("  Binary args:\n[ @bt2_args ]\n");
-
-sub cat_file($$) {
-	my ($ifn, $ofh) = @_;
-	my $ifh = undef;
-	if($ifn =~ /\.gz$/) {
-		open($ifh, "gzip -dc $ifn |") ||
-			 Fail("Could not open gzipped read file: $ifn \n");
-	} elsif($ifn =~ /\.bz2/) {
-		open($ifh, "bzip2 -dc $ifn |") ||
-			Fail("Could not open bzip2ed read file: $ifn \n");
-	} else {
-		open($ifh, $ifn) || Fail("Could not open read file: $ifn \n");
-	}
-	while(readline $ifh) { print {$ofh} $_; }
-	close($ifh);
-}
-
-# Return non-zero if and only if the input should be wrapped (i.e. because
-# it's compressed).
-sub wrapInput($$$) {
-	my ($unps, $mate1s, $mate2s) = @_;
-	for my $fn (@$unps, @$mate1s, @$mate2s) {
-		return 1 if $fn =~ /\.gz$/ || $fn =~ /\.bz2$/;
-	}
-	return 0;
-}
-
-sub Info {
-    if ($verbose) {
-        print STDERR "(INFO): " , at _;
-    }
-}
-
-sub Error {
-    my @msg = @_;
-    $msg[0] = "(ERR): ".$msg[0];
-    printf STDERR @msg;
-}
-
-sub Fail {
-    Error(@_);
-    die("Exiting now ...\n");    
-}
-
-sub Extract_IndexName_From {
-    my $index_opt = $ref_str ? '--index' : '-x';
-    for (my $i=0; $i<@_; $i++) {
-        if ($_[$i] eq $index_opt){
-            return $_[$i+1];
-        }
-    }
-    Info("Cannot find any index option (--reference-string, --ref-string or -x) in the given command line.\n");    
-}
-
-if(wrapInput(\@unps, \@mate1s, \@mate2s)) {
-	if(scalar(@mate2s) > 0) {
-		#
-		# Wrap paired-end inputs
-		#
-		# Put reads into temporary files or fork off processes to feed named pipes
-		scalar(@mate2s) == scalar(@mate1s) ||
-			Fail("Different number of files specified with --reads/-1 as with -2\n");
-		# Make a named pipe for delivering mate #1s
-		my $m1fn = "$temp_dir/$$.inpipe1";
-		push @to_delete, $m1fn;
-		push @bt2_args, "-1 $m1fn";
-		# Create named pipe 1 for writing
-		if(!$no_pipes) {
-			mkfifo($m1fn, 0700) || Fail("mkfifo($m1fn) failed.\n");
-		}
-		my $pid = 0;
-		$pid = fork() unless $no_pipes;
-		if($pid == 0) {
-			# Open named pipe 1 for writing
-			open(my $ofh, ">$m1fn") || Fail("Can't open '$m1fn' for writing\n");
-			for my $ifn (@mate1s) { cat_file($ifn, $ofh); }
-			close($ofh);
-			exit 0 unless $no_pipes;
-		}
-		# Make a named pipe for delivering mate #2s
-		my $m2fn = "$temp_dir/$$.inpipe2";
-		push @to_delete, $m2fn;
-		push @bt2_args, "-2 $m2fn";
-		# Create named pipe 2 for writing
-		if(!$no_pipes) {
-			mkfifo($m2fn, 0700) || Fail("mkfifo($m2fn) failed.\n");
-		}
-		$pid = 0;
-		$pid = fork() unless $no_pipes;
-		if($pid == 0) {
-			# Open named pipe 2 for writing
-			open(my $ofh, ">$m2fn") || Fail("Can't open '$m2fn' for writing.\n");
-			for my $ifn (@mate2s) { cat_file($ifn, $ofh); }
-			close($ofh);
-			exit 0 unless $no_pipes;
-		}
-	}
-	if(scalar(@unps) > 0) {
-		#
-		# Wrap unpaired inputs.
-		#
-		# Make a named pipe for delivering unpaired reads
-		my $ufn = "$temp_dir/$$.unp";
-		push @to_delete, $ufn;
-		push @bt2_args, "-U $ufn";
-		# Create named pipe 2 for writing
-		if(!$no_pipes) {
-			mkfifo($ufn, 0700) || Fail("mkfifo($ufn) failed.\n");
-		}
-		my $pid = 0;
-		$pid = fork() unless $no_pipes;
-		if($pid == 0) {
-			# Open named pipe 2 for writing
-			open(my $ofh, ">$ufn") || Fail("Can't open '$ufn' for writing.\n");
-			for my $ifn (@unps) { cat_file($ifn, $ofh); }
-			close($ofh);
-			exit 0 unless $no_pipes;
-		}
-	}
-} else {
-	if(scalar(@mate2s) > 0) {
-		# Just pass all the mate arguments along to the binary
-		push @bt2_args, ("-1", join(",", @mate1s));
-		push @bt2_args, ("-2", join(",", @mate2s));
-	}
-	if(scalar(@unps) > 0) {
-		push @bt2_args, ("-U", join(",", @unps));
-	}
-}
-
-if(defined($ref_str)) {
-	my $ofn = "$temp_dir/$$.ref_str.fa";
-	open(my $ofh, ">$ofn") ||
-		Fail("could not open temporary fasta file '$ofn' for writing.\n");
-	print {$ofh} ">1\n$ref_str\n";
-	close($ofh);
-	push @to_delete, $ofn;
-	system("$build_bin $ofn $ofn") == 0 ||
-		Fail("bowtie2-build returned non-0 exit level.\n");
-	push @bt2_args, ("--index", "$ofn");
-	push @to_delete, ("$ofn.1.".$idx_ext, "$ofn.2.".$idx_ext, 
-	                  "$ofn.3.".$idx_ext, "$ofn.4.".$idx_ext,
-	                  "$ofn.rev.1.".$idx_ext, "$ofn.rev.2.".$idx_ext);
-}
-
-Info("After arg handling:\n");
-Info("  Binary args:\n[ @bt2_args ]\n");
-
-my $index_name = Extract_IndexName_From(@bt2_args);
-
-if ($large_idx) {
-    Info("Using a large index enforced by user.\n");
-    $align_prog  = $align_prog_l;
-    $idx_ext     = $idx_ext_l;
-    if (not -f $index_name.".1.".$idx_ext_l) {
-        Fail("Cannot find the large index ${index_name}.1.${idx_ext_l}\n");
-    }
-    Info("Using large index (${index_name}.1.${idx_ext_l}).\n");
-}
-else {
-    if ((-f $index_name.".1.".$idx_ext_l) && 
-        (not -f $index_name.".1.".$idx_ext_s)) {
-        Info("Cannot find a small index but a large one seems to be present.\n");
-        Info("Switching to using the large index (${index_name}.1.${idx_ext_l}).\n");
-        $align_prog  = $align_prog_l;
-        $idx_ext     = $idx_ext_l;
-    }
-    else {
-        Info("Using the small index (${index_name}.1.${idx_ext_s}).\n")
-    }
-}
-
-my $debug_str = ($debug ? "-debug" : "");
-
-# Construct command invoking bowtie2-align
-my $cmd = "$align_prog$debug_str --wrapper basic-0 ".join(" ", @bt2_args);
-
-# Possibly add read input on an anonymous pipe
-$cmd = "$readpipe $cmd" if defined($readpipe);
-
-Info("$cmd\n");
-my $ret;
-if(defined($cap_out)) {
-	# Open Bowtie 2 pipe
-	open(BT, "$cmd |") || Fail("Could not open Bowtie 2 pipe: '$cmd |'\n");
-	# Open output pipe
-	my $ofh = *STDOUT;
-	my @fhs_to_close = ();
-	if($cap_out ne "-") {
-		open($ofh, ">$cap_out") ||
-			Fail("Could not open output file '$cap_out' for writing.\n");
-	}
-	my %read_fhs = ();
-	for my $i ("al", "un", "al-conc", "un-conc") {
-		if(defined($read_fns{$i})) {
-            my ($vol, $base_spec_dir, $base_fname) = File::Spec->splitpath($read_fns{$i});
-            if (-d $read_fns{$i}) {
-                $base_spec_dir = $read_fns{$i};
-                $base_fname = undef;
-            }
-			if($i =~ /-conc$/) {
-				# Open 2 output files, one for mate 1, one for mate 2
-				my ($fn1, $fn2);
-                if ($base_fname) {
-                    ($fn1, $fn2) = ($base_fname,$base_fname);
-                }
-                else {
-                    ($fn1, $fn2) = ($i.'-mate',$i.'-mate');
-                }
-				if($fn1 =~ /%/) {
-					$fn1 =~ s/%/1/g; $fn2 =~ s/%/2/g;
-				} elsif($fn1 =~ /\.[^.]*$/) {
-					$fn1 =~ s/\.([^.]*)$/.1.$1/;
-					$fn2 =~ s/\.([^.]*)$/.2.$1/;
-				} else {
-					$fn1 .= ".1";
-					$fn2 .= ".2";
-				}
-                $fn1 = File::Spec->catpath($vol,$base_spec_dir,$fn1);
-                $fn2 = File::Spec->catpath($vol,$base_spec_dir,$fn2);
-				$fn1 ne $fn2 || Fail("$fn1\n$fn2\n");
-				my ($redir1, $redir2) = (">$fn1", ">$fn2");
-				$redir1 = "| gzip -c $redir1"  if $read_compress{$i} eq "gzip";
-				$redir1 = "| bzip2 -c $redir1" if $read_compress{$i} eq "bzip2";
-				$redir2 = "| gzip -c $redir2"  if $read_compress{$i} eq "gzip";
-				$redir2 = "| bzip2 -c $redir2" if $read_compress{$i} eq "bzip2";
-				open($read_fhs{$i}{1}, $redir1) || Fail("Could not open --$i mate-1 output file '$fn1'\n");
-				open($read_fhs{$i}{2}, $redir2) || Fail("Could not open --$i mate-2 output file '$fn2'\n");
-				push @fhs_to_close, $read_fhs{$i}{1};
-				push @fhs_to_close, $read_fhs{$i}{2};
-			} else {
-			    my $redir = ">".File::Spec->catpath($vol,$base_spec_dir,$i."-seqs");
-			    if ($base_fname) {
-				    $redir = ">$read_fns{$i}";
-			    }
-				$redir = "| gzip -c $redir"  if $read_compress{$i} eq "gzip";
-				$redir = "| bzip2 -c $redir" if $read_compress{$i} eq "bzip2";
-				open($read_fhs{$i}, $redir) || Fail("Could not open --$i output file '$read_fns{$i}'\n");
-				push @fhs_to_close, $read_fhs{$i};
-			}
-		}
-	}
-	while(<BT>) {
-		chomp;
-		my $filt = 0;
-		unless(substr($_, 0, 1) eq "@") {
-			# If we are supposed to output certain reads to files...
-			my $tab1_i = index($_, "\t") + 1;
-			my $tab2_i = index($_, "\t", $tab1_i);
-			my $fl = substr($_, $tab1_i, $tab2_i - $tab1_i);
-			my $unal = ($fl & 4) != 0;
-			$filt = 1 if $no_unal && $unal;
-			if($passthru) {
-				if(scalar(keys %read_fhs) == 0) {
-					# Next line is read with some whitespace escaped
-					my $l = <BT>;
-				} else {
-					my $mate1 = (($fl &  64) != 0);
-					my $mate2 = (($fl & 128) != 0);
-					my $unp = !$mate1 && !$mate2;
-					my $pair = !$unp;
-					# Next line is read with some whitespace escaped
-					my $l = <BT>;
-					chomp($l);
-					$l =~ s/%(..)/chr(hex($1))/eg;
-					if((defined($read_fhs{un}) || defined($read_fhs{al})) && $unp) {
-						if($unal) {
-							# Failed to align
-							print {$read_fhs{un}} $l if defined($read_fhs{un});
-						} else {
-							# Aligned
-							print {$read_fhs{al}} $l if defined($read_fhs{al});
-						}
-					}
-					if((defined($read_fhs{"un-conc"}) || defined($read_fhs{"al-conc"})) && $pair) {
-						my $conc  = (($fl &   2) != 0);
-						if     ($conc && $mate1) {
-							print {$read_fhs{"al-conc"}{1}} $l if defined($read_fhs{"al-conc"});
-						} elsif($conc && $mate2) {
-							print {$read_fhs{"al-conc"}{2}} $l if defined($read_fhs{"al-conc"});
-						} elsif(!$conc && $mate1) {
-							print {$read_fhs{"un-conc"}{1}} $l if defined($read_fhs{"un-conc"});
-						} elsif(!$conc && $mate2) {
-							print {$read_fhs{"un-conc"}{2}} $l if defined($read_fhs{"un-conc"});
-						}
-					}
-				}
-			}
-		}
-		print {$ofh} "$_\n" if !$filt;
-	}
-	for my $k (@fhs_to_close) { close($k); }
-	close($ofh);
-	close(BT);
-	$ret = $?;
-} else {
-	$ret = system($cmd);
-}
-if(!$keep) { for(@to_delete) { unlink($_); } }
-
-if ($ret == -1) {
-    Error("Failed to execute bowtie2-align: $!\n");
-	exit 1;
-} elsif ($ret & 127) {
-	my $signm = "(unknown)";
-	$signm = $signame[$ret & 127] if defined($signame[$ret & 127]);
-	my $ad = "";
-	$ad = "(core dumped)" if (($ret & 128) != 0);
-    Error("bowtie2-align died with signal %d (%s) $ad\n", ($ret & 127), $signm);
-	exit 1;
-} elsif($ret != 0) {
-	Error("bowtie2-align exited with value %d\n", ($ret >> 8));
-}
-exit ($ret >> 8);
diff --git a/src/resources/bowtie-bin/linux/bowtie2-align-l b/src/resources/bowtie-bin/linux/bowtie2-align-l
deleted file mode 100755
index 8e1d502..0000000
Binary files a/src/resources/bowtie-bin/linux/bowtie2-align-l and /dev/null differ
diff --git a/src/resources/bowtie-bin/linux/bowtie2-align-s b/src/resources/bowtie-bin/linux/bowtie2-align-s
deleted file mode 100755
index f25cbb2..0000000
Binary files a/src/resources/bowtie-bin/linux/bowtie2-align-s and /dev/null differ
diff --git a/src/resources/bowtie-bin/linux/bowtie2-build b/src/resources/bowtie-bin/linux/bowtie2-build
deleted file mode 100755
index d448e2b..0000000
--- a/src/resources/bowtie-bin/linux/bowtie2-build
+++ /dev/null
@@ -1,98 +0,0 @@
-#!/usr/bin/env python
-
-"""
- Copyright 2014, Ben Langmead <langmea at cs.jhu.edu>
-
- This file is part of Bowtie 2.
-
- Bowtie 2 is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- Bowtie 2 is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Bowtie 2.  If not, see <http://www.gnu.org/licenses/>.
-"""
-
-
-import os
-import sys
-import inspect
-import logging
-
-
-def build_args():
-    """
-    Parse the wrapper arguments. Returns the options,<programm arguments> tuple.
-    """
-
-    parsed_args = {}
-    to_remove = []
-    argv = sys.argv[:]
-    for i, arg in enumerate(argv):
-        if arg == '--large-index':
-            parsed_args[arg] = ""
-            to_remove.append(i)
-        elif arg == '--debug':
-            parsed_args[arg] = ""
-            to_remove.append(i)
-        elif arg == '--verbose':
-            parsed_args[arg] = ""
-            to_remove.append(i)
-
-    for i in reversed(to_remove):
-        del argv[i]
-
-    return parsed_args, argv
-
-
-def main():
-    logging.basicConfig(level=logging.ERROR,
-                        format='%(levelname)s: %(message)s'
-                        )
-    delta               = 200
-    small_index_max_size= 4 * 1024**3 - delta
-    build_bin_name      = "bowtie2-build"
-    build_bin_s         = "bowtie2-build-s"
-    build_bin_l         = "bowtie2-build-l"
-    curr_script         = os.path.realpath(inspect.getsourcefile(main))
-    ex_path             = os.path.dirname(curr_script)
-    build_bin_spec      = os.path.join(ex_path,build_bin_s)
-
-    options, argv = build_args()
-
-    if '--verbose' in options:
-        logging.getLogger().setLevel(logging.INFO)
-        
-    if '--debug' in options:
-        build_bin_spec += '-debug'
-        build_bin_l += '-debug'
-
-    if '--large-index' in options:
-        build_bin_spec = os.path.join(ex_path,build_bin_l)
-    elif len(argv) >= 2:
-        ref_fnames = argv[-2]
-        tot_size = 0
-        for fn in ref_fnames.split(','):
-            if os.path.exists(fn):
-                statinfo = os.stat(fn)
-                tot_size += statinfo.st_size
-        if tot_size > small_index_max_size:
-            build_bin_spec = os.path.join(ex_path,build_bin_l)
-
-    argv[0] = build_bin_name
-    argv.insert(1, 'basic-0')
-    argv.insert(1, '--wrapper')
-    logging.info('Command: %s %s' % (build_bin_spec, ' '.join(argv[1:])))
-    os.execv(build_bin_spec, argv)
-
-if __name__ == "__main__":
-    main()
-
-
-
diff --git a/src/resources/bowtie-bin/linux/bowtie2-build-l b/src/resources/bowtie-bin/linux/bowtie2-build-l
deleted file mode 100755
index 69aa226..0000000
Binary files a/src/resources/bowtie-bin/linux/bowtie2-build-l and /dev/null differ
diff --git a/src/resources/bowtie-bin/linux/bowtie2-build-s b/src/resources/bowtie-bin/linux/bowtie2-build-s
deleted file mode 100755
index dc95cc9..0000000
Binary files a/src/resources/bowtie-bin/linux/bowtie2-build-s and /dev/null differ
diff --git a/src/resources/bowtie-bin/mac/bowtie2 b/src/resources/bowtie-bin/mac/bowtie2
deleted file mode 100644
index 497a851..0000000
--- a/src/resources/bowtie-bin/mac/bowtie2
+++ /dev/null
@@ -1,583 +0,0 @@
-#!/usr/bin/env perl
-
-#
-# Copyright 2011, Ben Langmead <langmea at cs.jhu.edu>
-#
-# This file is part of Bowtie 2.
-#
-# Bowtie 2 is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Bowtie 2 is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Bowtie 2.  If not, see <http://www.gnu.org/licenses/>.
-#
-
-# bowtie2:
-#
-# A wrapper script for bowtie2.  Provides various advantages over running
-# bowtie2 directly, including:
-#
-# 1. Handling compressed inputs
-# 2. Redirecting output to various files
-# 3. Output directly to bam (not currently supported)
-
-use strict;
-use warnings;
-use Getopt::Long qw(GetOptions);
-use File::Spec;
-use POSIX;
-
-
-my ($vol,$script_path,$prog);
-$prog = File::Spec->rel2abs( __FILE__ );
-
-while (-f $prog && -l $prog){
-    my (undef, $dir, undef) = File::Spec->splitpath($prog);
-    $prog = File::Spec->rel2abs(readlink($prog), $dir);
-}
-
-($vol,$script_path,$prog) 
-                = File::Spec->splitpath($prog);
-my $os_is_nix   = ($^O eq "linux") || ($^O eq "darwin");
-my $align_bin_s = $os_is_nix ? 'bowtie2-align-s' : 'bowtie2-align-s.exe'; 
-my $build_bin   = $os_is_nix ? 'bowtie2-build' : 'bowtie2-build.exe';               
-my $align_bin_l = $os_is_nix ? 'bowtie2-align-l' : 'bowtie2-align-l.exe'; 
-my $align_prog_s= File::Spec->catpath($vol,$script_path,$align_bin_s);
-my $align_prog_l= File::Spec->catpath($vol,$script_path,$align_bin_l);
-my $align_prog  = $align_prog_s;
-my $idx_ext_l     = 'bt2l'; 
-my $idx_ext_s     = 'bt2'; 
-my $idx_ext       = $idx_ext_s; 
-my %signo       = ();
-my @signame     = ();
-
-{
-	# Get signal info
-	use Config;
-	my $i = 0;
-	for my $name (split(' ', $Config{sig_name})) {
-		$signo{$name} = $i;
-		$signame[$i] = $name;
-		$i++;
-	}
-}
-
-(-x "$align_prog") ||
-	Fail("Expected bowtie2 to be in same directory with bowtie2-align:\n$script_path\n");
-
-# Get description of arguments from Bowtie 2 so that we can distinguish Bowtie
-# 2 args from wrapper args
-sub getBt2Desc($) {
-	my $d = shift;
-	my $cmd = "$align_prog --wrapper basic-0 --arg-desc";
-	open(my $fh, "$cmd |") || Fail("Failed to run command '$cmd'\n");
-	while(readline $fh) {
-		chomp;
-		next if /^\s*$/;
-		my @ts = split(/\t/);
-		$d->{$ts[0]} = $ts[1];
-	}
-	close($fh);
-	$? == 0 || Fail("Description of arguments failed!\n");
-}
-
-my %desc = ();
-my %wrapped = ("1" => 1, "2" => 1);
-getBt2Desc(\%desc);
-
-# Given an option like -1, determine whether it's wrapped (i.e. should be
-# handled by this script rather than being passed along to Bowtie 2)
-sub isWrapped($) { return defined($wrapped{$_[0]}); }
-
-my @orig_argv = @ARGV;
-
-my @bt2w_args = (); # options for wrapper
-my @bt2_args  = (); # options for Bowtie 2
-my $saw_dd = 0;
-for(0..$#ARGV) {
-	if($ARGV[$_] eq "--") {
-		$saw_dd = 1;
-		next;
-	}
-	push @bt2w_args, $ARGV[$_] if !$saw_dd;
-	push @bt2_args,  $ARGV[$_] if  $saw_dd;
-}
-if(!$saw_dd) {
-	@bt2_args = @bt2w_args;
-	@bt2w_args= ();
-}
-
-my $debug = 0;
-my %read_fns = ();
-my %read_compress = ();
-my $cap_out = undef;       # Filename for passthrough
-my $no_unal = 0;
-my $large_idx = 0;
-# Remove whitespace
-for my $i (0..$#bt2_args) {
-	$bt2_args[$i]=~ s/^\s+//; $bt2_args[$i] =~ s/\s+$//;
-}
-
-# We've handled arguments that the user has explicitly directed either to the
-# wrapper or to bowtie2, now we capture some of the bowtie2 arguments that
-# ought to be handled in the wrapper
-for(my $i = 0; $i < scalar(@bt2_args); $i++) {
-	next unless defined($bt2_args[$i]);
-	my $arg = $bt2_args[$i];
-	my @args = split(/=/, $arg);
-	if(scalar(@args) > 2) {
-		$args[1] = join("=", @args[1..$#args]);
-	}
-	$arg = $args[0];
-	if($arg eq "-U" || $arg eq "--unpaired") {
-		$bt2_args[$i] = undef;
-		$arg =~ s/^-U//; $arg =~ s/^--unpaired//;
-		if($arg ne "") {
-			# Argument was part of this token
-			my @args = split(/,/, $arg);
-			for my $a (@args) { push @bt2w_args, ("-U", $a); }
-		} else {
-			# Argument is in the next token
-			$i < scalar(@bt2_args)-1 || Fail("Argument expected in next token!\n");
-			$i++;
-			my @args = split(/,/, $bt2_args[$i]);
-			for my $a (@args) { push @bt2w_args, ("-U", $a); }
-			$bt2_args[$i] = undef;
-		}
-	}
-	if($arg =~ /^--?([12])/ && $arg !~ /^--?12/) {
-		my $mate = $1;
-		$bt2_args[$i] = undef;
-		$arg =~ s/^--?[12]//;
-		if($arg ne "") {
-			# Argument was part of this token
-			my @args = split(/,/, $arg);
-			for my $a (@args) { push @bt2w_args, ("-$mate", $a); }
-		} else {
-			# Argument is in the next token
-			$i < scalar(@bt2_args)-1 || Fail("Argument expected in next token!\n");
-			$i++;
-			my @args = split(/,/, $bt2_args[$i]);
-			for my $a (@args) { push @bt2w_args, ("-$mate", $a); }
-			$bt2_args[$i] = undef;
-		}
-	}
-	if($arg eq "--debug") {
-		$debug = 1;
-		$bt2_args[$i] = undef;
-	}
-	if($arg eq "--no-unal") {
-		$no_unal = 1;
-		$bt2_args[$i] = undef;
-	}
-	if($arg eq "--large-index") {
-		$large_idx = 1;
-		$bt2_args[$i] = undef;
-	}
-	for my $rarg ("un-conc", "al-conc", "un", "al") {
-		if($arg =~ /^--${rarg}$/ || $arg =~ /^--${rarg}-gz$/ || $arg =~ /^--${rarg}-bz2$/) {
-			$bt2_args[$i] = undef;
-			if(scalar(@args) > 1 && $args[1] ne "") {
-				$read_fns{$rarg} = $args[1];
-			} else {
-				$i < scalar(@bt2_args)-1 || Fail("--${rarg}* option takes an argument.\n");
-				$read_fns{$rarg} = $bt2_args[$i+1];
-				$bt2_args[$i+1] = undef;
-			}
-			$read_compress{$rarg} = "";
-			$read_compress{$rarg} = "gzip"  if $arg eq "--${rarg}-gz";
-			$read_compress{$rarg} = "bzip2" if $arg eq "--${rarg}-bz2";
-			last;
-		}
-	}
-}
-# If the user asked us to redirect some reads to files, or to suppress
-# unaligned reads, then we need to capture the output from Bowtie 2 and pass it
-# through this wrapper.
-my $passthru = 0;
-if(scalar(keys %read_fns) > 0 || $no_unal) {
-	$passthru = 1;
-	push @bt2_args, "--passthrough";
-	$cap_out = "-";
-	for(my $i = 0; $i < scalar(@bt2_args); $i++) {
-		next unless defined($bt2_args[$i]);
-		my $arg = $bt2_args[$i];
-		if($arg eq "-S" || $arg eq "--output") {
-			$i < scalar(@bt2_args)-1 || Fail("-S/--output takes an argument.\n");
-			$cap_out = $bt2_args[$i+1];
-			$bt2_args[$i] = undef;
-			$bt2_args[$i+1] = undef;
-		}
-	}
-}
-my @tmp = ();
-for (@bt2_args) { push(@tmp, $_) if defined($_); }
- at bt2_args = @tmp;
-
-my @unps = ();
-my @mate1s = ();
-my @mate2s = ();
-my @to_delete = ();
-my $temp_dir = "/tmp";
-my $bam_out = 0;
-my $ref_str = undef;
-my $no_pipes = 0;
-my $keep = 0;
-my $verbose = 0;
-my $readpipe = undef;
-my $log_fName = undef;
-my $help = 0;
-
-my @bt2w_args_cp = (@bt2w_args>0) ? @bt2w_args : @bt2_args;
-Getopt::Long::Configure("pass_through","no_ignore_case");
-
-my @old_ARGV = @ARGV;
- at ARGV = @bt2w_args_cp;
-
-GetOptions(
-	"1=s"                           => \@mate1s,
-	"2=s"                           => \@mate2s,
-	"reads|U=s"                     => \@unps,
-	"temp-directory=s"              => \$temp_dir,
-	"bam"                           => \$bam_out,
-	"no-named-pipes"                => \$no_pipes,
-	"ref-string|reference-string=s" => \$ref_str,
-	"keep"                          => \$keep,
-	"verbose"                       => \$verbose,
-	"log-file=s"                    => \$log_fName,
-	"help|h"                        => \$help
-);
-
- at ARGV = @old_ARGV;
-
-my $old_stderr;
-
-if ($log_fName) {
-    open($old_stderr, ">&STDERR") or Fail("Cannot dup STDERR!\n");
-    open(STDERR, ">", $log_fName) or Fail("Cannot redirect to log file $log_fName.\n");
-}
-
-Info("Before arg handling:\n");
-Info("  Wrapper args:\n[ @bt2w_args ]\n");
-Info("  Binary args:\n[ @bt2_args ]\n");
-
-sub cat_file($$) {
-	my ($ifn, $ofh) = @_;
-	my $ifh = undef;
-	if($ifn =~ /\.gz$/) {
-		open($ifh, "gzip -dc $ifn |") ||
-			 Fail("Could not open gzipped read file: $ifn \n");
-	} elsif($ifn =~ /\.bz2/) {
-		open($ifh, "bzip2 -dc $ifn |") ||
-			Fail("Could not open bzip2ed read file: $ifn \n");
-	} else {
-		open($ifh, $ifn) || Fail("Could not open read file: $ifn \n");
-	}
-	while(readline $ifh) { print {$ofh} $_; }
-	close($ifh);
-}
-
-# Return non-zero if and only if the input should be wrapped (i.e. because
-# it's compressed).
-sub wrapInput($$$) {
-	my ($unps, $mate1s, $mate2s) = @_;
-	for my $fn (@$unps, @$mate1s, @$mate2s) {
-		return 1 if $fn =~ /\.gz$/ || $fn =~ /\.bz2$/;
-	}
-	return 0;
-}
-
-sub Info {
-    if ($verbose) {
-        print STDERR "(INFO): " , at _;
-    }
-}
-
-sub Error {
-    my @msg = @_;
-    $msg[0] = "(ERR): ".$msg[0];
-    printf STDERR @msg;
-}
-
-sub Fail {
-    Error(@_);
-    die("Exiting now ...\n");    
-}
-
-sub Extract_IndexName_From {
-    my $index_opt = $ref_str ? '--index' : '-x';
-    for (my $i=0; $i<@_; $i++) {
-        if ($_[$i] eq $index_opt){
-            return $_[$i+1];
-        }
-    }
-    Info("Cannot find any index option (--reference-string, --ref-string or -x) in the given command line.\n");    
-}
-
-if(wrapInput(\@unps, \@mate1s, \@mate2s)) {
-	if(scalar(@mate2s) > 0) {
-		#
-		# Wrap paired-end inputs
-		#
-		# Put reads into temporary files or fork off processes to feed named pipes
-		scalar(@mate2s) == scalar(@mate1s) ||
-			Fail("Different number of files specified with --reads/-1 as with -2\n");
-		# Make a named pipe for delivering mate #1s
-		my $m1fn = "$temp_dir/$$.inpipe1";
-		push @to_delete, $m1fn;
-		push @bt2_args, "-1 $m1fn";
-		# Create named pipe 1 for writing
-		if(!$no_pipes) {
-			mkfifo($m1fn, 0700) || Fail("mkfifo($m1fn) failed.\n");
-		}
-		my $pid = 0;
-		$pid = fork() unless $no_pipes;
-		if($pid == 0) {
-			# Open named pipe 1 for writing
-			open(my $ofh, ">$m1fn") || Fail("Can't open '$m1fn' for writing\n");
-			for my $ifn (@mate1s) { cat_file($ifn, $ofh); }
-			close($ofh);
-			exit 0 unless $no_pipes;
-		}
-		# Make a named pipe for delivering mate #2s
-		my $m2fn = "$temp_dir/$$.inpipe2";
-		push @to_delete, $m2fn;
-		push @bt2_args, "-2 $m2fn";
-		# Create named pipe 2 for writing
-		if(!$no_pipes) {
-			mkfifo($m2fn, 0700) || Fail("mkfifo($m2fn) failed.\n");
-		}
-		$pid = 0;
-		$pid = fork() unless $no_pipes;
-		if($pid == 0) {
-			# Open named pipe 2 for writing
-			open(my $ofh, ">$m2fn") || Fail("Can't open '$m2fn' for writing.\n");
-			for my $ifn (@mate2s) { cat_file($ifn, $ofh); }
-			close($ofh);
-			exit 0 unless $no_pipes;
-		}
-	}
-	if(scalar(@unps) > 0) {
-		#
-		# Wrap unpaired inputs.
-		#
-		# Make a named pipe for delivering unpaired reads
-		my $ufn = "$temp_dir/$$.unp";
-		push @to_delete, $ufn;
-		push @bt2_args, "-U $ufn";
-		# Create named pipe 2 for writing
-		if(!$no_pipes) {
-			mkfifo($ufn, 0700) || Fail("mkfifo($ufn) failed.\n");
-		}
-		my $pid = 0;
-		$pid = fork() unless $no_pipes;
-		if($pid == 0) {
-			# Open named pipe 2 for writing
-			open(my $ofh, ">$ufn") || Fail("Can't open '$ufn' for writing.\n");
-			for my $ifn (@unps) { cat_file($ifn, $ofh); }
-			close($ofh);
-			exit 0 unless $no_pipes;
-		}
-	}
-} else {
-	if(scalar(@mate2s) > 0) {
-		# Just pass all the mate arguments along to the binary
-		push @bt2_args, ("-1", join(",", @mate1s));
-		push @bt2_args, ("-2", join(",", @mate2s));
-	}
-	if(scalar(@unps) > 0) {
-		push @bt2_args, ("-U", join(",", @unps));
-	}
-}
-
-if(defined($ref_str)) {
-	my $ofn = "$temp_dir/$$.ref_str.fa";
-	open(my $ofh, ">$ofn") ||
-		Fail("could not open temporary fasta file '$ofn' for writing.\n");
-	print {$ofh} ">1\n$ref_str\n";
-	close($ofh);
-	push @to_delete, $ofn;
-	system("$build_bin $ofn $ofn") == 0 ||
-		Fail("bowtie2-build returned non-0 exit level.\n");
-	push @bt2_args, ("--index", "$ofn");
-	push @to_delete, ("$ofn.1.".$idx_ext, "$ofn.2.".$idx_ext, 
-	                  "$ofn.3.".$idx_ext, "$ofn.4.".$idx_ext,
-	                  "$ofn.rev.1.".$idx_ext, "$ofn.rev.2.".$idx_ext);
-}
-
-Info("After arg handling:\n");
-Info("  Binary args:\n[ @bt2_args ]\n");
-
-my $index_name = Extract_IndexName_From(@bt2_args);
-
-if ($large_idx) {
-    Info("Using a large index enforced by user.\n");
-    $align_prog  = $align_prog_l;
-    $idx_ext     = $idx_ext_l;
-    if (not -f $index_name.".1.".$idx_ext_l) {
-        Fail("Cannot find the large index ${index_name}.1.${idx_ext_l}\n");
-    }
-    Info("Using large index (${index_name}.1.${idx_ext_l}).\n");
-}
-else {
-    if ((-f $index_name.".1.".$idx_ext_l) && 
-        (not -f $index_name.".1.".$idx_ext_s)) {
-        Info("Cannot find a small index but a large one seems to be present.\n");
-        Info("Switching to using the large index (${index_name}.1.${idx_ext_l}).\n");
-        $align_prog  = $align_prog_l;
-        $idx_ext     = $idx_ext_l;
-    }
-    else {
-        Info("Using the small index (${index_name}.1.${idx_ext_s}).\n")
-    }
-}
-
-my $debug_str = ($debug ? "-debug" : "");
-
-# Construct command invoking bowtie2-align
-my $cmd = "$align_prog$debug_str --wrapper basic-0 ".join(" ", @bt2_args);
-
-# Possibly add read input on an anonymous pipe
-$cmd = "$readpipe $cmd" if defined($readpipe);
-
-Info("$cmd\n");
-my $ret;
-if(defined($cap_out)) {
-	# Open Bowtie 2 pipe
-	open(BT, "$cmd |") || Fail("Could not open Bowtie 2 pipe: '$cmd |'\n");
-	# Open output pipe
-	my $ofh = *STDOUT;
-	my @fhs_to_close = ();
-	if($cap_out ne "-") {
-		open($ofh, ">$cap_out") ||
-			Fail("Could not open output file '$cap_out' for writing.\n");
-	}
-	my %read_fhs = ();
-	for my $i ("al", "un", "al-conc", "un-conc") {
-		if(defined($read_fns{$i})) {
-            my ($vol, $base_spec_dir, $base_fname) = File::Spec->splitpath($read_fns{$i});
-            if (-d $read_fns{$i}) {
-                $base_spec_dir = $read_fns{$i};
-                $base_fname = undef;
-            }
-			if($i =~ /-conc$/) {
-				# Open 2 output files, one for mate 1, one for mate 2
-				my ($fn1, $fn2);
-                if ($base_fname) {
-                    ($fn1, $fn2) = ($base_fname,$base_fname);
-                }
-                else {
-                    ($fn1, $fn2) = ($i.'-mate',$i.'-mate');
-                }
-				if($fn1 =~ /%/) {
-					$fn1 =~ s/%/1/g; $fn2 =~ s/%/2/g;
-				} elsif($fn1 =~ /\.[^.]*$/) {
-					$fn1 =~ s/\.([^.]*)$/.1.$1/;
-					$fn2 =~ s/\.([^.]*)$/.2.$1/;
-				} else {
-					$fn1 .= ".1";
-					$fn2 .= ".2";
-				}
-                $fn1 = File::Spec->catpath($vol,$base_spec_dir,$fn1);
-                $fn2 = File::Spec->catpath($vol,$base_spec_dir,$fn2);
-				$fn1 ne $fn2 || Fail("$fn1\n$fn2\n");
-				my ($redir1, $redir2) = (">$fn1", ">$fn2");
-				$redir1 = "| gzip -c $redir1"  if $read_compress{$i} eq "gzip";
-				$redir1 = "| bzip2 -c $redir1" if $read_compress{$i} eq "bzip2";
-				$redir2 = "| gzip -c $redir2"  if $read_compress{$i} eq "gzip";
-				$redir2 = "| bzip2 -c $redir2" if $read_compress{$i} eq "bzip2";
-				open($read_fhs{$i}{1}, $redir1) || Fail("Could not open --$i mate-1 output file '$fn1'\n");
-				open($read_fhs{$i}{2}, $redir2) || Fail("Could not open --$i mate-2 output file '$fn2'\n");
-				push @fhs_to_close, $read_fhs{$i}{1};
-				push @fhs_to_close, $read_fhs{$i}{2};
-			} else {
-			    my $redir = ">".File::Spec->catpath($vol,$base_spec_dir,$i."-seqs");
-			    if ($base_fname) {
-				    $redir = ">$read_fns{$i}";
-			    }
-				$redir = "| gzip -c $redir"  if $read_compress{$i} eq "gzip";
-				$redir = "| bzip2 -c $redir" if $read_compress{$i} eq "bzip2";
-				open($read_fhs{$i}, $redir) || Fail("Could not open --$i output file '$read_fns{$i}'\n");
-				push @fhs_to_close, $read_fhs{$i};
-			}
-		}
-	}
-	while(<BT>) {
-		chomp;
-		my $filt = 0;
-		unless(substr($_, 0, 1) eq "@") {
-			# If we are supposed to output certain reads to files...
-			my $tab1_i = index($_, "\t") + 1;
-			my $tab2_i = index($_, "\t", $tab1_i);
-			my $fl = substr($_, $tab1_i, $tab2_i - $tab1_i);
-			my $unal = ($fl & 4) != 0;
-			$filt = 1 if $no_unal && $unal;
-			if($passthru) {
-				if(scalar(keys %read_fhs) == 0) {
-					# Next line is read with some whitespace escaped
-					my $l = <BT>;
-				} else {
-					my $mate1 = (($fl &  64) != 0);
-					my $mate2 = (($fl & 128) != 0);
-					my $unp = !$mate1 && !$mate2;
-					my $pair = !$unp;
-					# Next line is read with some whitespace escaped
-					my $l = <BT>;
-					chomp($l);
-					$l =~ s/%(..)/chr(hex($1))/eg;
-					if((defined($read_fhs{un}) || defined($read_fhs{al})) && $unp) {
-						if($unal) {
-							# Failed to align
-							print {$read_fhs{un}} $l if defined($read_fhs{un});
-						} else {
-							# Aligned
-							print {$read_fhs{al}} $l if defined($read_fhs{al});
-						}
-					}
-					if((defined($read_fhs{"un-conc"}) || defined($read_fhs{"al-conc"})) && $pair) {
-						my $conc  = (($fl &   2) != 0);
-						if     ($conc && $mate1) {
-							print {$read_fhs{"al-conc"}{1}} $l if defined($read_fhs{"al-conc"});
-						} elsif($conc && $mate2) {
-							print {$read_fhs{"al-conc"}{2}} $l if defined($read_fhs{"al-conc"});
-						} elsif(!$conc && $mate1) {
-							print {$read_fhs{"un-conc"}{1}} $l if defined($read_fhs{"un-conc"});
-						} elsif(!$conc && $mate2) {
-							print {$read_fhs{"un-conc"}{2}} $l if defined($read_fhs{"un-conc"});
-						}
-					}
-				}
-			}
-		}
-		print {$ofh} "$_\n" if !$filt;
-	}
-	for my $k (@fhs_to_close) { close($k); }
-	close($ofh);
-	close(BT);
-	$ret = $?;
-} else {
-	$ret = system($cmd);
-}
-if(!$keep) { for(@to_delete) { unlink($_); } }
-
-if ($ret == -1) {
-    Error("Failed to execute bowtie2-align: $!\n");
-	exit 1;
-} elsif ($ret & 127) {
-	my $signm = "(unknown)";
-	$signm = $signame[$ret & 127] if defined($signame[$ret & 127]);
-	my $ad = "";
-	$ad = "(core dumped)" if (($ret & 128) != 0);
-    Error("bowtie2-align died with signal %d (%s) $ad\n", ($ret & 127), $signm);
-	exit 1;
-} elsif($ret != 0) {
-	Error("bowtie2-align exited with value %d\n", ($ret >> 8));
-}
-exit ($ret >> 8);
diff --git a/src/resources/bowtie-bin/mac/bowtie2-align-l b/src/resources/bowtie-bin/mac/bowtie2-align-l
deleted file mode 100644
index 56fd8ce..0000000
Binary files a/src/resources/bowtie-bin/mac/bowtie2-align-l and /dev/null differ
diff --git a/src/resources/bowtie-bin/mac/bowtie2-align-s b/src/resources/bowtie-bin/mac/bowtie2-align-s
deleted file mode 100644
index d18a580..0000000
Binary files a/src/resources/bowtie-bin/mac/bowtie2-align-s and /dev/null differ
diff --git a/src/resources/bowtie-bin/mac/bowtie2-build b/src/resources/bowtie-bin/mac/bowtie2-build
deleted file mode 100644
index d448e2b..0000000
--- a/src/resources/bowtie-bin/mac/bowtie2-build
+++ /dev/null
@@ -1,98 +0,0 @@
-#!/usr/bin/env python
-
-"""
- Copyright 2014, Ben Langmead <langmea at cs.jhu.edu>
-
- This file is part of Bowtie 2.
-
- Bowtie 2 is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- Bowtie 2 is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Bowtie 2.  If not, see <http://www.gnu.org/licenses/>.
-"""
-
-
-import os
-import sys
-import inspect
-import logging
-
-
-def build_args():
-    """
-    Parse the wrapper arguments. Returns the options,<programm arguments> tuple.
-    """
-
-    parsed_args = {}
-    to_remove = []
-    argv = sys.argv[:]
-    for i, arg in enumerate(argv):
-        if arg == '--large-index':
-            parsed_args[arg] = ""
-            to_remove.append(i)
-        elif arg == '--debug':
-            parsed_args[arg] = ""
-            to_remove.append(i)
-        elif arg == '--verbose':
-            parsed_args[arg] = ""
-            to_remove.append(i)
-
-    for i in reversed(to_remove):
-        del argv[i]
-
-    return parsed_args, argv
-
-
-def main():
-    logging.basicConfig(level=logging.ERROR,
-                        format='%(levelname)s: %(message)s'
-                        )
-    delta               = 200
-    small_index_max_size= 4 * 1024**3 - delta
-    build_bin_name      = "bowtie2-build"
-    build_bin_s         = "bowtie2-build-s"
-    build_bin_l         = "bowtie2-build-l"
-    curr_script         = os.path.realpath(inspect.getsourcefile(main))
-    ex_path             = os.path.dirname(curr_script)
-    build_bin_spec      = os.path.join(ex_path,build_bin_s)
-
-    options, argv = build_args()
-
-    if '--verbose' in options:
-        logging.getLogger().setLevel(logging.INFO)
-        
-    if '--debug' in options:
-        build_bin_spec += '-debug'
-        build_bin_l += '-debug'
-
-    if '--large-index' in options:
-        build_bin_spec = os.path.join(ex_path,build_bin_l)
-    elif len(argv) >= 2:
-        ref_fnames = argv[-2]
-        tot_size = 0
-        for fn in ref_fnames.split(','):
-            if os.path.exists(fn):
-                statinfo = os.stat(fn)
-                tot_size += statinfo.st_size
-        if tot_size > small_index_max_size:
-            build_bin_spec = os.path.join(ex_path,build_bin_l)
-
-    argv[0] = build_bin_name
-    argv.insert(1, 'basic-0')
-    argv.insert(1, '--wrapper')
-    logging.info('Command: %s %s' % (build_bin_spec, ' '.join(argv[1:])))
-    os.execv(build_bin_spec, argv)
-
-if __name__ == "__main__":
-    main()
-
-
-
diff --git a/src/resources/bowtie-bin/mac/bowtie2-build-l b/src/resources/bowtie-bin/mac/bowtie2-build-l
deleted file mode 100644
index e56b0b2..0000000
Binary files a/src/resources/bowtie-bin/mac/bowtie2-build-l and /dev/null differ
diff --git a/src/resources/bowtie-bin/mac/bowtie2-build-s b/src/resources/bowtie-bin/mac/bowtie2-build-s
deleted file mode 100644
index 4069452..0000000
Binary files a/src/resources/bowtie-bin/mac/bowtie2-build-s and /dev/null differ
diff --git a/src/resources/bowtie-bin/win-64/bowtie2-align-s.exe b/src/resources/bowtie-bin/win-64/bowtie2-align-s.exe
deleted file mode 100644
index f68f377..0000000
Binary files a/src/resources/bowtie-bin/win-64/bowtie2-align-s.exe and /dev/null differ
diff --git a/src/resources/bowtie-bin/win-64/bowtie2-build-s.exe b/src/resources/bowtie-bin/win-64/bowtie2-build-s.exe
deleted file mode 100644
index 8d41f75..0000000
Binary files a/src/resources/bowtie-bin/win-64/bowtie2-build-s.exe and /dev/null differ
diff --git a/src/resources/bwa-0.7.5a.tar.bz2 b/src/resources/bwa-0.7.5a.tar.bz2
deleted file mode 100644
index d3565fb..0000000
Binary files a/src/resources/bwa-0.7.5a.tar.bz2 and /dev/null differ
diff --git a/src/resources/done.gif b/src/resources/done.gif
deleted file mode 100644
index 0319e6f..0000000
Binary files a/src/resources/done.gif and /dev/null differ
diff --git a/src/resources/info.png b/src/resources/info.png
deleted file mode 100644
index b98377a..0000000
Binary files a/src/resources/info.png and /dev/null differ
diff --git a/src/resources/install-bwa-redhat.sh b/src/resources/install-bwa-redhat.sh
deleted file mode 100644
index 260a147..0000000
--- a/src/resources/install-bwa-redhat.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#SCRIPT=$(readlink -f "$0")
-#SCRIPT_PATH=$(dirname "$SCRIPT")
-#echo $SCRIPT_PATH
-
-if [ "$UID" -ne 0 ]; then
-    echo "You must be root to run this script"
-    exit 1
-fi
-
-# If we're here, we're supposed to have access. Copy the files over
-
-if [ ! -d "/usr/lib/bwa" ]; then
-	# Control will enter here if $DIRECTORY doesn't exist.
-	mkdir /usr/lib/bwa
-fi
-
-if [ -d "/usr/lib/bwa/bwa-0.7.5a.tar.bz2" ]; then
-	rm /usr/lib/bwa/bwa-0.7.5a.tar.bz2
-fi
-
-cp bwa-0.7.5a.tar.bz2 /usr/lib/bwa/
-cd /usr/lib/bwa
-tar -jxf bwa-0.7.5a.tar.bz2
-
-cd bwa-0.7.5a
-make clean
-make
-
-/usr/sbin/alternatives --install /usr/bin/bwa bwa /usr/lib/bwa/bwa-0.7.5a/bwa 20000
-
-
-echo 'BWA program got installed'
-
-exit 0
-
-#/usr/sbin/alternatives --install /usr/bin/bwa 
diff --git a/src/resources/install-bwa-ubuntu.sh b/src/resources/install-bwa-ubuntu.sh
deleted file mode 100644
index 0f5fbce..0000000
--- a/src/resources/install-bwa-ubuntu.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#SCRIPT=$(readlink -f "$0")
-#SCRIPT_PATH=$(dirname "$SCRIPT")
-#echo $SCRIPT_PATH
-
-if [ "$UID" -ne 0 ]; then
-    echo "You must be root to run this script"
-    exit 1
-fi
-
-# If we're here, we're supposed to have access. Copy the files over
-
-apt-get install zlib1g-dev
-
-if [ ! -d "/usr/lib/bwa" ]; then
-	# Control will enter here if $DIRECTORY doesn't exist.
-	mkdir /usr/lib/bwa
-fi
-
-if [ -d "/usr/lib/bwa/bwa-0.7.5a.tar.bz2" ]; then
-	rm /usr/lib/bwa/bwa-0.7.5a.tar.bz2
-fi
-
-cp bwa-0.7.5a.tar.bz2 /usr/lib/bwa/
-cd /usr/lib/bwa
-tar -jxf bwa-0.7.5a.tar.bz2
-
-cd bwa-0.7.5a
-make clean
-make
-
-update-alternatives --install /usr/bin/bwa bwa /usr/lib/bwa/bwa-0.7.5a/bwa 1
-
-
-echo 'BWA program got installed'
-
-exit 0
-
-#/usr/sbin/alternatives --install /usr/bin/bwa 
diff --git a/src/resources/legaldisclaimer.png b/src/resources/legaldisclaimer.png
deleted file mode 100644
index e30d519..0000000
Binary files a/src/resources/legaldisclaimer.png and /dev/null differ
diff --git a/src/resources/load.gif b/src/resources/load.gif
deleted file mode 100644
index 5b33f7e..0000000
Binary files a/src/resources/load.gif and /dev/null differ

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/tn-seqexplorer.git



More information about the debian-med-commit mailing list