vsearch

Versatile open-source tool for microbiome analysis

View on GitHub

NAME

fastq — a text-based format for representing nucleotide sequences and their corresponding quality scores

DESCRIPTION

In fastq files, each entry consists of four parts: a sequence header starting with ‘@’, a sequence, a quality header starting with ‘+’, and a quality string:

@label [description]
ACGTURYSWKMDBHVN...
+
IIIIIIIIIIIIIIII...

Sequence header

The sequence header is the line starting with ‘@’. The label is the string between ‘@’ and the first space, tab, or newline, unless --notrunclabels is in effect, in which case the entire line after ‘@’ is used as the label.

The header should contain printable ASCII characters (values 33–126, see ascii(7)). Unprintable characters (values 0–32 and 127) cause a fatal error. Non-ASCII characters (values 128–255) trigger a warning.

Sequence

The sequence is defined as a string of IUPAC symbols (‘ACGTURYSWKMDBHVN’ and ‘acgturyswkmdbhvn’), starting after the end of the header line and ending before the next header line, or the file’s end. vsearch silently ignores ASCII characters 9 to 13, and exits with an error message if ASCII characters 0 to 8, 14 to 31, ‘.’ or ‘-’ are present. All other ASCII or non-ASCII characters are stripped and complained about in a warning message.

Quality header

The quality header is the line starting with ‘+’. Any text after ‘+’ on this line is ignored by vsearch.

Quality string

The quality string is a string of ASCII characters, one per base, encoding the Phred quality score for the corresponding position. The quality string starts after the quality header line and ends before the next sequence header or the end of the file.

Quality scores are encoded as Q = ASCII_value - offset, where the offset is set with --fastq_ascii (default 33):

vsearch silently ignores ASCII characters 9–13 (tab and whitespace) in quality strings, and exits with an error if ASCII characters 0–8, 14–31, ‘.’ or ‘-’ are present. All other unexpected characters are stripped with a warning.

Header annotations

vsearch reads and writes several annotations embedded in sequence headers, following the pattern [@;]key=value[;]. Annotations can appear in any order after the label:

[@;]size=integer[;]
Abundance (number of occurrences of the sequence in the study). Read by --sizein, written by --sizeout, removed by --xsize.

[@;]ee=float[;]
Expected error count. Written by --eeout or --fastq_eeout, removed by --xee. See vsearch-expected_error(7).

[@;]length=integer[;]
Sequence length. Written by --lengthout, removed by --xlength.

[@;]sample=string[;]
Sample identifier. Written by --sample.

Case and masking

vsearch operations are case-insensitive, except when soft masking is active. Lower-case letters indicate masked residues; upper-case letters indicate unmasked residues. DUST masking (automatic low-complexity masking applied during chimera detection, clustering, masking, pairwise alignment, and searching) converts low-complexity regions to lower case. Soft masking is enabled with --qmask soft or --dbmask soft. Masked residues are excluded from word-based comparisons but otherwise treated as normal symbols.

T and U equivalence

When comparing sequences (chimera detection, dereplication, searching, and clustering), T and U are treated as identical regardless of case.

SEE ALSO

vsearch-fasta(5), vsearch-udb(5), vsearch-fastq_chars(1), vsearch-fastq_convert(1), ascii(7)

CITATION

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

REPORTING BUGS

Submit suggestions and bug-reports at https://github.com/torognes/vsearch/issues, send a pull request on https://github.com/torognes/vsearch, or compose a friendly or curmudgeont e-mail to Torbjørn Rognes (torognes@ifi.uio.no).

AVAILABILITY

Source code and binaries are available at https://github.com/torognes/vsearch.

COPYRIGHT

Copyright (C) 2014-2026, Torbjørn Rognes, Frédéric Mahé and Tomás Flouri

All rights reserved.

Contact: Torbjørn Rognes torognes@ifi.uio.no, Department of Informatics, University of Oslo, PO Box 1080 Blindern, NO-0316 Oslo, Norway

This software is dual-licensed and available under a choice of one of two licenses, either under the terms of the GNU General Public License version 3 or the BSD 2-Clause License.

GNU General Public License version 3

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

The BSD 2-Clause License

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

ACKNOWLEDGMENTS

We would like to thank the authors of the following projects for making their source code available: