Skip to content

Commit

Permalink
VSEARCH 2.10.4: Fixes x86_64 SIMD alignment bug and others
Browse files Browse the repository at this point in the history
  • Loading branch information
torognes committed Jan 4, 2019
1 parent a32173e commit 8e3dd8b
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 25 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VSEARCH: a versatile open source tool for metagenomics

Copyright (C) 2014-2018, Torbjorn Rognes, Frederic Mahe and Tomas Flouri
Copyright (C) 2014-2019, Torbjorn Rognes, Frederic Mahe and Tomas Flouri
All rights reserved.

Contact: Torbjorn Rognes <[email protected]>,
Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Most of the nucleotide based commands and options in USEARCH version 7 are suppo

## Getting Help

If you can't find an answer in the [VSEARCH documentation](https://github.com/torognes/vsearch/releases/download/v2.10.3/vsearch_manual.pdf), please visit the [VSEARCH Web Forum](https://groups.google.com/forum/#!forum/vsearch-forum) to post a question or start a discussion.
If you can't find an answer in the [VSEARCH documentation](https://github.com/torognes/vsearch/releases/download/v2.10.4/vsearch_manual.pdf), please visit the [VSEARCH Web Forum](https://groups.google.com/forum/#!forum/vsearch-forum) to post a question or start a discussion.

## Example

Expand All @@ -37,9 +37,9 @@ In the example below, VSEARCH will identify sequences in the file database.fsa t
**Source distribution** To download the source distribution from a [release](https://github.com/torognes/vsearch/releases) and build the executable and the documentation, use the following commands:

```
wget https://github.com/torognes/vsearch/archive/v2.10.3.tar.gz
tar xzf v2.10.3.tar.gz
cd vsearch-2.10.3
wget https://github.com/torognes/vsearch/archive/v2.10.4.tar.gz
tar xzf v2.10.4.tar.gz
cd vsearch-2.10.4
./autogen.sh
./configure
make
Expand Down Expand Up @@ -68,43 +68,43 @@ Binary distributions are provided for x86-64 systems running GNU/Linux, macOS (v
Download the appropriate executable for your system using the following commands if you are using a Linux x86_64 system:

```sh
wget https://github.com/torognes/vsearch/releases/download/v2.10.3/vsearch-2.10.3-linux-x86_64.tar.gz
tar xzf vsearch-2.10.3-linux-x86_64.tar.gz
wget https://github.com/torognes/vsearch/releases/download/v2.10.4/vsearch-2.10.4-linux-x86_64.tar.gz
tar xzf vsearch-2.10.4-linux-x86_64.tar.gz
```

Or these commands if you are using a Linux ppc64le system:

```sh
wget https://github.com/torognes/vsearch/releases/download/v2.10.3/vsearch-2.10.3-linux-ppc64le.tar.gz
tar xzf vsearch-2.10.3-linux-ppc64le.tar.gz
wget https://github.com/torognes/vsearch/releases/download/v2.10.4/vsearch-2.10.4-linux-ppc64le.tar.gz
tar xzf vsearch-2.10.4-linux-ppc64le.tar.gz
```

Or these commands if you are using a Linux aarch64 system:

```sh
wget https://github.com/torognes/vsearch/releases/download/v2.10.3/vsearch-2.10.3-linux-aarch64.tar.gz
tar xzf vsearch-2.10.3-linux-aarch64.tar.gz
wget https://github.com/torognes/vsearch/releases/download/v2.10.4/vsearch-2.10.4-linux-aarch64.tar.gz
tar xzf vsearch-2.10.4-linux-aarch64.tar.gz
```

Or these commands if you are using a Mac:

```sh
wget https://github.com/torognes/vsearch/releases/download/v2.10.3/vsearch-2.10.3-macos-x86_64.tar.gz
tar xzf vsearch-2.10.3-macos-x86_64.tar.gz
wget https://github.com/torognes/vsearch/releases/download/v2.10.4/vsearch-2.10.4-macos-x86_64.tar.gz
tar xzf vsearch-2.10.4-macos-x86_64.tar.gz
```

Or if you are using Windows, download and extract (unzip) the contents of this file:

```
https://github.com/torognes/vsearch/releases/download/v2.10.3/vsearch-2.10.3-win-x86_64.zip
https://github.com/torognes/vsearch/releases/download/v2.10.4/vsearch-2.10.4-win-x86_64.zip
```

Linux and Mac: You will now have the binary distribution in a folder called `vsearch-2.10.3-linux-x86_64` or `vsearch-2.10.3-macos-x86_64` in which you will find three subfolders `bin`, `man` and `doc`. We recommend making a copy or a symbolic link to the vsearch binary `bin/vsearch` in a folder included in your `$PATH`, and a copy or a symbolic link to the vsearch man page `man/vsearch.1` in a folder included in your `$MANPATH`. The PDF version of the manual is available in `doc/vsearch_manual.pdf`.
Linux and Mac: You will now have the binary distribution in a folder called `vsearch-2.10.4-linux-x86_64` or `vsearch-2.10.4-macos-x86_64` in which you will find three subfolders `bin`, `man` and `doc`. We recommend making a copy or a symbolic link to the vsearch binary `bin/vsearch` in a folder included in your `$PATH`, and a copy or a symbolic link to the vsearch man page `man/vsearch.1` in a folder included in your `$MANPATH`. The PDF version of the manual is available in `doc/vsearch_manual.pdf`.

Windows: You will now have the binary distribution in a folder called `vsearch-2.10.3-win-x86_64`. The vsearch executable is called `vsearch.exe`. The manual in PDF format is called `vsearch_manual.pdf`.
Windows: You will now have the binary distribution in a folder called `vsearch-2.10.4-win-x86_64`. The vsearch executable is called `vsearch.exe`. The manual in PDF format is called `vsearch_manual.pdf`.


**Documentation** The VSEARCH user's manual is available in the `man` folder in the form of a [man page](https://github.com/torognes/vsearch/blob/master/man/vsearch.1). A pdf version ([vsearch_manual.pdf](https://github.com/torognes/vsearch/releases/download/v2.10.3/vsearch_manual.pdf)) will be generated by `make`. To install the manpage manually, copy the `vsearch.1` file or a create a symbolic link to `vsearch.1` in a folder included in your `$MANPATH`. The manual in both formats is also available with the binary distribution. The manual in PDF form ([vsearch_manual.pdf](https://github.com/torognes/vsearch/releases/download/v2.10.3/vsearch_manual.pdf)) is also attached to the latest [release](https://github.com/torognes/vsearch/releases).
**Documentation** The VSEARCH user's manual is available in the `man` folder in the form of a [man page](https://github.com/torognes/vsearch/blob/master/man/vsearch.1). A pdf version ([vsearch_manual.pdf](https://github.com/torognes/vsearch/releases/download/v2.10.4/vsearch_manual.pdf)) will be generated by `make`. To install the manpage manually, copy the `vsearch.1` file or a create a symbolic link to `vsearch.1` in a folder included in your `$MANPATH`. The manual in both formats is also available with the binary distribution. The manual in PDF form ([vsearch_manual.pdf](https://github.com/torognes/vsearch/releases/download/v2.10.4/vsearch_manual.pdf)) is also attached to the latest [release](https://github.com/torognes/vsearch/releases).


## Plugins, packages, and wrappers
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.63])
AC_INIT([vsearch], [2.10.3], [[email protected]])
AC_INIT([vsearch], [2.10.4], [[email protected]])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([subdir-objects])
AC_LANG([C++])
Expand Down
8 changes: 7 additions & 1 deletion man/vsearch.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" ============================================================================
.TH vsearch 1 "December 19, 2018" "version 2.10.3" "USER COMMANDS"
.TH vsearch 1 "January 4, 2019" "version 2.10.4" "USER COMMANDS"
.\" ============================================================================
.SH NAME
vsearch \(em chimera detection, clustering, dereplication and
Expand Down Expand Up @@ -3500,6 +3500,12 @@ Fixed bug in sintax with reversed order of domain and kingdom.
.BR v2.10.3\~ "released December 19th, 2018"
Ported to Linux on ARMv8 (aarch64). Fixed compilation warning with gcc
version 8.1.0 and 8.2.0.
.TP
.BR v2.10.4\~ "released January 4th, 2019"
Fixed serious bug in x86_64 SIMD alignment code introduced in version
2.10.3. Added link to BioConda in README. Fixed bug in fastq_stats
with sequence length 1. Fixed use of equals symbol in UC files for
identical sequences with cluster_fast.
.RE
.LP
.\" ============================================================================
Expand Down
4 changes: 2 additions & 2 deletions src/align_simd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
VSEARCH: a versatile open source tool for metagenomics
Copyright (C) 2014-2018, Torbjorn Rognes, Frederic Mahe and Tomas Flouri
Copyright (C) 2014-2019, Torbjorn Rognes, Frederic Mahe and Tomas Flouri
All rights reserved.
Contact: Torbjorn Rognes <[email protected]>,
Expand Down Expand Up @@ -162,7 +162,7 @@ const uint16x8_t neon_mask =
typedef __m128i VECTOR_SHORT;

#define v_init(a,b,c,d,e,f,g,h) _mm_set_epi16(h,g,f,e,d,c,b,a)
#define v_load(a) _mm_load_si128((VECTOR_SHORT *)a)
#define v_load(a) _mm_load_si128((VECTOR_SHORT *)(a))
#define v_store(a, b) _mm_store_si128((VECTOR_SHORT *)(a), (b))
#define v_merge_lo_16(a, b) _mm_unpacklo_epi16((a),(b))
#define v_merge_hi_16(a, b) _mm_unpackhi_epi16((a),(b))
Expand Down
21 changes: 17 additions & 4 deletions src/results.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
VSEARCH: a versatile open source tool for metagenomics
Copyright (C) 2014-2018, Torbjorn Rognes, Frederic Mahe and Tomas Flouri
Copyright (C) 2014-2019, Torbjorn Rognes, Frederic Mahe and Tomas Flouri
All rights reserved.
Contact: Torbjorn Rognes <[email protected]>,
Expand Down Expand Up @@ -197,15 +197,28 @@ void results_show_uc_one(FILE * fp,
strand: + or -
0
0
compressed alignment, e.g. 9I92M14D, or "=" if prefect alignment
compressed alignment, e.g. 9I92M14D, or "=" if perfect alignment
query label
target label
*/

if (hp)
{
bool perfect = (hp->matches == qseqlen) &&
((uint64_t)(qseqlen) == db_getsequencelen(hp->target));
bool perfect;

if (opt_cluster_fast)
{
/* cluster_fast */
/* use = for identical sequences ignoring terminal gaps */
perfect = (hp->matches == hp->internal_alignmentlength);
}
else
{
/* cluster_size, cluster_smallmem, cluster_unoise */
/* usearch_global, search_exact, allpairs_global */
/* use = for strictly identical sequences */
perfect = (hp->matches == hp->nwalignmentlength);
}

fprintf(fp,
"H\t%d\t%" PRId64 "\t%.1f\t%c\t0\t0\t%s\t%s\t%s\n",
Expand Down

1 comment on commit 8e3dd8b

@torognes
Copy link
Owner Author

@torognes torognes commented on 8e3dd8b Jan 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes #216, #355 and #356.

Please sign in to comment.