[med-svn] [Git][med-team/vsearch][upstream] New upstream version 2.30.2
Étienne Mollier (@emollier)
gitlab at salsa.debian.org
Sat Jan 3 14:00:37 GMT 2026
Étienne Mollier pushed to branch upstream at Debian Med / vsearch
Commits:
d5290bc8 by Étienne Mollier at 2026-01-03T14:50:48+01:00
New upstream version 2.30.2
- - - - -
5 changed files:
- README.md
- configure.ac
- man/vsearch.1
- src/derep.cc
- src/udb.cc
Changes:
=====================================
README.md
=====================================
@@ -39,7 +39,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 [online documentation](https://torognes.github.io/vsearch/), or in the [manpage](https://github.com/torognes/vsearch/releases/download/v2.30.1/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 [online documentation](https://torognes.github.io/vsearch/), or in the [manpage](https://github.com/torognes/vsearch/releases/download/v2.30.2/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
@@ -52,9 +52,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.30.1.tar.gz
-tar xzf v2.30.1.tar.gz
-cd vsearch-2.30.1
+wget https://github.com/torognes/vsearch/archive/v2.30.2.tar.gz
+tar xzf v2.30.2.tar.gz
+cd vsearch-2.30.2
./autogen.sh
./configure CFLAGS="-O2" CXXFLAGS="-O2"
make ARFLAGS="cr"
@@ -91,7 +91,7 @@ wget https://github.com/torognes/vsearch/releases/download/v{VERSION}/vsearch-{V
tar xzf vsearch-{VERSION}-{OS}-{ARCH}.tar.gz
```
-Replace `{VERSION}` with the VSEARCH version number (e.g. `2.30.1`), `{OS}` with the target operating system (`linux` or `macos`), and `{ARCH}` with the architecture (`x86_64`, `aarch64`, `ppc64le`, `riscv64`, or `mips64el`). You could add `-static` after `{ARCH}` to get a statically compiled version for Linux (except x86_64). The name of the binary for the RHEL 7 and CentOS 7 Linux distributions ends in `-ubi7`.
+Replace `{VERSION}` with the VSEARCH version number (e.g. `2.30.2`), `{OS}` with the target operating system (`linux` or `macos`), and `{ARCH}` with the architecture (`x86_64`, `aarch64`, `ppc64le`, `riscv64`, or `mips64el`). You could add `-static` after `{ARCH}` to get a statically compiled version for Linux (except x86_64). The name of the binary for the RHEL 7 and CentOS 7 Linux distributions ends in `-ubi7`.
Or, if you are using Windows, download and extract (unzip) the contents of this file:
@@ -115,7 +115,7 @@ and `zlib1.dll` files required for reading compressed input
files. These DLL's have been obtained for mingw-w64 from the MSYS2
platform.
-**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.30.1/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.30.1/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.30.2/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.30.2/vsearch_manual.pdf)) is also attached to the latest [release](https://github.com/torognes/vsearch/releases).
## Packages, plugins, and wrappers
=====================================
configure.ac
=====================================
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.63])
-AC_INIT([vsearch], [2.30.1], [torognes at ifi.uio.no], [vsearch], [https://github.com/torognes/vsearch])
+AC_INIT([vsearch], [2.30.2], [torognes at ifi.uio.no], [vsearch], [https://github.com/torognes/vsearch])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([subdir-objects])
AC_LANG([C++])
=====================================
man/vsearch.1
=====================================
@@ -1,7 +1,7 @@
.\" import www macros (URL, TAG, MTO)
.mso www.tmac
.\" ============================================================================
-.TH vsearch 1 "October 3, 2025" "version 2.30.1" "USER COMMANDS"
+.TH vsearch 1 "December 12, 2025" "version 2.30.2" "USER COMMANDS"
.\" ============================================================================
.SH NAME
vsearch \(em a versatile open-source tool for microbiome analysis,
@@ -5153,6 +5153,11 @@ improve: extensive test-suites for \-\-fastq_stats and \-\-sff_convert,
.IP -
improve: code coverage of our test-suite
.RE
+.TP
+.BR v2.30.2\~ "released December 12th, 2025"
+This release fixes two minor issues. Allow a UDB file to be written to
+a pipe or stdout (issue #599). Correct computation of median cluster
+size after dereplication (issue #611).
.\" ============================================================================
.\" TODO:
.\"
=====================================
src/derep.cc
=====================================
@@ -113,14 +113,13 @@ namespace {
// refactoring: same as find_median_abundance()
- auto find_median_size(std::vector<struct bucket> const & hashtable) -> double {
+ auto find_median_size(std::vector<struct bucket> const & hashtable, uint64_t num_used) -> double {
static constexpr auto half = 0.5;
- if (hashtable.empty()) {
+ if (num_used == 0) {
return 0.0;
}
- auto const table_size = hashtable.size();
- auto const midpoint = std::ldiv(static_cast<long>(table_size), 2L);
- auto const is_odd = ((table_size % 2) != 0U);
+ auto const midpoint = std::ldiv(static_cast<long>(num_used), 2L);
+ auto const is_odd = ((num_used % 2) != 0U);
if (is_odd) {
// index is zero-based, so if size == 3, midpoint == 1
auto const index = midpoint.quot;
@@ -720,7 +719,7 @@ auto derep(struct Parameters const & parameters, char * input_filename, bool con
show_rusage();
- auto const median = find_median_size(hashtable);
+ auto const median = find_median_size(hashtable, clusters);
average = 1.0 * sumsize / clusters;
=====================================
src/udb.cc
=====================================
@@ -142,18 +142,21 @@ auto largeread(int file_descriptor, void * buf, uint64_t nbyte, uint64_t offset)
}
-auto largewrite(int file_descriptor, void * buf, uint64_t nbyte, uint64_t offset) -> uint64_t
+auto largewrite(int file_descriptor, void * buf, uint64_t nbyte, uint64_t offset, bool seek) -> uint64_t
{
/* call write multiple times and update progress */
auto progress = offset;
for (uint64_t i = 0; i < nbyte; i += blocksize)
{
- auto const res = xlseek(file_descriptor, offset + i, SEEK_SET);
- if (res != offset + i)
- {
- fatal("Unable to seek in UDB file or invalid UDB file");
- }
+ if (seek)
+ {
+ auto const res = xlseek(file_descriptor, offset + i, SEEK_SET);
+ if (res != offset + i)
+ {
+ fatal("Unable to seek in UDB file or invalid UDB file");
+ }
+ }
auto const rem = std::min(blocksize, nbyte - i);
uint64_t const byteswritten = write(file_descriptor, ((char *) buf) + i, rem);
@@ -949,14 +952,14 @@ auto udb_make(struct Parameters const & parameters) -> void
buffer[13] = seqcount; /* number of sequences */
buffer[17] = 0x0000746e; /* alphabet: "nt" */
buffer[49] = 0x55444266; /* fBDU UDBf */
- pos += largewrite(fd_output, buffer.data(), 50 * 4, 0);
+ pos += largewrite(fd_output, buffer.data(), 50 * 4, 0, false);
/* write 4^wordlength uint32_t's with word match counts */
- pos += largewrite(fd_output, kmercount, 4 * kmerhashsize, pos);
+ pos += largewrite(fd_output, kmercount, 4 * kmerhashsize, pos, false);
/* 3BDU */
buffer[0] = 0x55444233; /* 3BDU UDB3 */
- pos += largewrite(fd_output, buffer.data(), 1 * 4, pos);
+ pos += largewrite(fd_output, buffer.data(), 1 * 4, pos, false);
/* lists of sequence no's with matches for all words */
for (auto i = 0U; i < kmerhashsize; i++)
@@ -972,7 +975,7 @@ auto udb_make(struct Parameters const & parameters) -> void
buffer[elements++] = j;
}
}
- pos += largewrite(fd_output, buffer.data(), 4 * elements, pos);
+ pos += largewrite(fd_output, buffer.data(), 4 * elements, pos, false);
}
else
{
@@ -981,7 +984,8 @@ auto udb_make(struct Parameters const & parameters) -> void
pos += largewrite(fd_output,
kmerindex + kmerhash[i],
4 * kmercount[i],
- pos);
+ pos,
+ false);
}
}
}
@@ -1000,7 +1004,7 @@ auto udb_make(struct Parameters const & parameters) -> void
buffer[6] = (unsigned int) (header_characters >> 32U);
/* 0x005e0db4 */
buffer[7] = 0x005e0db4;
- pos += largewrite(fd_output, buffer.data(), 4 * 8, pos);
+ pos += largewrite(fd_output, buffer.data(), 4 * 8, pos, false);
/* indices to headers (uint32_t) */
auto sum = 0U;
@@ -1009,13 +1013,13 @@ auto udb_make(struct Parameters const & parameters) -> void
buffer[i] = sum;
sum += db_getheaderlen(i) + 1;
}
- pos += largewrite(fd_output, buffer.data(), 4 * seqcount, pos);
+ pos += largewrite(fd_output, buffer.data(), 4 * seqcount, pos, false);
/* headers (ascii, zero terminated, not padded) */
for (auto i = 0U; i < seqcount; i++)
{
unsigned int const len = db_getheaderlen(i);
- pos += largewrite(fd_output, db_getheader(i), len + 1, pos);
+ pos += largewrite(fd_output, db_getheader(i), len + 1, pos, false);
}
/* sequence lengths (uint32_t) */
@@ -1023,13 +1027,13 @@ auto udb_make(struct Parameters const & parameters) -> void
{
buffer[i] = db_getsequencelen(i);
}
- pos += largewrite(fd_output, buffer.data(), 4 * seqcount, pos);
+ pos += largewrite(fd_output, buffer.data(), 4 * seqcount, pos, false);
/* sequences (ascii, no term, no pad) */
for (auto i = 0U; i < seqcount; i++)
{
unsigned int const len = db_getsequencelen(i);
- pos += largewrite(fd_output, db_getsequence(i), len, pos);
+ pos += largewrite(fd_output, db_getsequence(i), len, pos, false);
}
if (close(fd_output) != 0)
View it on GitLab: https://salsa.debian.org/med-team/vsearch/-/commit/d5290bc8598a6976574f7025d76a7a258d0a6640
--
View it on GitLab: https://salsa.debian.org/med-team/vsearch/-/commit/d5290bc8598a6976574f7025d76a7a258d0a6640
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20260103/5cdfb459/attachment-0001.htm>
More information about the debian-med-commit
mailing list