Skip to content

Commit 314123b

Browse files
committed
SWIPE 2.1.1: Fix for very long header strings in databases
1 parent 5f894bf commit 314123b

File tree

4 files changed

+31
-6
lines changed

4 files changed

+31
-6
lines changed

CHANGES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2021-06-28 Torbjorn Rognes <torognes@ifi.uio.no>
2+
* Version 2.1.1
3+
* Fix for very long header strings in NCBI database files
4+
15
2018-05-04 Torbjorn Rognes <torognes@ifi.uio.no>
26
* Version 2.1.0
37
* Fix for changes to NCBI database format

README

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
SWIPE
22
Smith-Waterman database searches with Inter-sequence Parallel Execution
33

4-
Copyright (C) 2008-2014 Torbjorn Rognes, University of Oslo,
4+
Copyright (C) 2008-2021 Torbjorn Rognes, University of Oslo,
55
Oslo University Hospital and Sencel Bioinformatics AS
66

77
This program is free software: you can redistribute it and/or modify
@@ -105,7 +105,8 @@ specified organisms.
105105
SWIPE accepts only databases prepared using the formatdb or makeblastdb
106106
tools that are distributed together with NCBI BLAST and BLAST+. They
107107
can be downloaded at ftp://ftp.ncbi.nlm.nih.gov/blast/executables/
108-
from NCBI.
108+
from NCBI. For makeblastdb, please use the "-blastdb_version 4" option
109+
to make databases that are compatible with SWIPE.
109110

110111
The SWIPE distribution includes executable binaries for 64-bit Linux and
111112
Mac. SWIPE may be compiled from sources using either the GNU g++ compiler,

asnparse.cc

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
SWIPE
33
Smith-Waterman database searches with Inter-sequence Parallel Execution
44
5-
Copyright (C) 2008-2013 Torbjorn Rognes, University of Oslo,
5+
Copyright (C) 2008-2021 Torbjorn Rognes, University of Oslo,
66
Oslo University Hospital and Sencel Bioinformatics AS
77
88
This program is free software: you can redistribute it and/or modify
@@ -194,7 +194,27 @@ void parse_visiblestring(apt p)
194194
length = (length << 8) | p->ch;
195195
nextch(p);
196196
}
197-
else if (p->len > 0x82)
197+
else if (p->len == 0x83)
198+
{
199+
length = p->ch;
200+
nextch(p);
201+
length = (length << 8) | p->ch;
202+
nextch(p);
203+
length = (length << 8) | p->ch;
204+
nextch(p);
205+
}
206+
else if (p->len == 0x84)
207+
{
208+
length = p->ch;
209+
nextch(p);
210+
length = (length << 8) | p->ch;
211+
nextch(p);
212+
length = (length << 8) | p->ch;
213+
nextch(p);
214+
length = (length << 8) | p->ch;
215+
nextch(p);
216+
}
217+
else if (p->len > 0x84)
198218
{
199219
fprintf(stderr, "Error: illegal string length (%02x).\n", p->len);
200220
fatal("Error parsing binary ASN.1 in database sequence definition.");

swipe.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
SWIPE
33
Smith-Waterman database searches with Inter-sequence Parallel Execution
44
5-
Copyright (C) 2008-2014 Torbjorn Rognes, University of Oslo,
5+
Copyright (C) 2008-2021 Torbjorn Rognes, University of Oslo,
66
Oslo University Hospital and Sencel Bioinformatics AS
77
88
This program is free software: you can redistribute it and/or modify
@@ -55,7 +55,7 @@
5555
#define LINE_MAX 2048
5656
#endif
5757

58-
#define SWIPE_VERSION "2.1.0"
58+
#define SWIPE_VERSION "2.1.1"
5959

6060
// Should be 32bits integer
6161
typedef unsigned int UINT32;

0 commit comments

Comments
 (0)