Giter VIP home page Giter VIP logo

vsearch's Introduction

Build Status

VSEARCH

Introduction

The aim of this project is to create an alternative to the USEARCH tool developed by Robert C. Edgar (2010). The new tool should:

  • have open source code with an appropriate open source license
  • be free of charge, gratis
  • have a 64-bit design that handles very large databases and much more than 4GB of memory
  • be as accurate or more accurate than usearch
  • be as fast or faster than usearch

We have implemented a tool called VSEARCH which supports de novo and reference based chimera detection, clustering, full-length and prefix dereplication, rereplication, reverse complementation, masking, all-vs-all pairwise global alignment, exact and global alignment searching, shuffling, subsampling and sorting. It also supports FASTQ file analysis, filtering, conversion and merging of paired-end reads.

VSEARCH stands for vectorized search, as the tool takes advantage of parallelism in the form of SIMD vectorization as well as multiple threads to perform accurate alignments at high speed. VSEARCH uses an optimal global aligner (full dynamic programming Needleman-Wunsch), in contrast to USEARCH which by default uses a heuristic seed and extend aligner. This usually results in more accurate alignments and overall improved sensitivity (recall) with VSEARCH, especially for alignments with gaps.

VSEARCH binaries are provided for GNU/Linux on three 64-bit processor architectures: x86-64, POWER8 (ppc64le) and ARMv8 (aarch64). Binaries are also provided for MacOS (version 10.9 Mavericks or later) on Intel (x86-64) and Apple Silicon (ARMv8), as well as Windows (64-bit, version 7 or higher, on x86_64). VSEARCH contains dedicated SIMD code for the three processor architectures (SSE2/SSSE3, AltiVec/VMX/VSX, Neon).

CPU \ OS GNU/Linux MacOS Windows
x86_64
ARMv8
POWER8

Various packages, plugins and wrappers are also available from other sources - see below.

The source code compiles correctly with gcc (versions 4.8.5 to 13.0) and llvm-clang (3.8 to 17.0). The source code should also compile on FreeBSD and NetBSD systems.

VSEARCH can directly read input query and database files that are compressed using gzip and bzip2 (.gz and .bz2) if the zlib and bzip2 libraries are available.

Most of the nucleotide based commands and options in USEARCH version 7 are supported, as well as some in version 8. The same option names as in USEARCH version 7 has been used in order to make VSEARCH an almost drop-in replacement. VSEARCH does not support amino acid sequences or local alignments. These features may be added in the future.

Getting Help

If you can't find an answer in the VSEARCH documentation, please visit the VSEARCH Web Forum to post a question or start a discussion.

Example

In the example below, VSEARCH will identify sequences in the file database.fsa that are at least 90% identical on the plus strand to the query sequences in the file queries.fsa and write the results to the file alnout.txt.

./vsearch --usearch_global queries.fsa --db database.fsa --id 0.9 --alnout alnout.txt

Download and install

Source distribution To download the source distribution from a release and build the executable and the documentation, use the following commands:

wget https://github.com/torognes/vsearch/archive/v2.28.1.tar.gz
tar xzf v2.28.1.tar.gz
cd vsearch-2.28.1
./autogen.sh
./configure CFLAGS="-O3" CXXFLAGS="-O3"
make
make install  # as root or sudo make install

You may customize the installation directory using the --prefix=DIR option to configure. If the compression libraries zlib and/or bzip2 are installed on the system, they will be detected automatically and support for compressed files will be included in vsearch. Support for compressed files may be disabled using the --disable-zlib and --disable-bzip2 options to configure. A PDF version of the manual will be created from the vsearch.1 manual file if ps2pdf is available, unless disabled using the --disable-pdfman option to configure. It is recommended to run configure with the options CFLAGS="-O3" and CXXFLAGS="-O3". Other options may also be applied to configure, please run configure -h to see them all. GNU autoconf (version 2.63 or later), automake and the GCC C++ compiler is required to build vsearch. Version 3.82 or later of Make may be required on Linux, while version 3.81 is sufficient on macOS.

The distributed Linux ppc64le and aarch64 binaries were compiled using the C++ cross-compiler. The Windows binary was built using Mingw-w64.

Cloning the repo Instead of downloading the source distribution as a compressed archive, you could clone the repo and build it as shown below. The options to configure as described above are still valid.

git clone https://github.com/torognes/vsearch.git
cd vsearch
./autogen.sh
./configure CFLAGS="-O3" CXXFLAGS="-O3"
make
make install  # as root or sudo make install

Binary distribution Starting with version 1.4.0, binary distribution files containing pre-compiled binaries as well as the documentation will be made available as part of each release. The included executables include support for input files compressed by zlib and bzip2 (with files usually ending in .gz or .bz2).

Binary distributions are provided for x86-64 systems running GNU/Linux, macOS (version 10.7 or higher) or Windows (64-bit, version 7 or higher), 64-bit AMDv8 (aarch64) systems running GNU/Linux or macOS, as well as POWER8 (ppc64le) systems running GNU/Linux.

Download the appropriate executable for your system using the following commands if you are using a Linux x86_64 system:

wget https://github.com/torognes/vsearch/releases/download/v2.28.1/vsearch-2.28.1-linux-x86_64.tar.gz
tar xzf vsearch-2.28.1-linux-x86_64.tar.gz

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

wget https://github.com/torognes/vsearch/releases/download/v2.28.1/vsearch-2.28.1-linux-ppc64le.tar.gz
tar xzf vsearch-2.28.1-linux-ppc64le.tar.gz

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

wget https://github.com/torognes/vsearch/releases/download/v2.28.1/vsearch-2.28.1-linux-aarch64.tar.gz
tar xzf vsearch-2.28.1-linux-aarch64.tar.gz

Or these commands if you are using a Mac with an Apple Silicon CPU:

wget https://github.com/torognes/vsearch/releases/download/v2.28.1/vsearch-2.28.1-macos-aarch64.tar.gz
tar xzf vsearch-2.28.1-macos-aarch64.tar.gz

Or these commands if you are using a Mac with an Intel CPU:

wget https://github.com/torognes/vsearch/releases/download/v2.28.1/vsearch-2.28.1-macos-x86_64.tar.gz
tar xzf vsearch-2.28.1-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.28.1/vsearch-2.28.1-win-x86_64.zip

Linux and Mac: You will now have the binary distribution in a folder called vsearch-2.28.1-linux-x86_64 or vsearch-2.28.1-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. Versions with statically compiled libraries are available for Linux systems. These have "-static" in their name, and could be used on systems that do not have all the necessary libraries installed.

Windows: You will now have the binary distribution in a folder called vsearch-2.28.1-win-x86_64. The vsearch executable is called vsearch.exe. The manual in PDF format is called vsearch_manual.pdf. If you want to be able to call vsearch.exe from any command prompt window, you can put the vsearch executable in a folder (for instance C:\Users\<yourname>\bin), and add the new folder to the user Path: open the Environment Variables window by searching for it in the Start menu, Edit user variables, add ;C:\Users\<yourname>\bin to the end of the Path variable, and save your changes. The windows distribution also includes the libbz2.dll 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. A pdf version (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) is also attached to the latest release.

Packages, plugins, and wrappers

Conda package Thanks to the BioConda team, there is now a vsearch package in Conda.

Debian package Thanks to the Debian Med team, there is now a vsearch package in Debian.

FreeBSD ports package Thanks to Jason Bacon, a vsearch FreeBSD ports package is available. Install the binary package with pkg install vsearch, or build from source with additional optimizations.

Galaxy wrapper Thanks to the work of the Intergalactic Utilities Commission members, vsearch is now part of the Galaxy ToolShed.

Homebrew package Thanks to Torsten Seeman, a vsearch package for Homebrew has been made.

Pkgsrc package Thanks to Jason Bacon, a vsearch pkgsrc package is available for NetBSD and other UNIX-like systems. Install the binary package with pkgin install vsearch, or build from source with additional optimizations.

QIIME 2 plugin Thanks to the QIIME 2 team, there is now a plugin called q2-vsearch for QIIME 2.

Converting output to a biom file for use in QIIME and other software

With the from-uccommand in biom 2.1.5 or later, it is possible to convert data in a .uc file produced by vsearch into a biom file that can be read by QIIME and other software. It is described here.

Please note that vsearch version 2.2.0 and later are able to directly output OTU tables in biom 1.0 format as well as the classic and mothur formats.

Implementation details and initial assessment

Please see the paper for details:

Rognes T, Flouri T, Nichols B, Quince C, Mahé F. (2016) VSEARCH: a versatile open source tool for metagenomics. PeerJ 4:e2584 doi: 10.7717/peerj.2584

Dependencies

When compiling VSEARCH the header files for the following two optional libraries are required if support for gzip and bzip2 compressed FASTA and FASTQ input files is needed:

  • libz (zlib library) (zlib.h header file) (optional)
  • libbz2 (bzip2lib library) (bzlib.h header file) (optional)

