[med-svn] [bowtie2] 01/03: Imported Upstream version 2.2.3
Alex Mestiashvili
malex-guest at moszumanska.debian.org
Wed Jun 4 13:57:36 UTC 2014
This is an automated email from the git hooks/post-receive script.
malex-guest pushed a commit to branch master
in repository bowtie2.
commit 51fee9c3169106adf1027edbe3baceb439a1bf0d
Author: Alexandre Mestiashvili <alex at biotec.tu-dresden.de>
Date: Mon Jun 2 16:52:27 2014 +0200
Imported Upstream version 2.2.3
---
NEWS | 7 +++++++
VERSION | 2 +-
bowtie2 | 20 ++++++++++++++++++--
bt2_io.cpp | 8 ++++++--
bt2_search.cpp | 9 +++------
reference.cpp | 2 +-
scripts/debug_wrapper.pl | 21 +++++++++++++++++++++
7 files changed, 57 insertions(+), 12 deletions(-)
diff --git a/NEWS b/NEWS
index 63e5074..f9a7a96 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,13 @@ Please report any issues using the Sourceforge bug tracker:
Version Release History
=======================
+Version 2.2.3 - May 30, 2014
+ * Fixed a bug that made loading an index into memory crash sometimes.
+ * Fixed a silent failure to warn the user in case the -x option is missing.
+ * Updated al, un, al-conc and un-conc options to avoid confusion in cases
+ where the user does not provide a base file name.
+ * Fixed a spurious assert that made bowtie2-inspect debug fail.
+
Version 2.2.2 - April 10, 2014
* Improved performance for cases where the reference contains ambiguous
or masked nucleobases represented by Ns.
diff --git a/VERSION b/VERSION
index b1b25a5..5859406 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.2.2
+2.2.3
diff --git a/bowtie2 b/bowtie2
index 7f3723f..497a851 100755
--- a/bowtie2
+++ b/bowtie2
@@ -462,9 +462,20 @@ if(defined($cap_out)) {
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) = ($read_fns{$i}, $read_fns{$i});
+ 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 =~ /\.[^.]*$/) {
@@ -474,6 +485,8 @@ if(defined($cap_out)) {
$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";
@@ -485,7 +498,10 @@ if(defined($cap_out)) {
push @fhs_to_close, $read_fhs{$i}{1};
push @fhs_to_close, $read_fhs{$i}{2};
} else {
- my $redir = ">$read_fns{$i}";
+ 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");
diff --git a/bt2_io.cpp b/bt2_io.cpp
index 62b37c9..97a31e1 100644
--- a/bt2_io.cpp
+++ b/bt2_io.cpp
@@ -628,8 +628,12 @@ done: // Exit hatch for both justHeader and !justHeader
// Be kind
if(deleteEh) delete eh;
- rewind(_in1);
- rewind(_in2);
+ if(_in1 != NULL) {
+ rewind(_in1);
+ }
+ if(_in2 != NULL) {
+ rewind(_in2);
+ }
}
/**
diff --git a/bt2_search.cpp b/bt2_search.cpp
index e8d1ee5..434efbd 100644
--- a/bt2_search.cpp
+++ b/bt2_search.cpp
@@ -4544,12 +4544,9 @@ int bowtie(int argc, const char **argv) {
// Get index basename (but only if it wasn't specified via --index)
if(bt2index.empty()) {
- if(optind >= argc) {
- cerr << "No index, query, or output file specified!" << endl;
- printUsage(cerr);
- return 1;
- }
- bt2index = argv[optind++];
+ cerr << "No index, query, or output file specified!" << endl;
+ printUsage(cerr);
+ return 1;
}
// Get query filename
diff --git a/reference.cpp b/reference.cpp
index dcb8dd8..bb4ca08 100644
--- a/reference.cpp
+++ b/reference.cpp
@@ -468,7 +468,7 @@ int BitPairReference::getStretch(
bufOff = cumUnambig_[left];
origBufOff = bufOff;
i = left;
- assert_gt(cumRefOff_[i+1], toff);
+ assert(cumRefOff_[i+1] == 0 || cumRefOff_[i+1] > toff);
binarySearched = true;
}
off += recs_[i].off; // skip Ns at beginning of stretch
diff --git a/scripts/debug_wrapper.pl b/scripts/debug_wrapper.pl
new file mode 100755
index 0000000..b970c07
--- /dev/null
+++ b/scripts/debug_wrapper.pl
@@ -0,0 +1,21 @@
+#!/usr/bin/env perl
+use strict;
+use File::Spec;
+use Path::Class;
+
+# A helper for debugging
+my ($vol,$script_path,$prog);
+$prog = File::Spec->rel2abs( __FILE__ );
+($vol,$script_path,$prog) = File::Spec->splitpath($prog);
+my $bw_path = dir(File::Spec->splitdir($script_path))->parent();
+
+my $bw = File::Spec->catpath(
+ $vol,
+ $bw_path,
+ 'bowtie2'
+ );
+
+exec $bw, @ARGV or die ("Fail to exec! $bw\n");
+
+
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/bowtie2.git
More information about the debian-med-commit
mailing list