VSEARCH will automatically check whether these libraries are available and load them dynamically.

On Windows these libraries are called zlib1.dll and libbz2.dll. These DLL's are included with the released distribution of vsearch 2.28.1 and later.

To create the PDF file with the manual the ps2pdf tool is required. It is part of the ghostscript package.

VSEARCH license and third party licenses

The VSEARCH code is dual-licensed either under the GNU General Public License version 3 or under the BSD 2-clause license. Please see LICENSE.txt for details.

VSEARCH includes code from several other projects. We thank the authors for making their source code available.

VSEARCH includes code from Google's CityHash project by Geoff Pike and Jyrki Alakuijala, providing some excellent hash functions available under a MIT license.

VSEARCH includes code derived from Tatusov and Lipman's DUST program that is in the public domain.

VSEARCH includes public domain code written by Alexander Peslyak for the MD5 message digest algorithm.

VSEARCH includes public domain code written by Steve Reid and others for the SHA1 message digest algorithm.

The VSEARCH distribution includes code from GNU Autoconf which normally is available under the GNU General Public License, but may be distributed with the special autoconf configure script exception.

VSEARCH may include code from the zlib library copyright Jean-loup Gailly and Mark Adler, distributed under the zlib license.

VSEARCH may include code from the bzip2 library copyright Julian R. Seward, distributed under a BSD-style license.

Code

The code is written mostly in C++.

File Description
align.cc New Needleman-Wunsch global alignment, serial. Only for testing.
align_simd.cc SIMD parallel global alignment of 1 query with 8 database sequences
allpairs.cc All-vs-all optimal global pairwise alignment (no heuristics)
arch.cc Architecture specific code (Mac/Linux)
attributes.cc Extraction and printing of attributes in FASTA headers
bitmap.cc Implementation of bitmaps
chimera.cc Chimera detection
city.cc CityHash code
cluster.cc Clustering (cluster_fast and cluster_smallmem)
cpu.cc Code dependent on specific cpu features (e.g. ssse3)
cut.cc Restriction site cutting
db.cc Handles the database file read, access etc
dbhash.cc Database hashing for exact searches
dbindex.cc Indexes the database by identifying unique kmers in the sequences
derep.cc Dereplication
dynlibs.cc Dynamic loading of compression libraries
eestats.cc Produce statistics for fastq_eestats command
fa2fq.cc FASTA to FASTQ conversion
fasta.cc FASTA file parser
fastq.cc FASTQ file parser
fastqjoin.cc FASTQ paired-end reads joining
fastqops.cc FASTQ file statistics etc
fastx.cc Detection of FASTA and FASTQ files, wrapper for FASTA and FASTQ parsers
filter.cc Trimming and filtering of sequences in FASTA and FASTQ files
getseq.cc Extraction of sequences based on header labels
kmerhash.cc Hash for kmers used by paired-end read merger
linmemalign.cc Linear memory global sequence aligner
maps.cc Various character mapping arrays
mask.cc Masking (DUST)
md5.c MD5 message digest
mergepairs.cc Paired-end read merging
minheap.cc A minheap implementation for the list of top kmer matches
msa.cc Simple multiple sequence alignment and consensus sequence computation for clusters
orient.cc Orient direction of sequences based on reference database
otutable.cc Generate OTU tables in various formats
rerep.cc Rereplication
results.cc Output results in various formats (alnout, userout, blast6, uc)
search.cc Implements search using global alignment
searchcore.cc Core search functions for searching, clustering and chimera detection
searchexact.cc Exact search functions
sffconvert.cc SFF to FASTQ file conversion
sha1.c SHA1 message digest
showalign.cc Output an alignment in a human-readable way given a CIGAR-string and the sequences
shuffle.cc Shuffle sequences
sintax.cc Taxonomic classification using Sintax method
sortbylength.cc Code for sorting by length
sortbysize.cc Code for sorting by size (abundance)
subsample.cc Subsampling reads from a FASTA file
tax.cc Taxonomy information parsing
udb.cc UDB database file handling
unique.cc Find unique kmers in a sequence
userfields.cc Code for parsing the userfields option argument
util.cc Various common utility functions
vsearch.cc Main program file, general initialization, reads arguments and parses options, writes info.
xstring.h Code for a simple string class

VSEARCH may be compiled with zlib or bzip2 integration that allows it to read compressed FASTA files. The zlib and the bzip2 libraries are needed for this.

Bugs

All bug reports are highly appreciated. You may submit a bug report here on GitHub as an issue, you could post a message on the VSEARCH Web Forum or you could send an email to [email protected].

Limitations

VSEARCH is designed for rather short sequences, and will be slow when sequences are longer than about 5,000 bp. This is because it always performs optimal global alignment on selected sequences.

The VSEARCH team

The main contributors to VSEARCH:

Acknowledgements

Special thanks to the following people for patches, suggestions, computer access etc:

  • Davide Albanese
  • Colin Brislawn
  • Jeff Epler
  • Christopher M. Sullivan
  • Andreas Tille
  • Sarah Westcott

Citing VSEARCH

Please cite the following publication if you use VSEARCH:

Rognes T, Flouri T, Nichols B, Quince C, Mahé F. (2016) VSEARCH: a versatile open source tool for metagenomics. PeerJ 4:e2584. doi: 10.7717/peerj.2584

Please note that citing any of the underlying algorithms, e.g. UCHIME, may also be appropriate.

Test datasets

Test datasets (found in the separate vsearch-data repository) were obtained from the BioMarks project (Logares et al. 2014), the TARA OCEANS project (Karsenti et al. 2011) and the Protist Ribosomal Reference Database (PR2) (Guillou et al. 2013).

References

  • Edgar RC (2010) Search and clustering orders of magnitude faster than BLAST. Bioinformatics, 26 (19): 2460-2461. doi:10.1093/bioinformatics/btq461

  • Edgar RC (2016) SINTAX: a simple non-Bayesian taxonomy classifier for 16S and ITS sequences. bioRxiv. doi:10.1101/074161

  • Edgar RC (2016) UNOISE2: improved error-correction for Illumina 16S and ITS amplicon sequencing. bioRxiv. doi:10.1101/081257

  • Edgar RC, Flyvbjerg H (2015) Error filtering, pair assembly and error correction for next-generation sequencing reads. Bioinformatics, 31 (21): 3476-3482. doi:10.1093/bioinformatics/btv401

  • Edgar RC, Haas BJ, Clemente JC, Quince C, Knight R (2011) UCHIME improves sensitivity and speed of chimera detection. Bioinformatics, 27 (16): 2194-2200. doi:10.1093/bioinformatics/btr381

  • Guillou L, Bachar D, Audic S, Bass D, Berney C, Bittner L, Boutte C, Burgaud G, de Vargas C, Decelle J, del Campo J, Dolan J, Dunthorn M, Edvardsen B, Holzmann M, Kooistra W, Lara E, Lebescot N, Logares R, Mahé F, Massana R, Montresor M, Morard R, Not F, Pawlowski J, Probert I, Sauvadet A-L, Siano R, Stoeck T, Vaulot D, Zimmermann P & Christen R (2013) The Protist Ribosomal Reference database (PR2): a catalog of unicellular eukaryote Small Sub-Unit rRNA sequences with curated taxonomy. Nucleic Acids Research, 41 (D1), D597-D604. doi:10.1093/nar/gks1160

  • Karsenti E, González Acinas S, Bork P, Bowler C, de Vargas C, Raes J, Sullivan M B, Arendt D, Benzoni F, Claverie J-M, Follows M, Jaillon O, Gorsky G, Hingamp P, Iudicone D, Kandels-Lewis S, Krzic U, Not F, Ogata H, Pesant S, Reynaud E G, Sardet C, Sieracki M E, Speich S, Velayoudon D, Weissenbach J, Wincker P & the Tara Oceans Consortium (2011) A holistic approach to marine eco-systems biology. PLoS Biology, 9(10), e1001177. doi:10.1371/journal.pbio.1001177

  • Logares R, Audic S, Bass D, Bittner L, Boutte C, Christen R, Claverie J-M, Decelle J, Dolan J R, Dunthorn M, Edvardsen B, Gobet A, Kooistra W H C F, Mahé F, Not F, Ogata H, Pawlowski J, Pernice M C, Romac S, Shalchian-Tabrizi K, Simon N, Stoeck T, Santini S, Siano R, Wincker P, Zingone A, Richards T, de Vargas C & Massana R (2014) The patterning of rare and abundant community assemblages in coastal marine-planktonic microbial eukaryotes. Current Biology, 24(8), 813-821. doi:10.1016/j.cub.2014.02.050

  • Rognes T (2011) Faster Smith-Waterman database searches by inter-sequence SIMD parallelisation. BMC Bioinformatics, 12: 221. doi:10.1186/1471-2105-12-221

vsearch's People

Contributors

angrybee avatar colinbrislawn avatar davidealbanese avatar emollier avatar frederic-mahe avatar mys721tx avatar nielsonj avatar peterjc avatar pschloss avatar torognes avatar wasade avatar wwood avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vsearch's Issues

Minor bug in Makefile

After a make, if I want to clean the directory, the make clean command does not remove the object files:

$ make
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o vsearch.o vsearch.cc
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o query.o query.cc
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o db.o db.cc
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o dbindex.o dbindex.cc
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o vsearch_global.o vsearch_global.cc
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o align.o align.cc
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o showalign.o showalign.cc
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o util.o util.cc
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o unique.o unique.cc
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o userfields.o userfields.cc
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o results.o results.cc
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o sortbysize.o sortbysize.cc
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o derep.o derep.cc
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o maps.o maps.cc
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o arch.o arch.cc
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o sortbylength.o sortbylength.cc
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o shuffle.o shuffle.cc
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o align_simd.o align_simd.cc
align_simd.cc: In function ‘void search16(s16info_s*, unsigned int, unsigned int*, CELL*, short unsigned int*, short unsigned int*, short unsigned int*, short unsigned int*, char**)’:
align_simd.cc:730:11: warning: variable ‘QR_query_left’ set but not used [-Wunused-but-set-variable]
   __m128i QR_query_left, R_query_left;
           ^
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o mask.o mask.cc
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o minheap.o minheap.cc
minheap.cc: In function ‘void minheap_test()’:
minheap.cc:210:26: warning: narrowing conversion of ‘random()’ from ‘long int’ to ‘unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
       elem_t x = {random(),0,1};
                          ^
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o bitmap.o bitmap.cc
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o cluster.o cluster.cc
g++ -O3 -msse4.1 -mtune=core2 -Icityhash -Wall    -c -o searchcore.o searchcore.cc
g++  -o vsearch vsearch.o query.o db.o dbindex.o vsearch_global.o align.o showalign.o util.o unique.o userfields.o results.o sortbysize.o derep.o maps.o arch.o sortbylength.o shuffle.o align_simd.o mask.o minheap.o bitmap.o cluster.o searchcore.o cityhash/city.o -lpthread
$ make clean
rm -f *~ *.{o,S,gcda,gcno,gcov} vsearch gmon.out cityhash/*.{o,S,gcda,gcno,gcov}
$ ls *.o
align.o       arch.o    cluster.o  db.o     maps.o  minheap.o  results.o     showalign.o  sortbylength.o  unique.o      util.o            vsearch.o
align_simd.o  bitmap.o  dbindex.o  derep.o  mask.o  query.o    searchcore.o  shuffle.o    sortbysize.o    userfields.o  vsearch_global.o

I tried different modifications of the Makefile, but nothing worked. If I launch the rm command manually, the objects files are deleted as expected. I am using GNU Make 4.0.

That's weird.

Clustering

USEARCH clustering commands:

  • cluster_fast
  • cluster_smallmem
  • cluster_otus

The cluster_otus is a more complex clustering method that involves chimera detection.

Clustering options suggested:

  • --cluster FILENAME
  • --usersort
  • --id 0.97
  • --slots 16769023
  • --sizeout
  • --uc FILENAME
  • --w 64
  • --seedsout FILENAME
  • --maxrejects 500
  • --sizein
  • --log FILENAME

Add support for amino acid sequences

The README says that this "may be added in the future." Any updates on those plans? Would adding AA support be a large undertaking or something as simple as adding a new alphabet and scoring matrix?

Bug in masking

With the latest vsearch version (0.2.0), when masking the vderep.fsa file, the output is empty when using --qmask none or --qmask soft. The output is ok when using --qmask dust:

${VSEARCH} --maskfasta vderep.fsa --output vderep.fsa_masked -qmask soft
wc -l < vderep.fsa_masked

The computation takes a few seconds with dust, but is immediate with none and soft.

Support for long (>15 nt) and gapped seeds

Requires changes to code that identified unique seeds in a sequence. Also the current direct index of kmers to a list of the database sequences where the kmer is present must be changed to a hash table.

When searching a database against itself, sequence labels are not truncated correctly

On a database of sequences with labels structured as such: >sequenceID taxonomy, it seems that the query receives the full fasta header while the target is truncated correctly when using --self. That leads to incorrect results where a query is aligned with itself. The option --selfid yields the correct result (no alignment of a query against itself).

${VSEARCH} \
    --vsearch_global "${SUBJECTS}" \
    --db "${SUBJECTS}" \
    --self \
    --id 0.5 \
    --blast6out results.blast6

head -n 3 results.blast6

chout1 Eukaryota|Alveolata|Dinophyta|Dinophyceae|Suessiales|Suessiaceae|Gymnodinium|simplex|simplex_X   chout1  100.0   162 0   0   1   162 1   162 *   *
chout2 Eukaryota|Alveolata|Dinophyta|Dinophyceae|Suessiales|Suessiaceae|Polarella|glacialis|glacialis_X chout2  100.0   234 0   0   1   234 1   234 *   *
chout20 Eukaryota|Alveolata|Dinophyta|Dinophyceae|Peridiniales|Peridiniales_X|Heterocapsa|sp|sp_X   chout20 100.0   229 0   0   1   229 1   229 *   *


${VSEARCH} \
    --vsearch_global "${SUBJECTS}" \
    --db "${SUBJECTS}" \
    --selfid \
    --id 0.5 \
    --blast6out results.blast6

head -n 3 results.blast6

chout1 Eukaryota|Alveolata|Dinophyta|Dinophyceae|Suessiales|Suessiaceae|Gymnodinium|simplex|simplex_X   chvA18  50.7    148 70  1   1   162 1   148 *   *
chout2 Eukaryota|Alveolata|Dinophyta|Dinophyceae|Suessiales|Suessiaceae|Polarella|glacialis|glacialis_X chout21 63.9    241 58  8   1   234 1   235 *   *
chout20 Eukaryota|Alveolata|Dinophyta|Dinophyceae|Peridiniales|Peridiniales_X|Heterocapsa|sp|sp_X   chout21 89.8    235 17  1   1   229 1   235 *   *

The problem is the same when using -userout filename --userfields query+id+target. The problem disappears when using --notrunclabels.

Write --help to stdout

Please consider making --help write to stdout so that it can be piped to a pager, grep, etc. Thanks!

add usearch's fastq_mergepairs function and options

I had been using a function in usearch to detect overlap of paired-end reads. This used the following options which would be nice to have available in vsearch.

usearch_v.7.0.1090_i86linux32 -fastq_mergepairs read1.fq 
                              -reverse read2.fq
                              -fastq_maxdiffs 6
                              -fastq_truncqual 2 
                              -fastq_minlen 36 
                              -fastq_minmergelen 50 
                              -fastqout merge.fq 
                              -fastq_allowmergestagger

Speed-up searching when using the --top_hits_only option

During a search, the target sequences are sorted by decreasing k-mer composition similarity with the query sequence. The target sequences that are the most likely to get a high similarity score with the query are the first to be treated (i.e. pairwise aligned).

In a taxonomic assignment context (with --maxaccepts 0 --maxrejects 0 --id 0.5), and when using the option --top_hits_only, vsearch ends up comparing all the targets to the query, which is inefficient. The search process could stop once the query-target similarities start to drop. In practice, the algorithm could count the number of blocks (a block contains 16 targets if I am correct) where observed similarities are all lower than the best obtained so far. After two blocks of decreasing similarity values, the search can safely stop and start working on the next query.

Should T and U be considered as identical during dereplication?

When aligning sequences during searching and clustering, T and U are considered identical, regardless of
their case. During dereplication, T and U are treated as different. Should we harmonize that behavior? T and U treated as identical in every situation?

Manuscript

A manuscript describing VSEARCH should be submitted to a preprint journal.

Reference Chimera checking.

Hi,
I'm testing out vsearch where I was using USEARCH. I have used vsearch uchime_denovo with these files and it worked great. I am running into a few problems with the uchime_ref command. My uchime command looked like this:

usearch -uchime_ref derep.fasta  -db custom_nt_database.fasta -chimeras chimeras.fasta -nonchimeras non_chimeras.fasta -uchimeout derep.uchime -log uchime_ref.log --abskew 2 

Which would run fine. I removed the log command as it is not supported in vsearch and ran:

vsearch --uchime_ref derep.fasta  --db custom_nt_database.fasta --chimeras chimeras.fasta --nonchimeras non_chimeras.fasta --uchimeout derep.uchime --abskew 2 

However with vsearch I get an error that I don't understand when I run that command.

Reading file custom_nt_database.fasta 100%  
684514 nt in 1036 seqs, min 204, max 5800, avg 661
WARNING: 47 sequences longer than 50000 nucleotides discarded.
Indexing sequences 100%  
Counting unique k-mers 100%  
Creating index of unique k-mers 100%  
Detecting chimeras 0%*** glibc detected *** /home/labop/vsearch/vsearch-1.0.5-linux-x86_64: realloc(): invalid next size: 0x00007fc300025400 ***
*** glibc detected *** /home/labop/vsearch/vsearch-1.0.5-linux-x86_64: double free or corruption (out): 0x00007fc31002bae0 ***

And it just hangs there.

I've used the vsearch derep_fulllength to get derep.fasta.

head of my derep.fasta gives:

>Lib_pool22_M00366:44:000000000-A92F0:1:1117:6872:7515_1:N:0:4;size=4033;
AATTCGCCCTTGAGGGGGCGACGGTGCTGGACGCACAGAAGGGTGCCTATTATACACCAATAACAGCACTAGATTTCGAA
GGTCTATATCCATCAATTATGATGGCACATAATTTATGTTATTCATCAATGGTTATGGATTCTAAATACGAAAATATACC
TGGTATAACATACGAAACGTTTGGGTTTTATAAGTTTGCACAAGATGTTCCAAGTCTTTTACCAAGTATTCTTCTAGAAC
TAAAACAGTTTCGTAAACAAGCTAAAAAGGATATGGCACAATCATCCGGTGCACTAAA
>Lib_pool21_M00366:44:000000000-A92F0:1:1115:18924:7329_1:N:0:3;size=2837;
AATTCGCCCTTGAGGGGGCGACGGTGCTGGACGCACAAAAGGGGGCATATTATACACCGATTACAGCCCTAGATTTTGAA
GCACTATATCCATCAATCATGATGGCACACAATCTATGTTACTCTACACTCGTTATGGATGAGTATCGGTACGGTAATGT
TCCTGGTATAAACTATGAATCATTCAAAATTGGCGACAAAATATATAAATTTGCGCAAGGTGTACCCAGTCTTTTACCCG
labop@mesa:/Data/Julia/Thesis/Thesis-Overall/Miseq_Initial_Run_Processing/scripts$ head ../results/Divided_by_primers/All_libs_combined_OTUs_picked/Total_AVS_R1_annotated_trimmed_paired_derep.fasta 
>Lib_pool22_M00366:44:000000000-A92F0:1:1117:6872:7515_1:N:0:4;size=4033;
AATTCGCCCTTGAGGGGGCGACGGTGCTGGACGCACAGAAGGGTGCCTATTATACACCAATAACAGCACTAGATTTCGAA
GGTCTATATCCATCAATTATGATGGCACATAATTTATGTTATTCATCAATGGTTATGGATTCTAAATACGAAAATATACC
TGGTATAACATACGAAACGTTTGGGTTTTATAAGTTTGCACAAGATGTTCCAAGTCTTTTACCAAGTATTCTTCTAGAAC
TAAAACAGTTTCGTAAACAAGCTAAAAAGGATATGGCACAATCATCCGGTGCACTAAA
>Lib_pool21_M00366:44:000000000-A92F0:1:1115:18924:7329_1:N:0:3;size=2837;
AATTCGCCCTTGAGGGGGCGACGGTGCTGGACGCACAAAAGGGGGCATATTATACACCGATTACAGCCCTAGATTTTGAA
GCACTATATCCATCAATCATGATGGCACACAATCTATGTTACTCTACACTCGTTATGGATGAGTATCGGTACGGTAATGT
TCCTGGTATAAACTATGAATCATTCAAAATTGGCGACAAAATATATAAATTTGCGCAAGGTGTACCCAGTCTTTTACCCG
CAATTCTTCTTGAACTCAAACAATTTCGTAAAAAAGCTAAAAAGGATATGGCCGCTGCGAC

So I wondered if --uchime_ref is having a problem with the line wrapping generated from derep?

So I removed the wrapping from the derep.fasta so that it looked like this head:

>Lib_pool22_M00366:44:000000000-A92F0:1:1117:6872:7515_1:N:0:4;size=4033;
AATTCGCCCTTGAGGGGGCGACGGTGCTGGACGCACAGAAGGGTGCCTATTATACACCAATAACAGCACTAGATTTCGAAGGTCTATATCCATCAATTATGATGGCACATAATTTATGTTATTCATCAATGGTTATGGATTCTAAATACGAAAATATACCTGGTATAACATACGAAACGTTTGGGTTTTATAAGTTTGCACAAGATGTTCCAAGTCTTTTACCAAGTATTCTTCTAGAACTAAAACAGTTTCGTAAACAAGCTAAAAAGGATATGGCACAATCATCCGGTGCACTAAA
>Lib_pool21_M00366:44:000000000-A92F0:1:1115:18924:7329_1:N:0:3;size=2837;
AATTCGCCCTTGAGGGGGCGACGGTGCTGGACGCACAAAAGGGGGCATATTATACACCGATTACAGCCCTAGATTTTGAAGCACTATATCCATCAATCATGATGGCACACAATCTATGTTACTCTACACTCGTTATGGATGAGTATCGGTACGGTAATGTTCCTGGTATAAACTATGAATCATTCAAAATTGGCGACAAAATATATAAATTTGCGCAAGGTGTACCCAGTCTTTTACCCGCAATTCTTCTTGAACTCAAACAATTTCGTAAAAAAGCTAAAAAGGATATGGCCGCTGCGAC
>Lib_pool57_M00366:44:000000000-A92F0:1:1101:6581:8826_1:N:0:39;size=2079;
AATTCGCCCTTGAGGGGGCGACGGTGCTGGATGCACAAAAGGGGGCATATTATACACCGATTACAGCCCTAGATTTTGAAGCACTATATCCATCAATCATGATGGCACACAATCTATGTTACTCTACACTCGTTATGGATGAGTATCGGTACGGTAATGTTCCTGGTATAAACTATGAATCATTCAAAATTGGCGACAAAATATATAAATTTGCGCAAGGTGTACCCAGTCTTTTACCCGCAATTCTTCTTGAACTCAAACAATTTCGTAAAAAAGCTAAAAAGGATATGGCCGCTGCGAC
>Lib_pool2_Julia.2_2886829_M01170:9:000000000-A6JT1:1:1108:16338:8526_1:N:0:0;size=1828;
GAGGGGGCGACGGTGTTGGACGCCATGCGTAAACAGTTATGGGTCAGCCAAGCTGCACCTAACCCCAAGCTGCGTATGTCCAACATTGGAAAGCCTTGTAGCAGGGCGCTCTGGTACGACATCAATGGTGACGAGCAAGCGGAGAGCTTTACGCCACAGACCAAGCTCAAGTTCATCGTAGGTGACATTGTTGAAGCAATGTTGATCTACTTGGCCAAGGAAGCTGGACATTCTGTGACTGAGATGCAATC
>Lib_pool1_Julia.1_8087229_M01170:9:000000000-A6JT1:1:2107:10781:13498_1:N:0:0;size=1809;

But when I run the vsearch uchime command with it I get a new error:

Reading file custom_nt_database.fasta 100%  
684514 nt in 1036 seqs, min 204, max 5800, avg 661
WARNING: 47 sequences longer than 50000 nucleotides discarded.
Indexing sequences 100%  
Counting unique k-mers 100%  
Creating index of unique k-mers 100%  
Detecting chimeras 0%

Fatal error: Illegal header line in query fasta file

Any ideas of things to try?

Chimera detection

Commands for chimera detection:

  • uchime_ref
  • uparse_ref

Suggested options for chimera checking

--usersort
--chimeras FILENAME
--abskew 2.0
--uchime FILENAME
--log FILENAME
--nonchimeras FILENAME

API

Add a (Cython) API for the core functions of vsearch.

maxuniquesize option for dereplication

There is a minuniquesize option:

--minuniquesize positive integer
discard sequences with an abundance value smaller than integer.

Maybe the opposite option (maxuniquesize) would be useful?

Illegal instruction fault on some cpus

vsearch 1.0.1 crashes with an illegal instruction fault on some cpus, notably AMD cpus. The problem is identified (it is due to lack of ssse3 and/or sse41 features) and a fix (that only requires sse2) is in the works.

Documentation

A man page and other documentation should be created. As for now, the online USEARCH documentation is useful, but VSEARCH should not be dependent on it.

Prioritized features/options

Here are some often used options that should be implemented (from Frédéric):

Chimera checking

--usersort
--chimeras FILENAME
--abskew 2.0
--uchime FILENAME
--log FILENAME
--nonchimeras FILENAME

Clustering

--cluster FILENAME
--usersort
--id 0.97
--slots 16769023
--sizeout
--uc FILENAME
--w 64
--seedsout FILENAME
--maxrejects 500
--sizein
--log FILENAME

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.