Vsearch Manual
Vsearch Manual
NAME
vsearch — a versatile open-source tool for microbiome analysis, including chimera detection, clustering,
dereplication and rereplication, extraction, FASTA/FASTQ/SFF file processing, masking, orienting, pair-
wise alignment, restriction site cutting, searching, shuffling, sorting, subsampling, and taxonomic classifica-
tion of amplicon sequences for metagenomics, genomics, and population genetics.
SYNOPSIS
Chimera detection:
vsearch (--uchime_denovo | --uchime2_denovo | --uchime3_denovo) fastafile (--chimeras |
--nonchimeras | --uchimealns | --uchimeout) outputfile [options]
vsearch --uchime_ref fastafile (--chimeras | --nonchimeras | --uchimealns | --uchimeout) outputfile
--db fastafile [options]
Clustering:
vsearch (--cluster_fast | --cluster_size | --cluster_smallmem | --cluster_unoise) fastafile (--alnout |
--biomout | --blast6out | --centroids | --clusters | --mothur_shared_out | --msaout | --otutabout |
--profile | --samout | --uc | --userout) outputfile --id real [options]
Dereplication and rereplication:
vsearch --fastx_uniques (fastafile | fastqfile) (--fastaout | --fastqout | --tabbedout | --uc) outputfile
[options]
vsearch (--derep_fulllength | --derep_id | --derep_prefix) fastafile (--output | --uc) outputfile [op-
tions]
vsearch --derep_smallmem (fastafile | fastqfile) --fastaout outputfile [options]
vsearch --rereplicate fastafile --output outputfile [options]
Extraction of sequences:
vsearch --fastx_getseq fastafile (--fastaout | --fastqout | --notmatched | --notmatchedfq) outputfile
--label label [options]
vsearch --fastx_getseqs fastafile (--fastaout | --fastqout | --notmatched | --notmatchedfq) outputfile
(--label label --labels labelfile | --label_word label | --label_words labelfile) [options]
vsearch --fastx_getsubseq fastafile (--fastaout | --fastqout | --notmatched | --notmatchedfq) output-
file --label label [--subseq_start position] [--subseq_end position] [options]
FASTA/FASTQ/SFF file processing:
vsearch --fasta2fastq fastqfile --fastqout outputfile [options]
vsearch --fastq_chars fastqfile [options]
vsearch --fastq_convert fastqfile --fastqout outputfile [options]
vsearch (--fastq_eestats | --fastq_eestats2) fastqfile --output outputfile [options]
vsearch --fastq_filter fastqfile [--reverse fastqfile] (--fastaout | --fastaout_discarded | --fastqout |
--fastqout_discarded --fastaout_rev | --fastaout_discarded_rev | --fastqout_rev | --fastqout_dis-
carded_rev) outputfile [options]
vsearch --fastq_join fastqfile --reverse fastqfile (--fastaout | --fastqout) outputfile [options]
vsearch --fastq_mergepairs fastqfile --reverse fastqfile (--fastaout | --fastqout | --fastaout_not-
merged_fwd | --fastaout_notmerged_rev | --fastqout_notmerged_fwd | --fastqout_notmerged_rev |
--eetabbedout) outputfile [options]
vsearch --fastq_stats fastqfile [--log logfile] [options]
vsearch --fastx_filter inputfile [--reverse inputfile] (--fastaout | --fastaout_discarded | --fastqout |
--fastqout_discarded --fastaout_rev | --fastaout_discarded_rev | --fastqout_rev | --fastqout_dis-
carded_rev) outputfile [options]
vsearch --fastx_revcomp inputfile (--fastaout | --fastqout) outputfile [options]
Input
vsearch accept as input fasta or fastq files containing one or several nucleotidic entries. In fasta files, each
entry is made of a header and a sequence. The header is defined as the string comprised between the initial
’>’ symbol and the first space, tab or the end of the line, unless the --notrunclabels option is in effect, in
which case the entire line is included. The header should contain printable ascii characters (33-126). The
program will terminate with a fatal error if there are unprintable ascii characters. A warning will be issued
if non-ascii characters (128-255) are encountered.
If the header matches the pattern ’>[;]size=integer;label’, the pattern ’>label;size=integer;label’, or the pat-
tern ’>label;size=integer[;]’, vsearch will interpret integer as the number of occurrences (or abundance) of
the sequence in the study. That abundance information is used or created during chimera detection, cluster-
ing, dereplication, sorting and searching.
The sequence is defined as a string of IUPAC symbols (ACGTURYSWKMDBHVN), starting after the end
of the identifier line and ending before the next identifier line, or the file 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.
In fastq files, each entry is made of sequence header starting with a symbol ’@’, a nucleotidic sequence
(same rules as for fasta sequences), a quality header starting with a symbol ’+’ and a string of ASCII char-
acters (offset 33 or 64), each one encoding the quality value of the corresponding position in the nucleotidic
sequence.
vsearch operations are case insensitive, except when soft masking is activated. Masking is automatically
applied during chimera detection, clustering, masking, pairwise alignment and searching. Soft masking is
specified with the options ’--dbmask soft’ (for searching and chimera detection with a reference) or
’--qmask soft’ (for searching, de novo chimera detection, clustering and masking). When using soft mask-
ing, lower case letters indicate masked symbols, while upper case letters indicate regular symbols. Masked
symbols are never included in the unique index words used for sequence comparisons, otherwise they are
treated as normal symbols.
When comparing sequences during chimera detection, dereplication, searching and clustering, T and U are
considered identical, regardless of their case. When aligning sequences, identical symbols will receive a
positive match score (default +2). If two symbols are not identical, their alignment result in a negative mis-
match score (default -4). Aligning a pair of symbols where at least one of them is an ambiguous symbol
(BDHKMNRSVWY) will always result in a score of zero. Alignment of two identical ambiguous symbols
(for example, R vs R) also receives a score of zero. When computing the amount of similarity by counting
matches and mismatches after alignment, ambiguous nucleotide symbols will count as matching to other
symbols if they have at least one of the nucleotides (ACGTU) they may represent in common. For example:
W will match A and T, but also any of MRVHDN. When showing alignments (for example with the --al-
nout option) matches involving ambiguous symbols will be shown with a plus character (+) between them
while exact matches between non-ambiguous symbols will be shown with a vertical bar character (|).
vsearch can read data from standard files and write to standard files, but it can also read from pipes and
write to pipes! For example, multiple fasta files can be piped into vsearch for dereplication. To do so, file
names can be replaced with:
- the symbol ’-’, representing ’/dev/stdin’ for input files or ’/dev/stdout’ for output files (with an
exception for ’--db -’, see * below),
- a named pipe created with the command mkfifo,
- a process substitution ’<(command)’ as input or ’>(command)’ as output.
* --db - is not accepted, to prevent potential concurrent reads from stdin. A workaround for ad-
vanced users is to call ’--db /dev/stdin’ directly.
vsearch can automatically read compressed gzip or bzip2 files if the appropriate libraries are present during
the compilation. vsearch can also read pipes streaming compressed gzip or bzip2 data if the options
--gzip_decompress or --bzip2_decompress are selected. When reading from a pipe, the progress indicator is
not updated.
Options
vsearch recognizes a large number of command-line commands and options. For easier navigation, options
are grouped below by theme (chimera detection, clustering, dereplication and rereplication, FASTA/FASTQ
file processing, masking, pairwise alignment, searching, shuffling, sorting, and subsampling). We start with
the general options that apply to all themes. Options start with a double dash (--). A single dash (-) may
also be used, except on NetBSD systems. Option names may be shortened as long as they are not ambigu-
ous (e.g. --derep_f).
Help and version commands:
--help --h Display help text with brief information about all commands and options.
--version --v
Output version information and a citation for the VSEARCH publication. Show the sta-
tus of the support for gzip- and bzip2-compressed input files.
General options:
--bzip2_decompress
When reading from a pipe streaming bzip2-compressed data, decompress the data. This
option is not needed when reading from a standard bzip2-compressed file.
--fasta_width positive integer
Fasta files produced by vsearch are wrapped (sequences are written on lines of integer
nucleotides, 80 by default). Set the value to zero to eliminate the wrapping.
--gzip_decompress
When reading from a pipe streaming gzip-compressed data, decompress the data. This
option is not needed when reading from a standard gzip-compressed file.
--label_suffix string
When writing FASTA or FASTQ files, add the suffix string to sequence headers.
--log filename
Write messages to the specified log file. Information written includes program version,
amount of memory available, number of cores and command line options, and if need
be, informational messages, warnings and fatal errors. The start and finish times are
also recorded as well as the elapsed time and the maximum amount of memory con-
sumed. The different vsearch commands can also write additional information to the
log file.
--maxseqlength positive integer
All vsearch operations discard sequences longer than integer (50,000 nucleotides by
default).
--minseqlength positive integer
All vsearch operations discard sequences shorter than integer: 1 nucleotide by default
for sorting or shuffling, 32 nucleotides for clustering and dereplication as well as the
commands --makeudb_usearch, --sintax, and --usearch_global.
--no_progress
Do not show the gradually increasing progress indicator.
--notrunclabels
Do not truncate sequence labels at first space or tab, but use the full header in output
files. Turned off by default for all commands except the sintax command.
--quiet Suppress all messages to stdout and stderr except for warnings and fatal error mes-
sages.
--sample string
When writing FASTA or FASTQ files, add the the given sample identifier string to se-
quence headers. For instance, if the given string is ABC, the text ";sample=ABC" will
be added to the header. Note that string will be truncated at the first ’;’ or blank charac-
ter. Other characters (alphabetical, numerical and punctuations) are accepted.
--threads positive integer
Number of computation threads to use (1 to 1024). The number of threads should be
less than or equal to the number of available CPU cores. The default is to use all avail-
able resources and to launch one thread per core. The following commands are multi-
threaded: allpairs_global, cluster_fast, cluster_size, cluster_smallmem, cluster_unoise,
fastq_mergepairs, fastx_mask, maskfasta, search_exact, sintax, uchime_ref, and use-
arch_global. Only one thread is used for the other commands.
Chimera detection options:
Chimera detection is based on a scoring function controlled by five options (--dn, --mindiffs,
--mindiv, --minh, --xn). Sequences are first sorted by decreasing abundance, if available, and com-
pared on their plus strand only (case insensitive).
Input sequences are masked as specified with the --qmask and --hardmask options. Masking of the
database for reference based chimera detection is specified with the --dbmask option.
In de novo mode, input fasta file must present abundance annotations (i.e. a pattern [;]size=inte-
ger[;] in the fasta header). Input order matters for chimera detection, so we recommend to sort se-
quences by decreasing abundance (default of --derep_fulllength command). If your sequence set
needs to be sorted, please see the --sortbysize command in the sorting section.
--abskew real
When using --uchime_denovo, the abundance skew is used to distinguish in a three-
way alignment which sequence is the chimera and which are the parents. The assump-
tion is that chimeras appear later in the PCR amplification process and are therefore
less abundant than their parents. For --uchime3_denovo the default value is 16.0. For
the other commands, the default value is 2.0, which means that the parents should be at
least 2 times more abundant than their chimera. Any positive value equal or greater
than 1.0 can be used.
--alignwidth positive integer
When using --uchimealns, set the width of the three-way alignments (80 nucleotides by
default). Set to zero to eliminate wrapping.
--borderline filename
Output borderline chimeric sequences to filename, in fasta format. Borderline chimeric
sequences are sequences that have a high enough score but which are not sufficiently
different from their closest parent.
--chimeras filename
Output chimeric sequences to filename, in fasta format. Output order may vary when
using multiple threads.
--db filename
When using --uchime_ref, detect chimeras using the reference sequences contained in
filename. Reference sequences are assumed to be chimera-free. Chimeras cannot be de-
tected if their parents, or sufficiently close relatives, are not present in the database. The
file name must refer to a FASTA file or to a UDB file. If a UDB file is used, it should
be created using the --makeudb_usearch command with the --dbmask dust option.
--dn strictly positive real number
pseudo-count prior on the number of no votes, corresponding to the parameter n in the
chimera scoring function (default value is 1.4). Increasing --dn reduces the likelihood
of tagging a sequence as a chimera (less false positives, but also more false negatives).
--fasta_score
Add the chimera score to the headers in the fasta output files for chimeras, non-
chimeras and borderline sequences, using the format ’;uchime_denovo=float;’.
--lengthout
Write sequence length information to the output files in FASTA format by adding a
";length=integer" attribute in the header.
--mindiffs positive integer
Minimum number of differences per segment (default value is 3). The parameter is ig-
nored with --uchime2_denovo and --uchime3_denovo.
--mindiv real
Minimum divergence from closest parent (default value is 0.8). The parameter is ig-
nored with --uchime2_denovo and --uchime3_denovo.
--minh real
Minimum score (h). Increasing this value tends to reduce the number of false positives
and to decrease sensitivity. Default value is 0.28, and values ranging from 0.0 to 1.0 in-
cluded are accepted. The parameter is ignored with --uchime2_denovo and
--uchime3_denovo.
--nonchimeras filename
Output non-chimeric sequences to filename, in fasta format. Output order may vary
when using multiple threads.
--relabel string
Relabel sequences using the prefix string and a ticker (1, 2, 3, etc.) to construct the new
headers. Use --sizeout to conserve the abundance annotations.
--relabel_keep
When relabelling, keep the old identifier in the header after a space.
--relabel_md5
Relabel sequences using the MD5 message digest algorithm applied to each sequence.
Former sequence headers are discarded. The sequence is converted to upper case and
each ’U’ is replaced by a ’T’ before computation of the digest. The MD5 digest is a
cryptographic hash function designed to minimize the probability that two different in-
puts give the same output, even for very similar, but non-identical inputs. Still, there is
a very small, but non-zero, probability that two different inputs give the same digest
(i.e. a collision). MD5 generates a 128-bit (16-byte) digest that is represented by 16
hexadecimal numbers (using 32 symbols among 0123456789abcdef). Use --sizeout to
conserve the abundance annotations.
--relabel_self
Relabel sequences using each sequence itself as a label.
--relabel_sha1
Relabel sequences using the SHA1 message digest algorithm applied to each sequence.
It is similar to the --relabel_md5 option but uses the SHA1 algorithm instead of the
MD5 algorithm. SHA1 generates a 160-bit (20-byte) digest that is represented by 20
hexadecimal numbers (40 symbols). The probability of a collision (two non-identical
sequences resulting in the same digest) is smaller for the SHA1 algorithm than it is for
the MD5 algorithm.
--self When using --uchime_ref, ignore a reference sequence when its label matches the label
of the query sequence (useful to estimate false-positive rate in reference sequences).
--selfid When using --uchime_ref, ignore a reference sequence when its nucleotide sequence is
strictly identical to the nucleotidic sequence of the query.
--sizein In de novo mode, abundance annotations (pattern ’[>;]size=integer[;]’) present in se-
quence headers are taken into account by default (--sizein is always implied). This op-
tion is ignored by --uchime_ref.
--sizeout When relabelling, add abundance annotations to fasta headers (using the format
’;size=integer;’).
--uchime_denovo filename
Detect chimeras present in the fasta-formatted filename, without external references
(i.e. de novo). Automatically sort the sequences in filename by decreasing abundance
beforehand (see the sorting section for details). Multithreading is not supported.
--uchime2_denovo filename
Detect chimeras present in the fasta-formatted filename, using the UCHIME2 algo-
rithm. This algorithm is designed for denoised amplicons (see --cluster_unoise). Auto-
matically sort the sequences in filename by decreasing abundance beforehand (see the
sorting section for details). Multithreading is not supported.
--uchime3_denovo filename
Detect chimeras present in the fasta-formatted filename, using the UCHIME2 algo-
rithm. The only difference from --uchime2_denovo is that the default minimum abun-
dance skew (--abskew) is set to 16.0 rather than 2.0.
--uchime_ref filename
Detect chimeras present in the fasta-formatted filename by comparing them with refer-
ence sequences (option --db). Multithreading is supported.
--uchimealns filename
Write the three-way global alignments (parentA, parentB, chimera) to filename using a
human-readable format. Use --alignwidth to modify alignment length. Output order
may vary when using multiple threads. All sequences are converted to upper case be-
fore alignment. Lower case letters indicate disagreement in the alignment.
--uchimeout filename
Write chimera detection results to filename using a 18-field, tab-separated uchime-like
format. Use --uchimeout5 to use a format compatible with usearch v5 and earlier ver-
sions. Rows output order may vary when using multiple threads.
1. score: higher score means a more likely chimeric alignment.
2. Q: query sequence label.
3. A: parent A sequence label.
4. B: parent B sequence label.
5. T: top parent sequence label (i.e. parent most similar to the query). That
field is removed when using --uchimeout5.
6. idQM: percentage of similarity of query (Q) and model (M) constructed
as a part of parent A and a part of parent B.
7. idQA: percentage of similarity of query (Q) and parent A.
8. idQB: percentage of similarity of query (Q) and parent B.
9. idAB: percentage of similarity of parent A and parent B.
10. idQT: percentage of similarity of query (Q) and top parent (T).
11. LY: yes votes in the left part of the model.
12. LN: no votes in the left part of the model.
13. LA: abstain votes in the left part of the model.
14. RY: yes votes in the right part of the model.
15. RN: no votes in the right part of the model.
format.org/documentation/biom_conversion.html>.
--centroids filename
Output cluster centroid sequences to filename, in fasta format. The centroid is the se-
quence that seeded the cluster (i.e. the first sequence of the cluster).
--clusterout_id
Add cluster identifier information to the output files when using the --centroids, --con-
sout and --profile options.
--clusterout_sort
Sort some output files by decreasing abundance instead of input order. It applies to the
--consout, --msaout, --profile, --centroids, and --uc options. For --uc, the sorting applies
only to the centroid information part (the C lines).
--cluster_fast filename
Clusterize the fasta sequences in filename, automatically sort by decreasing sequence
length beforehand.
--cluster_size filename
Clusterize the fasta sequences in filename, automatically sort by decreasing sequence
abundance beforehand.
--cluster_smallmem filename
Clusterize the fasta sequences in filename without automatically modifying their order
beforehand. Sequence are expected to be sorted by decreasing sequence length, unless
--usersort is used.
--cluster_unoise filename
Perform denoising of the fasta sequences in filename according to the UNOISE version
3 algorithm by Robert Edgar, but without the de novo chimera removal step, which
may be performed afterwards with --uchime3_denovo. The options --minsize (default
8) and --unoise_alpha (default 2.0) may be specified. In the this algorithm, clustering of
sequences depend on both the sequence distance and the abundance ratio. The abun-
dance ratio (skew) is the abundance of a new sequence divided by the abundance of the
centroid sequence. This skew must not be larger than beta if the sequences should be
clustered together. Beta is calculated as 2 raised to the power of minus 1 minus alpha
times the sequence distance. The sequence distance used is the number of mismatches
in the alignment, ignoring gaps. This means that the abundance must be exponentially
lower as the distance increases from the centroid for a new sequence to be included in
the cluster. Nearer sequences with higher abundances will form their own new clusters.
--clusters string
Output each cluster to a separate fasta file using the prefix string and a ticker (0, 1, 2,
etc.) to construct the path and filenames.
--consout filename
Output cluster consensus sequences to filename. For each cluster, a center-star multiple
sequence alignment is computed with the centroid as the center, using a fast algorithm
(not accurate when using low pairwise identity thresholds). A consensus sequence is
constructed by taking the majority symbol (nucleotide or gap) from each column of the
alignment. Columns containing a majority of gaps are skipped, except for terminal
gaps. If the --sizein option is specified, sequence abundances will be taken into ac-
count.
--cons_truncate
This command is ignored. A warning is issued.
--id real Do not add the target to the cluster if the pairwise identity with the centroid is lower
than real (value ranging from 0.0 to 1.0 included). The pairwise identity is defined as
the number of (matching columns) / (alignment length - terminal gaps). That definition
--profile filename
Output a sequence profile to a text file with the frequency of each nucleotide in each
position in the multiple alignment for each cluster. There is a FASTA-like header line
for each cluster, followed by the profile information in a tab-separated format. The
eight columns are: position (0-based), consensus nucleotide, number of As, number of
Cs, number of Gs, number of Ts or Us, number of gap symbols, and finally the total
number of ambiguous nucleotide symbols (B, D, H, K, M, N, R, S, Y, V or W). All
numbers are integers. If the --sizein option is specified, sequence abundances will be
taken into account.
--qmask none|dust|soft
Mask regions in sequences using the dust or the soft methods, or do not mask (none).
Warning, when using soft masking, clustering becomes case sensitive. The default is to
mask using dust.
--qsegout filename
Write the aligned part of each query sequence to filename in FASTA format.
--relabel string
Relabel sequence identifiers in the output files produced by --consout, --profile and
--centroids options. Please see the description of the same option under Chimera detec-
tion for details.
--relabel_keep
When relabelling, keep the old identifier in the header after a space.
--relabel_md5
Relabel sequence identifiers in the output files produced by --consout, --profile and
--centroids options. Please see the description of the same option under Chimera detec-
tion for details.
--relabel_self
Relabel sequence identifiers in the output files produced by --consout, --profile and
--centroids options. Please see the description of the same option under Chimera detec-
tion for details.
--relabel_sha1
Relabel sequence identifiers in the output files produced by --consout, --profile and
--centroids options. Please see the description of the same option under Chimera detec-
tion for details.
--sizein Take into account the abundance annotations present in the input fasta file (search for
the pattern ’[>;]size=integer[;]’ in sequence headers).
--sizeorder
When an amplicon is close to 2 or more centroids, both within the distance specified
with the --id option, resolve the ambiguity by clustering it with the centroid having the
highest abundance, not necessarily the closest one. The option only has effect when the
value specified with --maxaccepts is higher than one. The --sizeorder option turns on
what is sometimes referred to as abundance-based greedy clustering (AGC), in contrast
to the default distance-based greedy clustering (DGC).
--sizeout Add abundance annotations to the output fasta files (add the pattern ’;size=integer;’ to
sequence headers). If --sizein is specified, abundance annotations are reported to output
files, and each cluster centroid receives a new abundance value corresponding to the to-
tal abundance of the amplicons included in the cluster (--centroids option). If --sizein is
not specified, input abundances are set to 1 for amplicons, and to the number of ampli-
cons per cluster for centroids.
--strand plus|both
When comparing sequences with the cluster seed, check the plus strand only (default)
or check both strands.
--tsegout filename
Write the aligned part of each target sequence to filename in FASTA format.
--uc filename
Output clustering results in filename using a tab-separated uclust-like format with 10
columns and 3 different type of entries (S, H or C). Each fasta sequence in the input file
can be either a cluster centroid (S) or a hit (H) assigned to a cluster. Cluster records (C)
summarize information (size, centroid label) for each cluster. In the context of cluster-
ing, the option --uc_allhits has no effect on the --uc output. Column content varies with
the type of entry (S, H or C):
1. Record type: S, H, or C.
2. Cluster number (zero-based).
3. Centroid length (S), query length (H), or cluster size (C).
4. Percentage of similarity with the centroid sequence (H), or set to ’*’ (S,
C).
5. Match orientation + or - (H), or set to ’*’ (S, C).
6. Not used, always set to ’*’ (S, C) or to zero (H).
7. Not used, always set to ’*’ (S, C) or to zero (H).
8. set to ’*’ (S, C) or, for H, compact representation of the pairwise align-
ment using the CIGAR format (Compact Idiosyncratic Gapped Align-
ment Report): M (match/mismatch), D (deletion) and I (insertion). The
equal sign ’=’ indicates that the query is identical to the centroid se-
quence.
9. Label of the query sequence (H), or of the centroid sequence (S, C).
10. Label of the centroid sequence (H), or set to ’*’ (S, C).
--unoise_alpha real
Specify the alpha parameter to the --cluster_unoise command. The default is 2.0.
--usersort
When using --cluster_smallmem, allow any sequence input order, not just a decreasing
length ordering.
--xlength Strip header attribute ";length=integer" from input sequences. This attribute is added to
output sequences by the --lengthout option.
--xsize Strip abundance information from the headers when writing the output file.
... Most searching options as well as score filtering, gap penalties and masking also apply
to clustering (see the Searching section for definitions): --alnout, --blast6out,
--fastapairs, --matched, --notmatched, --maxaccepts, --maxrejects, --samout, --userout,
--userfields
Dereplication and rereplication options:
VSEARCH can dereplicate sequences with the commands --derep_fulllength, --derep_id,
--derep_smallmem, --derep_prefix and --fastx_uniques. The --derep_fulllength command is depre-
ciated and is replaced by the new --fastx_uniques command that can also handle FASTQ files in
addition to FASTA files. The --derep_fulllength, --derep_smallmem, and --fastx_uniques com-
mands requires strictly identical sequences of the same length, but ignores upper/lower case and
treats T and U as identical symbols. The --derep_id command requires both identical sequences
and identical headers/labels. The --derep_prefix command will group sequences with a common
prefix and does not require them to be equally long. The --derep_smallmem uses a much smaller
amount of memory when dereplicating than the other files, and may be a bit slower and cannot
read the input from a pipe. It takes both FASTA and FASTQ files as input but only writes FASTA
output to the file specified with the --fastaout option. The --fastx_uniques command can write
FASTQ output (specified with --fastqout) or FASTA output (specified with --fastaout) as well as a
special tab-separated column text format (with --tabbedout). The other commands can write
FASTA output to the file specified with the --output option. All dereplication commands, except
--derep_smallmem, can write output to a special UCLUST-like file specified with the --uc option.
The --rereplicate command can duplicate sequences in the input file according to the abundance of
each input sequence. Other valid options are --fastq_ascii, --fastq_asciiout, --fastq_qmax,
--fastq_qmaxout, --fastq_qmin, --fastq_qminout, --fastq_qout_max, --lengthout, --maxuniquesize,
--minuniquesize, --relabel, --relabel_keep, --relabel_md5, --relabel_self, --relabel_sha1, --sizein,
--sizeout, --strand, --topn, --xlength, and --xsize.
--derep_fulllength filename
Merge strictly identical sequences contained in filename. Identical sequences are de-
fined as having the same length and the same string of nucleotides (case insensitive, T
and U are considered the same). See the options --sizein and --sizeout to take into ac-
count and compute abundance values. This command does not support multithreading.
--derep_id filename
Merge strictly identical sequences contained in filename, as with the --derep_fulllength
command, but the sequence labels (identifiers) on the header line need to be identical
too.
--derep_smallmem filename
Merge strictly identical sequences contained in filename, as with the --derep_fulllength
command, but using much less memory. The output is written to a FASTA file specified
with the --fastaout option. The output is written in the order that the sequences first ap-
pear in the input, and not in descending abundance order as with the other dereplication
commands. It can read, but not write FASTQ files. This command cannot read from a
pipe, it must be a proper file, as it is read twice. Dereplication is performed with a 128
bit hash function and it is not verified that grouped sequences are identical, however the
probability that two different sequences are grouped in a dataset of one billion unique
sequences is approximately 1e-21. Memory footprint is appr. 24 bytes times the num-
ber of unique sequence. Multithreading and the options --topn, --uc, or --tabbedout are
not supported.
--derep_prefix filename
Merge sequences with identical prefixes contained in filename. A short sequence iden-
tical to an initial segment (prefix) of another sequence is considered a replicate of the
longer sequence. If a sequence is identical to the prefix of two or more longer se-
quences, it is clustered with the shortest of them. If they are equally long, it is clustered
with the most abundant. Remaining ties are solved using sequence headers and se-
quence input order. Sequence comparisons are case insensitive, and T and U are con-
sidered identical. This command does not support multithreading.
--fastaout filename
Write the dereplicated sequences to filename, in fasta format and sorted by decreasing
abundance. Identical sequences receive the header of the first sequence of their group.
If --sizeout is used, the number of occurrences (i.e. abundance) of each sequence is in-
dicated at the end of their fasta header using the pattern ’;size=integer;’. This option is
only valid for --fastx_uniques and --derep_smallmem.
--fastqout filename
Write the dereplicated sequences to filename, in fastq format and sorted by decreasing
abundance. Identical sequences receive the header of the first sequence of their group.
If --sizeout is used, the number of occurrences (i.e. abundance) of each sequence is
indicated at the end of their fastq header using the pattern ’;size=integer;’. This option
is only valid for --fastx_uniques.
--fastq_ascii positive integer
Define the ASCII character number used as the basis for the FASTQ quality score. The
default is 33, which is used by the Sanger / Illumina 1.8+ FASTQ format (phred+33).
The value 64 is used by the Solexa, Illumina 1.3+ and Illumina 1.5+ formats
(phred+64). Only 33 and 64 are valid arguments.
--fastq_asciiout positive integer
When using --fastq_convert, --sff_convert or --fasta2fastq, define the ASCII character
number used as the basis for the FASTQ quality score when writing FASTQ output
files. The default is 33. Only 33 and 64 are valid arguments.
--fastq_qmax positive integer
Specify the maximum quality score accepted when reading FASTQ files. The default is
41, which is usual for recent Sanger/Illumina 1.8+ files.
--fastq_qmaxout positive integer
Specify the maximum quality score used when writing FASTQ files. The default is 41,
which is usual for recent Sanger/Illumina 1.8+ files. Older formats may use a maxi-
mum quality score of 40.
--fastq_qmin positive integer
Specify the minimum quality score accepted for FASTQ files. The default is 0, which is
usual for recent Sanger/Illumina 1.8+ files. Older formats may use scores between -5
and 2.
--fastq_qminout positive integer
Specify the minimum quality score used when writing FASTQ files. The default is 0,
which is usual for Sanger/Illumina 1.8+ files. Older versions of the format may use
scores between -5 and 2.
--fastq_qout_max
For --fastx_uniques, indicate that the new quality scores computed when dereplicating
FASTQ files should be equal to the maximum (best) of the input quality scores for each
position (corresponding to the lowest error probability). The default is to output a qual-
ity score corresponding to the average of the error probabilities for each position.
--fastx_uniques filename
Merge strictly identical sequences contained in FASTA or FASTQ file filename. Identi-
cal sequences are defined as having the same length and the same string of nucleotides
(case insensitive, T and U are considered the same). See the options --sizein and --size-
out to take into account and compute abundance values. This command does not sup-
port multithreading. By default, the quality scores in FASTQ output files will corre-
spond to the average error probability of the nucleotides in the each position. If the
--fastq_qout_max option is given, the quality score will be the highest (best) quality
score observed in each position.
--lengthout
Write sequence length information to the output files in FASTA and FASTQ format by
adding a ";length=integer" attribute in the header.
--maxuniquesize positive integer
Discard sequences with a post-dereplication abundance value greater than integer.
--minuniquesize positive integer
Discard sequences with a post-dereplication abundance value smaller than integer.
--output filename
Write the dereplicated sequences to filename, in fasta format and sorted by decreasing
abundance. Identical sequences receive the header of the first sequence of their group.
If --sizeout is used, the number of occurrences (i.e. abundance) of each sequence is in-
dicated at the end of their fasta header using the pattern ’;size=integer;’. This option is
not allowed for --fastx_uniques or --derep_smallmem.
--relabel string
Please see the description of the same option under Chimera detection for details.
--relabel_keep
When relabelling, keep the old identifier in the header after a space.
--relabel_md5
Please see the description of the same option under Chimera detection for details.
--relabel_self
Please see the description of the same option under Chimera detection for details.
--relabel_sha1
Please see the description of the same option under Chimera detection for details.
--rereplicate filename
Duplicate each sequence the number of times indicated by the abundance of each se-
quence in the specified file (option --sizein is always implied). The sequence labels are
identical for the same sequence, unless --relabel, --relabel_self, --relabel_sha1 or --rela-
bel_md5 is used to create unique labels. Output is written to the file specified with the
--output option, in FASTA format. The output file does not contain abundance informa-
tion unless --sizeout is specified, in which case an abundance of 1 is used.
--sizein Take into account the abundance annotations present in the input fasta file (search for
the pattern ’[>;]size=integer[;]’ in sequence headers). That option is active by default
when rereplicating.
--sizeout Add abundance annotations to the output fasta file (add the pattern ’;size=integer;’ to
sequence headers). If --sizein is specified, each unique sequence receives a new abun-
dance value corresponding to its total abundance (sum of the abundances of its occur-
rences). If --sizein is not specified, input abundances are set to 1, and each unique se-
quence receives a new abundance value corresponding to its number of occurrences in
the input file.
--strand plus|both
When searching for strictly identical sequences, check the plus strand only (default) or
check both strands.
--tabbedout filename
Output clustering info to the specified tab-separated text file with 6 columns and a row
for each input sequence. Column 1 contains the original label/header of the sequence.
Column 2 contains the label of the output sequence which is equal to the label/header
of the first sequence in each cluster, but potentially relabelled. Column 3 contains the
cluster number, starting from 0. Column 4 contains the sequence number within each
cluster, starting at 0. Column 5 contains the number of sequences in the cluster. Col-
umn 6 contains the original label/header of the first sequence in the cluster before any
potential relabelling. This option is only valid for the --fastx_uniques command.
--topn positive integer
Output only the top integer sequences (i.e. the most abundant).
--uc filename
Output full-length or prefix-dereplication results in filename using a tab-separated
uclust-like format with 10 columns and 3 different type of entries (S, H or C). Each
fasta sequence in the input file can be either a cluster centroid (S) or a hit (H) assigned
to a cluster. Cluster records (C) summarize information (size, centroid label) for each
cluster. In the context of dereplication, the option --uc_allhits has no effect on the --uc
output. Column content varies with the type of entry (S, H or C):
1. Record type: S, H, or C.
2. Cluster number (zero-based).
3. Sequence length (S, H), or cluster size (C).
4. Percentage of similarity with the centroid sequence (H), or set to ’*’ (S,
C).
5. Match orientation + or - (H), or set to ’*’ (S, C).
6. Not used, always set to ’*’ (S, C) or 0 (H).
7. Not used, always set to ’*’ (S, C) or 0 (H).
8. Not used, always set to ’*’.
9. Label of the query sequence (H), or of the centroid sequence (S, C).
10. Label of the centroid sequence (H), or set to ’*’ (S, C).
--xlength
Strip header attribute ";length=integer" from input sequences. This attribute is added to
output sequences by the --lengthout option.
--xsize Strip abundance information from the headers when writing the output file.
Extraction options:
Sequences with headers matching certain criteria can be extracted from FASTA and FASTQ files
using the --fastx_getseq, --fastx_getseqs and --fastx_getsubseq commands.
The --fastx_getseq command requires the header to match a label specified with the --label option.
If the --label_substr_match option is given, the label may be a substring located anywhere in the
header, otherwise the entire header must match the label. These matches are not case-sensitive.
The headers in the input file are truncated at the first space or tab character unless the --notruncla-
bels option is given. The matching sequences will be written to the files specified with the --fas-
taout and --fastqout options, in FASTA and FASTQ format, respectively. Sequences that do not
match are written to the files specified with the --notmatched and --notmatchedfq options, respec-
tively.
The --fastx_getsubseq command is similar to the --fastx_getseq command, but will extract a sub-
sequence of the matching sequences. The start position is specified with the --subseq_start option
and the end position is specified with the --subseq_end option. The positions are 1-based, meaning
that the first symbol of the sequence is at position 1. If the start or end position option is not speci-
fied, the default is to start at the first position and end at the last position in the sequence.
The --fastx_getseqs command is similar to the --fastx_getseq command but allows more flexibility
in specifying the label(s) to be matched. A single label may be specified using the --label option as
described above. Alternatively, a file containing a list of labels to be matched may be specified
with the --labels option. The file must be a plain text file with one label on each line. The --la-
bel_word and --label_words options may be used to specify either a single word or a file contain-
ing a list of words, respectively, to be matched. Words are defined as character sequences delim-
ited either by a character that is not alpha-numeric (A-Z, a-z, or 0-9) or by the beginning or end of
the header. Word matching is case-sensitive. The --label_field option will limit the matching of
words to a certain field in the header.
--fastaout filename
Write the extracted sequences in FASTA format to the file with the given name.
--fastqout filename
Write the extracted sequences in FASTQ format to the file with the given name. This
option is illegal if the input is in FASTA format.
--fastx_getseq filename
Extract sequences from the given FASTA or FASTQ file. Specify a label to match using
the --label option. Output files are specified with the --fastaout, --fastqout, --not-
matched and --notmatchedfq options.
--fastx_getseqs filename
Extract sequences from the given FASTA or FASTQ file. Specify the label or labels to
match using one of the following options: --label, --labels, --label_word, or --la-
bel_words. Output files are specified with the --fastaout, --fastqout, --notmatched and
--notmatchedfq options.
--fastx_getsubseq filename
Extract a certain part of some of the sequences in the given FASTA or FASTQ file.
Specify labels to match using the --label option. Specify the subsequence range to be
extracted with the --subseq_start and --subseq_end options. Output files are specified
with the --fastaout, --fastqout, --notmatched and --notmatchedfq options.
--label string
Specify the label to match in the sequence header. Unless the --label_substr_match op-
tion is given, the label must match the entire header. The comparison is not case-sensi-
tive.
--label_field string
Specify a field name to be used when matching using the --label_word or --label_words
option. The field name is a string like "abc" that must precede the word to be matched
with an equals sign (=) in between. The field must be delimited by semicolons or the
beginning or end of the header. The following header will match the label 123 in the
field abc: "seq1;abc=123".
--label_substr_match
The labels specified with the --label or the --labels option may match anywhere in the
header if this option is given. Otherwise a label needs to match the entire header.
--label_word string
Specify a word to match in the sequence header. Words are defined as strings delimited
by either the start or end of the header or by any symbol that is not a letter (A-Z, a-z) or
digit (0-9). The comparison is case-sensitive.
--label_words filename
Specify a file containing words to be matched against the sequence headers. The plain
text file must contain one word on each line. Words are defined as strings delimited by
either the start or end of the header or by any symbol that is not a letter (A-Z, a-z) or
digit (0-9). The comparison is case-sensitive.
--labels filename
Specify a file containing labels to be matched against the sequence headers. The plain
text file must contain one label on each line. Unless the --label_substr_match option is
given, a label must match the entire header. The comparison is not case-sensitive.
--notmatched filename
Write the sequences that were not extracted to the file with the given name, in FASTA
format.
--notmatchedfq filename
Write the sequences that were not extracted to the file with the given name, in FASTQ
format. This option is illegal if the input is in FASTA format.
--subseq_end positive integer
Specify the end position in the sequences when extracting subsequences using the
--fastx_getsubseq command. Positions are 1-based, so the sequences start at position 1.
The default is to end at the end of the sequence if this option is not specified.
--fastaout_discarded_rev filename
Write reverse reads that do not pass the filter of the --fastq_filter or --fastx_filter com-
mand to the given FASTA-formatted file.
--fastq_allowmergestagger
When using --fastq_mergepairs, allow merging of staggered read pairs. Staggered pairs
are pairs where the 3’ end of the reverse read has an overhang to the left of the 5’ end
of the forward read. This situation can occur when a very short fragment is sequenced.
The 3’ overhang of the reverse read is not included in the merged sequence. The oppo-
site option is the --fastq_nostagger option. The default is to discard staggered pairs.
--fastq_ascii positive integer
Define the ASCII character number used as the basis for the FASTQ quality score. The
default is 33, which is used by the Sanger / Illumina 1.8+ FASTQ format (phred+33).
The value 64 is used by the Solexa, Illumina 1.3+ and Illumina 1.5+ formats
(phred+64). Only 33 and 64 are valid arguments.
--fastq_asciiout positive integer
When using --fastq_convert, --sff_convert or --fasta2fastq, define the ASCII character
number used as the basis for the FASTQ quality score when writing FASTQ output
files. The default is 33. Only 33 and 64 are valid arguments.
--fastq_chars filename
Summarize the composition of sequence and quality strings contained in the input
FASTQ file. For each sequence symbol, --fastq_chars gives the number of occurrences
of the symbol, its relative frequency and the length of the longest run of that symbol.
For each character present in the quality strings, --fastq_chars gives the ASCII value of
the character, its relative frequency, and the number of times a k-mer of that character
appears at the end of quality strings. The length of the k-mer can be set using
--fastq_tail (4 by default). The command --fastq_chars tries to automatically detect the
quality encoding (Solexa, Illumina 1.3+, Illumina 1.5+ or Illumina 1.8+/Sanger) by an-
alyzing the range of observed quality score values. In case of success, --fastq_chars
suggests values for the --fastq_ascii (33 or 64), --fastq_qmin and --fastq_qmax options
to be used with the other commands that require a FASTQ input file.
--fastq_convert filename
Convert between the different variants of the FASTQ file format. The quality encoding
of the input file must be specified with the --fastq_ascii option (either 33 or 64, the de-
fault is 33), and the output quality encoding must be specified with the --fastq_asciiout
option (default 33). The minimum and maximum output quality scores may be limited
using the --fastq_qminout and --fastq_qmaxout options. The output file is specified
with the --fastqout option.
--fastq_eeout
When using --fastq_filter, --fastx_filter or --fastq_mergepairs, include the number of
expected errors (ee) in the sequence header of FASTQ and FASTA files. This option is
a synonym of the --eeout option. Use the --xee option to remove this information from
headers.
--fastq_eestats filename
Analyze a FASTQ file and report statistics on the distributions of quality scores, error
probabilities and expected accumulated errors. The report, a table of 21 tab-separated
columns, is written to the file specified with the --output option. The first column corre-
sponds to the position in the reads (Pos). The second and third columns correspond to
the number of reads (Reads) and percentage of reads (PctRecs) that include this posi-
tion. The remaining columns include information about the distribution of quality
scores in this position (Q), error probabilities in this position (Pe), and finally the ex-
pected number of accumulated errors from the beginning of the reads and until the cur-
rent position (EE). For each of the Q, Pe and EE distributions, the following statistics
are included: minimum value (Min), lower quartile (Low), median (Med), mean
(Mean), upper quartile (Hi), and maximum value (Max). The quality encoding and the
range of quality values may be specified with --fastq_ascii --fastq_qmin and
--fastq_qmax.
--fastq_eestats2 filename
Analyze the specified FASTQ file and report statistics on the number of sequences that
would be retained at a combination of selected cutoffs for length truncation and maxi-
mum expected errors, that could potentially be used as arguments to the --fastq_trun-
clen and --fastq_maxee options to the --fastq_filter command. The result, a table of
two or more columns, is written to the file specified with the --output option. There is a
line for each length truncation cutoff. The first column on each line contains the se-
lected truncation length, while the following columns contain the number of sequences
and, in parenthesis, the percentage of sequences that would be retained at the selected
EE levels. The truncation length cutoffs may be specified with the --length_cutoffs op-
tion and requires a list of three comma-separated integers indicating the shortest cutoff,
the longest cutoff, and the increment between cutoffs. The longest cutoff may be speci-
fied with a star (*) which indicates that the limit is equal to the longest sequence in the
input file. The default setting is "50,*,50" meaning that truncation lengths of 50, 100,
150 and so on up to the longest sequence length should be used. The maximum ex-
pected error (EE) cutoffs may be specified with the --ee_cutoffs option which requires
a comma-separated list of floating point numbers as its argument. The default setting is
"0.5,1.0,2.0" that indicates that expected error levels of 0.5, 1.0 and 2.0 should be used.
--fastq_filter filename
Trim and/or filter sequences in the given FASTQ file. Similar to the --fastx_filter com-
mand, but works only on FASTQ files. See --fastx_filter for details.
--fastq_join filename
Join paired-end sequence reads into one sequence and add a gap between them using a
padding sequence. The sequences are not merged as with the fastq_mergepairs com-
mand, but simply joined with a gap. The forward reads are specified as the argument to
this option and the reverse reads are specified with the --reverse option. The resulting
sequences consist of the forward read, the padding sequence and the reverse comple-
ment of the reverse read. The padding sequence is specified with the --join_padgap op-
tion and the padding quality is specified with the --join_padgapq option. The default
padding sequence string is NNNNNNNN and the default padding quality string is IIIII-
III, corresponding to a base quality score of 40 (a very high quality score with error
probability 0.0001). The joined sequences are output to the file(s) specified with the
--fastaout or --fastqout options.
--fastq_maxdiffs positive integer
When using --fastq_mergepairs, specify the maximum number of non-matching nu-
cleotides allowed in the overlap region. That option has a strong influence on the merg-
ing success rate. The default value is 10.
--fastq_maxdiffpct real
When using --fastq_mergepairs, specify the maximum percentage of non-matching nu-
cleotides allowed in the overlap region. The default value is 100.0%. There are other
more sophisticated rules in the merging algorithm that will discard read pairs with a
high fraction of mismatches.
--fastq_maxee real
When using --fastq_filter, --fastq_mergepairs or --fastx_filter, discard sequences with
an expected error greater than the specified number (value ranging from 0.0 to infinity).
For a given sequence, the expected error is the sum of error probabilities for all the po-
sitions in the sequence. Since error probabilities can be small but not null, the expected
error is always greater than zero, and at most equal to the length of the sequence when
Using the expected error as the lambda parameter in the Poisson distribution, it is pos-
sible to compute the probability of observing k errors. For instance, a read with an ex-
pected error of 1.0 has:
- 36.8% chance of having zero error,
- 36.8% chance of having one error,
- 18.4% chance of having two errors,
- 6.1% chance of having three errors,
- 1.5% chance of having four errors,
- 0.3% chance of having five errors,
- etc.
--fastq_maxee_rate real
When using --fastq_filter or --fastx_filter, discard sequences with an average expected er-
ror greater than the specified number (value ranging from 0.0 to 1.0 included). For a
given sequence, the average expected error is the sum of error probabilities for all the po-
sitions in the sequence, divided by the length of the sequence.
--fastq_maxlen positive integer
When using --fastq_filter, --fastq_mergepairs or --fastx_filter, discard sequences with
more than the specified number of bases.
--fastq_maxmergelen positive integer
When using --fastq_mergepairs, specify the maximum length of the merged sequence
(default is 1,000,000).
--fastq_maxns positive integer
When using --fastq_filter, --fastq_mergepairs or --fastx_filter, discard sequences with
more than the specified number of N’s.
--fastq_mergepairs filename
Merge paired-end sequence reads into one sequence. The forward reads are specified as
the argument to this option and the reverse reads are specified with the --reverse option.
Reads with the same index/position in the forward and reverse files are considered to
form a pair, even if their labels are different. Thus, forward and reverse reads must appear
in the same order and total number in both files. A warning is emitted if the forward and
reverse files contain different numbers of reads. The merged sequences are written to the
file(s) specified with the --fastaout or --fastqout options. The non-merged reads can be
output to the files specified with the --fastaout_notmerged_fwd, --fastaout_not-
merged_rev, --fastqout_notmerged_fwd and --fastqout_notmerged_rev options. Statistics
may be output to the file specified with the --eetabbedout option. Sequences are truncated
as specified with the --fastq_truncqual option to remove low-quality bases in the 3’ end.
Sequences shorter than specified with --fastq_minlen (after truncation) are discarded (1
by default). Sequences with too many ambiguous bases (N’s), as specified with the
--fastq_maxns are also discarded (no limit by default). Staggered reads are not merged
unless the --fastq_allowmergestagger option is specified. The minimum length of the
overlap region between the reads may be specified with the --fastq_minovlen option (at
least 5, default 10). The overlap region may not include more mismatches than specified
with the --fastq_maxdiffs option (10 by default) or a higher percentage of mismatches
than specified with the --fastq_maxdiffpct option (100.0% by default), otherwise the read
pair is discarded. Additional rules will avoid merging of reads that cannot be aligned reli-
ably and unambiguously. The minimum and maximum length of the merged sequence
may be specified with the --fastq_minmergelen and --fastq_maxmergelen options, respec-
tively. The quality value limits for output files may be specified with the --fastq_qminout
and --fastq_qmaxout options, but they apply only to the merged region. Other relevant
options are: --fastq_ascii, --fastq_maxee, --fastq_nostagger, --fastq_qmax, --fastq_qmin,
and --label_suffix.
--fastq_minlen positive integer
When using --fastq_filter, --fastq_mergepairs or --fastx_filter, discard input sequences
with less than the specified number of bases (default 1).
--fastq_minmergelen positive integer
When using --fastq_mergepairs, specify the minimum length of the merged sequence.
The default is 1.
--fastq_minovlen positive integer
When using --fastq_mergepairs, specify the minimum overlap between the merged reads.
The default is 10. Must be at least 5.
--fastq_nostagger
When using --fastq_mergepairs, forbid the merging of staggered read pairs. This is the
default behaviour of --fastq_mergepairs. To change that behaviour, see the --fastq_al-
lowmergestagger option.
--fastq_qmax positive integer
Specify the maximum quality score accepted when reading FASTQ files. The default is
41, which is usual for recent Sanger/Illumina 1.8+ files.
--fastq_qmaxout positive integer
When using --fastq_mergepairs, --fastq_convert, --sff_convert or --fasta2fastq, specify the
maximum quality score used when writing FASTQ files. For the --fasta2fastq command,
the value specified here is the fake quality score used for the FASTQ output file. The de-
fault is 41, which is usual for recent Sanger/Illumina 1.8+ files. Older formats may use a
maximum quality score of 40. The limit only applies to the merged region when using
--fastq_mergepairs.
--fastq_qmin positive integer
Specify the minimum quality score accepted for FASTQ files. The default is 0, which is
usual for recent Sanger/Illumina 1.8+ files. Older formats may use scores between -5 and
2.
--fastq_qminout positive integer
When using --fastq_mergepairs, --fastq_convert or --sff_convert, specify the minimum
quality score used when writing FASTQ files. The default is 0, which is usual for
Sanger/Illumina 1.8+ files. Older versions of the format may use scores between -5 and 2.
The limit applies only to the merged region when using --fastq_mergepairs.
--fastq_stats filename
Analyze a FASTQ file and report the number of reads it contains. The quality encoding
and the range of quality values may be specified with --fastq_ascii --fastq_qmin and
--fastq_qmax. That command requires the --log option and outputs the following detailed
statistics on read length, quality score, length vs. quality distributions, and length / quality
filtering:
Read length distribution:
1. L: read length.
2. N: number of reads.
3. Pct: fraction of reads with this length.
4: AccPct: fraction of reads with this length or longer.
--fastx_revcomp filename
Reverse-complement the sequences in the given FASTA or FASTQ file to a file specified
with the --fastaout and/or --fastqout options. If the input file is in FASTA format, the out-
put can not be written back to a FASTQ file due to missing base quality scores.
--join_padgap string
When running --fastq_join, use the string as a sequence padding string. The default is
NNNNNNNN (8 N’s).
--join_padgapq string
When running --fastq_join, use the string as a quality padding string. The default is a
string of I’s equal in length to the sequence padding string. The letter I corresponds to a
base quality score of 40 indicating a very high quality base with error probability of
0.0001.
--lengthout
Write sequence length information to the output files in FASTA or FASTQ format by
adding a ";length=integer" attribute in the header.
--maxsize positive integer
When using --fastq_filter or --fastx_filter, discard sequences with an abundance higher
than the specified value.
--minsize positive integer
When using --fastq_filter or --fastx_filter, discard sequences with an abundance lower
than the specified value.
--output filename
When using --fastq_eestats or --fastq_eestats2, write tabulated results to filename. See
--fastq_eestats’s and --fastq_eestats2’s documentation for a complete description of the
table.
--relabel_keep
When using --relabel, keep the old identifier in the header after a space.
--relabel string
Please see the description of the same option under Chimera detection for details.
--relabel_md5
Please see the description of the same option under Chimera detection for details.
--relabel_self
Please see the description of the same option under Chimera detection for details.
--relabel_sha1
Please see the description of the same option under Chimera detection for details.
--reverse filename
When using --fastq_filter, --fastx_filter, --fastq_mergepairs or --fastq_join, specify the
FASTQ file containing containing the reverse reads.
--sff_convert filename
Convert the given SFF file to FASTQ. The FASTQ output file is specified with the
--fastqout option. The sequence may be clipped as specified in the SFF file if the option
--sff_clip is specified, otherwise no clipping occurs. Bases that would have been clipped
are converted to lower case, while the rest is in upper case. The output quality encoding
may be specified with the --fastq_asciiout option (default 33). The minimum and maxi-
mum output quality scores may be limited using the --fastq_qminout and --fastq_qmax-
out options.
--sff_clip
Specifies that the sequences converted by the --sff_convert command should be clipped in
both ends as indicated in the SFF file. By default no clipping is performed.
--xlength
Strip header attribute ";length=integer" from input sequences. This attribute is added to
output sequences by the --lengthout option.
--xsize Strip abundance information from the headers when writing the output file.
--xee Strip information about expected errors (ee) from the output file headers. This informa-
tion is added by the --fastq_eeout and --eeout options.
Masking options:
An input sequence can be composed of lower- or uppercase letters. When soft masking is speci-
fied, lower case letters are treated as symbols that should be masked. Otherwise the case of the in-
put sequences is ignored.
Masking is performed by the commands for chimera detection (uchime_denovo, uchime_ref),
clustering (cluster_fast, cluster_smallmem, cluster_size), masking (maskfasta, fastx_mask), pair-
wise alignment (allpairs_global) and searching (search_exact, usearch_global).
Masking is usually specified with the --qmask option, while the --dbmask option is used for the
database sequences specified with the --db option with the --usearch_global, --search_exact and
--uchime_ref commands.
The argument to the --qmask and --dbmask option may be none, soft or dust. If the argument is
none, the no masking is performed. If the argument is soft the lower case symbols are masked. Fi-
nally, if the argument is dust, the sequence is masked using the DUST algorithm by Tatusov and
Lipman to mask low-complexity regions.
If the --hardmask option is specified, all masked regions are converted to N’s, otherwise masked
regions are indicated by lower case letters.
If any sequence is masked, the masked version of the sequence (with lower case letters or N’s) is
used in all output files. Otherwise the sequence is unmodified. The exception is the sequences in
the output file specified with the --uchimealns option, where the input sequences are converted to
upper case first and lower case letters indicate disagreement between the aligned sequences.
The --qmask option (or --dbmask for database sequences) may be combined with the --hardmask
option. The results of using the none, dust or soft argument to --qmask or --dbmask are presented
below, assuming each input sequence contains both lower and uppercase symbols.
Results if the --hardmask option is off (default):
none: no masking, all symbols used, no change
dust: masked symbols lowercased, rest uppercased
soft: lowercase symbols masked, no case changes
Results if the --hardmask option is on:
none: no masking, all symbols used, no change
dust: masked symbols changed to Ns, rest unchanged
soft: lowercase symbols masked and changed to Ns
When a sequence region is masked, words in the region are not included in the indices used in the
heuristic search algorithm. In all other aspects, the region is treated as other regions.
Regions in sequences that are hardmasked (with N’s) have a zero alignment score and do not con-
tribute to an alignment.
--fastaout filename
Write the masked sequences to filename, in fasta format. Applies only to the
--fastx_mask command.
--fastqout filename
Write the masked sequences to filename, in fastq format. Applies only to the
--fastx_mask command.
--fastx_mask filename
Mask regions in sequences contained in the specified fasta or fastq file. The default is
to mask using DUST (use --qmask to modify that behaviour). The output files are spec-
ified with the --fastaout and --fastqout options. The minimum and maximum percent-
age of unmasked residues may be specified with the --min_unmasked_pct and
--max_unmasked_pct options, respectively.
--hardmask
Symbols in masked regions are replaced by N’s. The default is to replace the masked
regions by lower case letters.
--maskfasta filename
Mask regions in sequences contained in the fasta file filename. The default is to mask
using dust (use --qmask to modify that behaviour). The output file is specified with the
--output option. This command is depreciated, please use --fastx_mask instead.
--max_unmasked_pct real
Discard sequences with more than the specified maximum percentage of unmasked
residues. Works only with --fastx_mask.
--min_unmasked_pct real
Discard sequences with less than the specified minimum percentage of unmasked
residues. Works only with --fastx_mask.
--output filename
Write the masked sequences to filename, in fasta format. Applies only to the
--mask_fasta command.
--qmask none|dust|soft
If the argument is dust, mask regions in sequences using the DUST algorithm that de-
tects simple repeats and low-complexity regions. This is the default. If the argument is
soft, mask the lower case letters in the input sequence. If the argument is none, do not
mask.
Orienting options:
The --orient command can be used to orient the sequences in a given file in either the forward or
the reverse complementary direction based on a reference database specified with the --db option.
The two strands of each input sequence are compared to the reference database using nucleotide
words. If one of the strands shares many more words with at least one sequence in the database
than the other, that strand is chosen. The correctly oriented sequences may be written to a FASTA
file specified with the --fastaout, and to a FASTQ file specified with the --fastqout option (as long
as the input was also in FASTQ format). If the result is uncertain, because the number of matching
words is too similar, the original sequence is written to the file specified with the --notmatched op-
tion. The results may also be written to a tab-delimited text file specified with the --tabbedout op-
tion. This file will contain the query label, the direction (+, - or ?), the number of matching words
on the forward strand, and the number of matching words on the reverse complementary strand.
By default, a word length of 12 is used for this command. The word length may be adjusted using
the --wordlength option. There has to be at least 4 times as many matches on one strand than the
other for a strand to be selected. In addition to the common options, the following options may
also be specified for this command: --dbmask, --qmask, --relabel, --relabel_keep, --relabel_md5,
--relabel_self, --relabel_sha1, --sizein, and --sizeout.
--db filename
Read the reference database from the given file. It may be in FASTA, FASTQ or UDB
format. If an UDB file is used it should have been created with a wordlength of 12.
--fastaout filename
Write the correctly oriented sequences to filename, in fasta format.
--fastqout filename
Write the correctly oriented sequences to filename, in fastq format.
--notmatched filename
Write the sequences with undetermined direction to filename, in the original format.
--orient filename
Orient the sequences in the given file.
--tabbedout filename
Write the resuls to a tab-delimited text file with the specified filename. This file will
contain the query label, the direction (+, - or ?), the number of matching words on the
forward strand, and the number of matching words on the reverse complementary
strand.
Pairwise alignment options:
The results of the n * (n-1) / 2 pairwise alignments are written to the result files specified with --al-
nout, --blast6out, --fastapairs --matched, --notmatched, --qsegout, --samout, --tsegout, --uc or
--userout (see Searching section below). Specify either the --acceptall option to output all pairwise
alignments, or specify an identity level with --id to discard weak alignments. Most other accept/re-
ject options (see Searching options below) may also be used. Sequences are aligned on their plus
strand only. Masking is performed as usual and specified with --qmask and --hardmask.
--acceptall
Write the results of all alignments to output files. This option overrides all other ac-
cept/reject options (including --id).
--allpairs_global filename
Perform optimal global pairwise alignments of the fasta sequences contained in file-
name. Each sequence is compared to all sequencs that come after it in the file, resulting
in a total of n * (n-1) / 2 pairwise alignments, where n is the total number of sequences.
This command is multi-threaded.
--id real Reject the sequence match if the pairwise identity is lower than real (value ranging
from 0.0 to 1.0 included).
--threads positive integer
Number of computation threads to use (1 to 1024). The number of threads should be
lesser or equal to the number of available CPU cores. The default is to use all available
resources and to launch one thread per logical core.
--uc filename
Output pairwise alignment results in filename using a tab-separated uclust-like format
with 10 columns. Each sequence is compared to all other sequences, and all hits (--ac-
ceptall) or only some hits (--id float) are reported, with one pairwise comparison per
line:
1. Record type, always set to ’H’.
2. Ordinal number of the target sequence (based on input order, starting
from zero).
3. Sequence length.
4. Percentage of similarity with the target sequence.
5. Match orientation, always set to ’+’.
6. Not used, always set to zero.
--blast6out filename
Write search results to filename using a blast-like tab-separated format of twelve fields
(listed below), with one line per query-target matching (or lack of matching if --out-
put_no_hits is used). Warning, vsearch uses global pairwise alignments, not blast’s
seed-and-extend algorithm. Therefore, some common blast output values (alignment
start and end, evalue, bit score) are reported differently. Output order may vary when
using multiple threads. A similar output can be obtain with --userout filename and
--userfields query+target+id+alnlen+mism+opens+qlo+qhi+tlo+thi+evalue+bits. A
complete list and description is available in the section ’Userfields’ of this manual.
1. query: query label.
2. target: target (database sequence) label. The field is set to ’*’ if there is
no alignment.
3. id: percentage of identity (real value ranging from 0.0 to 100.0). The per-
centage identity is defined as 100 * (matching columns) / (alignment
length - terminal gaps). See fields id0 to id4 for other definitions.
4. alnlen: length of the query-target alignment (number of columns). The
field is set to 0 if there is no alignment.
5. mism: number of mismatches in the alignment (zero or positive integer
value).
6. opens: number of columns containing a gap opening (zero or positive in-
teger value, excluding terminal gaps).
7. qlo: first nucleotide of the query aligned with the target. Always equal to
1 if there is an alignment, 0 otherwise (see qilo to ignore initial gaps).
8. qhi: last nucleotide of the query aligned with the target. Always equal to
the length of the pairwise alignment, 0 otherwise (see qihi to ignore ter-
minal gaps).
9. tlo: first nucleotide of the target aligned with the query. Always equal to
1 if there is an alignment, 0 otherwise (see tilo to ignore initial gaps).
10. thi: last nucleotide of the target aligned with the query. Always equal to
the length of the pairwise alignment, 0 otherwise (see tihi to ignore ter-
minal gaps).
11. evalue: expectancy-value (not computed for nucleotide alignments). Al-
ways set to -1.
12. bits: bit score (not computed for nucleotide alignments). Always set to 0.
--db filename
Compare query sequences (specified with --usearch_global) to the target sequences
contained in filename in FASTA or FASTQ format, using global pairwise alignment.
Alternatively, the name of a preformatted UDB database created using the
makeudb_usearch command (see below) may be specified.
--dbmask none|dust|soft
Mask regions in the target database sequences using the dust method or the soft
method, or do not mask (none). Warning, when using soft masking search commands
become case sensitive. The default is to mask using dust.
--dbmatched filename
Write database target sequences matching at least one query sequence to filename, in
fasta format. If the option --sizeout is used, the number of queries that matched each
target sequence is indicated using the pattern ";size=integer;".
--dbnotmatched filename
Write database target sequences not matching query sequences to filename, in fasta for-
mat.
--fastapairs filename
Write pairwise alignments of query and target sequences to filename, in fasta format.
--fulldp Dummy option for compatibility with usearch. To maximize search sensitivity, vsearch
uses a 8-way 16-bit SIMD vectorized full dynamic programming algorithm (Needle-
man-Wunsch), whether or not --fulldp is specified.
--gapext string
Set penalties for a gap extension. See --gapopen for a complete description of the
penalty declaration system. The default is to initialize the six gap extending penalties
using a penalty of 2 for extending internal gaps and a penalty of 1 for extending termi-
nal gaps, in both query and target sequences (i.e. 2I/1E).
--gapopen string
Set penalties for a gap opening. A gap opening can occur in six different contexts: in
the query (Q) or in the target (T) sequence, at the left (L) or right (R) extremity of the
sequence, or inside the sequence (I). Sequence symbols (Q and T) can be combined
with location symbols (L, I, and R), and numerical values to declare penalties for all
possible contexts: aQL/bQI/cQR/dTL/eTI/fTR, where abcdef are zero or positive inte-
gers, and ’/’ is used as a separator.
To simplify declarations, the location symbols (L, I, and R) can be combined, the sym-
bol (E) can be used to treat both extremities (L and R) equally, and the symbols Q and
T can be omitted to treat query and target sequences equally. For instance, the default is
to declare a penalty of 20 for opening internal gaps and a penalty of 2 for opening ter-
minal gaps (left or right), in both query and target sequences (i.e. 20I/2E). If only a nu-
merical value is given, without any sequence or location symbol, then the penalty ap-
plies to all gap openings. To forbid gap-opening, an infinite penalty value can be de-
clared with the symbol ’*’. To use vsearch as a semi-global aligner, a null-penalty can
be applied to the left (L) or right (R) gaps.
vsearch always initializes the six gap opening penalties using the default parameters
(20I/2E). The user is then free to declare only the values he/she wants to modify. The
string is scanned from left to right, accepted symbols are (0123456789/LIREQT*), and
later values override previous values.
Please note that vsearch, in contrast to usearch, only allows integer gap penalties. Be-
cause the lowest gap penalties are 0.5 by default in usearch, all default scores and gap
penalties in vsearch have been doubled to maintain equivalent penalties and to produce
identical alignments.
--hardmask
Mask sequence regions by replacing them with Ns instead of setting them to lower case
as is the default. For more information, please see the Masking section.
--id real Reject the sequence match if the pairwise identity is lower than real (value ranging
from 0.0 to 1.0 included). The search process sorts target sequences by decreasing
number of k-mers they have in common with the query sequence, using that informa-
tion as a proxy for sequence similarity. That efficient pre-filtering also prevents pair-
wise alignments with very short, or with weakly matching targets, as there needs to be
by default at least 12 shared k-mers to start the pairwise alignment, and at least one out
of every 16 k-mers from the query needs to match the target (see options --wordlength
and --minwordmatches to change that behaviour). Consequently, using values lower
than --id 0.5 is not likely to capture more weakly matching targets. The pairwise iden-
tity is by default defined as the number of (matching columns) / (alignment length - ter-
minal gaps). That definition can be modified by --iddef.
--iddef 0|1|2|3|4
Change the pairwise identity definition used in --id. Values accepted are:
0. CD-HIT definition: (matching columns) / (shortest sequence length).
1. edit distance: (matching columns) / (alignment length).
2. edit distance excluding terminal gaps (default definition for --id).
3. Marine Biological Lab definition counting each gap opening (internal or
terminal) as a single mismatch, whether or not the gap was extended: 1.0
- [(mismatches + gap openings)/(longest sequence length)]
4. BLAST definition, equivalent to --iddef 1 for global pairwise alignments.
The option --userfields accepts the fields id0 to id4, in addition to the field id, to report
the pairwise identity values corresponding to the different definitions.
--idprefix positive integer
Reject the sequence match if the first integer nucleotides of the target do not match the
query.
--idsuffix positive integer
Reject the sequence match if the last integer nucleotides of the target do not match the
query.
--lca_cutoff real
Adjust the fraction of matching hits required for the last common ancestor (LCA) out-
put with the --lcaout option during searches. The default value is 1.0 which requires all
hits to match at each taxonomic rank for that rank to be included. If a lower cutoff
value is used, e.g. 0.95, a small fraction of non-matching hits are allowed while that
rank will still be reported. The argument to this option must be larger than 0.5, but not
larger than 1.0.
--lcaout filename
Output last common ancestor (LCA) information about the hits of each query to a text
file in a tab-separated format. The first column contains the query id, while the second
column contains the taxonomic information. The headers of the sequences in the data-
base must contain taxonomic information in the same format as used with the --sintax
command, e.g. "tax=k:Archaea,p:Euryarchaeota,c:Halobacteria". Only the initial parts
of the taxonomy that are common to a large fraction of the hits of each query will be
output. It is necessary to set the --maxaccepts option to a value different from 1 for this
information to be useful. The --top_hits_only option may also be useful. The fraction
of matching hits required may be adjusted by the --lca_cutoff option (default 1.0).
--leftjust Reject the sequence match if the pairwise alignment begins with gaps.
--lengthout
Write sequence length information to the output files in FASTA format by adding a
";length=integer" attribute in the header.
--match integer
Score assigned to a match (i.e. identical nucleotides) in the pairwise alignment. The de-
fault value is 2.
--matched filename
Write query sequences matching database target sequences to filename, in fasta format.
--maxaccepts positive integer
Maximum number of matching target sequences to accept before stopping the search
for a given query. The default value is 1. This option works in pair with --maxrejects.
The search process sorts target sequences by decreasing number of k-mers they have in
common with the query sequence, using that information as a proxy for sequence
similarity. After pairwise alignments, if the first target sequence passes the acceptation
criteria, it is accepted as best hit and the search process stops for that query. If --maxac-
cepts is set to a higher value, more matching targets are accepted. If --maxaccepts and
--maxrejects are both set to 0, the complete database is searched. See --maxhits option
for a control on the number of hits reported per query when search is done on both
strands.
--maxdiffs positive integer
Reject the sequence match if the alignment contains at least integer substitutions, inser-
tions or deletions.
--maxgaps positive integer
Reject the sequence match if the alignment contains at least integer insertions or dele-
tions.
--maxhits non-negative integer
Maximum number of hits to show once the search is terminated for a given query (hits
are sorted by decreasing identity). When searching only on the plus strand (default situ-
ation, see --strand), the number of matching targets (--maxaccepts) and the number of
hits (--maxhits) are the same. However, when searching on both strands, there could be
two hits per target (one per strand): --maxhits then controls the overall number of re-
ported hits per query. Unlimited by default or if the argument is zero. This option ap-
plies to --alnout, --blast6out, --fastapairs, --samout, --uc, or --userout output files.
--maxid real
Reject the sequence match if the percentage of identity between the two sequences is
greater than real.
--maxqsize positive integer
Reject query sequences with an abundance greater than integer.
--maxqt real
Reject if the query/target sequence length ratio is greater than real.
--maxrejects positive integer
Maximum number of non-matching target sequences to consider before stopping the
search for a given query. The default value is 32. This option works in pair with --max-
accepts. The search process sorts target sequences by decreasing number of k-mers they
have in common with the query sequence, using that information as a proxy for se-
quence similarity. After pairwise alignments, if none of the first 32 examined target se-
quences pass the acceptation criteria, the search process stops for that query (no hit). If
--maxrejects is set to a higher value, more target sequences are considered. If --maxac-
cepts and --maxrejects are both set to 0, the complete database is searched.
--maxsizeratio real
Reject if the query/target abundance ratio is greater than real.
--maxsl real
Reject if the shorter/longer sequence length ratio is greater than real.
--maxsubs positive integer
Reject the sequence match if the pairwise alignment contains more than integer substi-
tutions.
--mid real
Reject the sequence match if the percentage of identity is lower than real (ignoring all
gaps, internal and terminal).
--mincols positive integer
Reject the sequence match if the alignment length is shorter than integer.
--minqt real
Reject if the query/target sequence length ratio is lower than real.
--minsizeratio real
Reject if the query/target abundance ratio is lower than real.
--minsl real
Reject if the shorter/longer sequence length ratio is lower than real.
--mintsize positive integer
Reject target sequences with an abundance lower than integer.
--minwordmatches non-negative integer
Minimum number of k-mers or word matches required for a sequence to be considered
further. Default value is 12 for the default word length 8. For word lengths 3-15, the de-
fault minimum word matches are 18, 17, 16, 15, 14, 12, 11, 10, 9, 8, 7, 5 and 3, respec-
tively. If the query sequence has fewer unique words than the number specified, all
words in the query must match. If the argument is 0, no word matches are required.
--mismatch integer
Score assigned to a mismatch (i.e. different nucleotides) in the pairwise alignment. The
default value is -4.
--mothur_shared_out filename
Write search results to an OTU table in the mothur ’shared’ tab-separated plain text file
format. The query file contains the samples, while the database file contains the OTUs.
Sample and OTU identifiers are extracted from the header of these sequences. See the
--otutabout option in the Clustering section for further details.
--notmatched filename
Write query sequences not matching database target sequences to filename, in fasta for-
mat.
--otutabout filename
Write search results to an OTU table in the classic tab-separated plain text format. The
query file contains the samples, while the database file contains the OTUs. Sample and
OTU identifiers are extracted from the header of these sequences (--sample option). See
the --mothur_shared_out option in the Clustering section for further details.
--output_no_hits
Write both matching and non-matching queries to --alnout, --blast6out, --samout or
--userout output files. Non-matching queries are labelled ’No hits’ in --alnout files.
--pattern string
This option is ignored. It is provided for compatibility with usearch.
--qmask none|dust|soft
Mask regions in the query sequences using the dust or the soft algorithms, or do not
mask (none). Warning, when using soft masking search commands become case sensi-
tive. The default is to mask using dust.
--qsegout filename
Write the aligned part of each query sequence to filename in FASTA format.
--query_cov real
Reject if the fraction of the query aligned to the target sequence is lower than real
(value ranging from 0.0 to 1.0 included). The query coverage is computed as (matches
+ mismatches) / query sequence length. Internal or terminal gaps are not taken into ac-
count.
--rightjust
Reject the sequence match if the pairwise alignment ends with gaps.
--search_exact filename
Search for exact full-length matches to the query sequences contained in filename in
the database of target sequences (--db). Only 100% exact matches are reported and this
command is much faster than --usearch_global. The --id, --maxaccepts and --maxre-
jects options are ignored, but the rest of the searching options may be specified.
--self Reject the sequence match if the query and target labels are identical.
--selfid Reject the sequence match if the query and target sequences are strictly identical.
--sizeout Add abundance annotations to the output of the option --dbmatched (using the pattern
’;size=integer;’), to report the number of queries that matched each target.
--strand plus|both
When searching for similar sequences, check the plus strand only (default) or check
both strands.
--target_cov real
Reject the sequence match if the fraction of the target sequence aligned to the query se-
quence is lower than real. The target coverage is computed as (matches + mismatches)
/ target sequence length. Internal or terminal gaps are not taken into account.
--top_hits_only
Only the top hits with an equally high percentage of identity between the query and
database sequence sets are written to the output specified with the options --lcaout, --al-
nout, --samout, --userout, --blast6out, --uc, --fastapairs, --matched or --notmatched (but
not --dbmatched and --dbnotmatched). For each query, the top hit is the one presenting
the highest percentage of identity (see the --iddef option to change the way identity is
measured). For a given query, if several top hits present exactly the same percentage of
identity, the number of matching targets reported is controlled by the --maxaccepts
value (1 by default), and the number of hits is controlled by the --maxhits option.
--tsegout filename
Write the aligned part of each target sequence to filename in FASTA format.
--uc filename
Output searching results in filename using a tab-separated uclust-like format with 10
columns. When using the --search_exact command, the table layout is the same than
with the --allpairs_global. When using the --usearch_global command, the table
present two different type of entries: hit (H) or no hit (N). Each query sequence is com-
pared to all other sequences, and the best hit (--maxaccepts 1) or several hits (--maxac-
cepts > 1) are reported (H). Output order may vary when using multiple threads. Col-
umn content varies with the type of entry (H or N):
1. Record type: H, or N (’hit’ or ’no hit’).
2. Ordinal number of the target sequence (based on input order, starting
from zero). Set to ’*’ for N.
3. Sequence length. Set to ’*’ for N.
4. Percentage of similarity with the target sequence. Set to ’*’ for N.
5. Match orientation + or -. . Set to ’.’ for N.
6. Not used, always set to zero for H, or ’*’ for N.
7. Not used, always set to zero for H, or ’*’ for N.
8. Compact representation of the pairwise alignment using the CIGAR for-
mat (Compact Idiosyncratic Gapped Alignment Report): M (match/mis-
match), D (deletion) and I (insertion). The equal sign ’=’ indicates that
the query is identical to the centroid sequence. Set to ’*’ for N.
--relabel_keep
When relabelling, keep the old identifier in the header after a space.
--relabel_md5
Relabel sequences using the MD5 message digest algorithm applied to each sequence.
Former sequence headers are discarded. The sequence is converted to upper case and U
is replaced by T before the digest is computed. The MD5 digest is a cryptographic hash
function designed to minimize the probability that two different inputs gives the same
output, even for very similar, but non-identical inputs. Still, there is always a very
small, but non-zero probability that two different inputs give the same result. The MD5
digest generates a 128-bit (16-byte) digest that is represented by 16 hexadecimal num-
bers (using 32 symbols among 0123456789abcdef). Use --sizeout to conserve the abun-
dance annotations.
--relabel_self
Relabel sequences using the sequence itself as the label.
--relabel_sha1
Relabel sequences using the SHA1 message digest algorithm applied to each sequence.
It is similar to the --relabel_md5 option but uses the SHA1 algorithm instead of the
MD5 algorithm. The SHA1 digest generates a 160-bit (20-byte) result that is repre-
sented by 20 hexadecimal numbers (40 symbols). The probability of a collision (two
non-identical sequences having the same digest) is smaller for the SHA1 algorithm
than it is for the MD5 algorithm. Use --sizeout to conserve the abundance annotations.
--sizeout When using --relabel, --relabel_self, --relabel_md5 or --relabel_sha1, preserve and re-
port abundance annotations to the output fasta file (using the pattern ’;size=integer;’).
--shuffle filename
Pseudo-randomly shuffle the order of sequences contained in filename.
--topn positive integer
Output only the first integer sequences after pseudo-random reordering.
--xlength Strip header attribute ";length=integer" from input sequences. This attribute is added to
output sequences by the --lengthout option.
--xsize Strip abundance information from the headers when writing the output file.
Sorting options:
Fasta entries are sorted by decreasing abundance (--sortbysize) or sequence length (--sort-
bylength). To obtain a stable sorting order, ties are sorted by decreasing abundance (if present) and
label increasing alpha-numerical order (--sortbylength), or just by label increasing alpha-numerical
order (--sortbysize). Label sorting assumes that all sequences have unique labels. The same applies
to the automatic sorting performed during chimera checking (--uchime_denovo), dereplication
(--derep_fulllength), and clustering (--cluster_fast and --cluster_size).
--lengthout
Write sequence length information to the output files in FASTA format by adding a
";length=integer" attribute in the header.
--maxsize positive integer
When using --sortbysize, discard sequences with an abundance value greater than inte-
ger.
--minsize positive integer
When using --sortbysize, discard sequences with an abundance value smaller than inte-
ger.
--output filename
Write the sorted sequences to filename, in fasta format.
--relabel string
Please see the description of the same option under Chimera detection for details.
--relabel_keep
When relabelling, keep the old identifier in the header after a space.
--relabel_md5
Please see the description of the same option under Chimera detection for details.
--relabel_self
Please see the description of the same option under Chimera detection for details.
--relabel_sha1
Please see the description of the same option under Chimera detection for details.
--sizeout When using --relabel, report abundance annotations to the output fasta file (using the
pattern ’;size=integer;’).
--sortbylength filename
Sort by decreasing length the sequences contained in filename. See the general options
--minseqlength and --maxseqlength to eliminate short and long sequences.
--sortbysize filename
Sort by decreasing abundance the sequences contained in filename (missing abundance
values are assumed to be ’;size=1’). See the options --minsize and --maxsize to elimi-
nate rare and dominant sequences.
--topn positive integer
Output only the top integer sequences (i.e. the longest or the most abundant).
--xlength Strip header attribute ";length=integer" from input sequences. This attribute is added to
output sequences by the --lengthout option.
--xsize Strip abundance information from the headers when writing the output file.
Subsampling options:
Subsampling randomly extracts a certain number or a certain percentage of the sequences in the
input file. If the --sizein option is in effect, the abundances of the input sequences is taken into ac-
count and the sampling is performed as if the input sequences were rereplicated, subsampled and
dereplicated before being written to the output file. The extraction is performed as a random sam-
pling with a uniform distribution among the input sequences and is performed without replace-
ment. The input file is specified with the --fastx_subsample option, the output files are specified
with the --fastaout and --fastqout options and the amount of sequences to be sampled is specified
with the --sample_pct or --sample_size options. The sequences not sampled may be written to files
specified with the options --fasta_discarded and --fastq_discarded. The --fastq_ascii, --fastq_qmin
and --fastq_qmax options are also available.
--fastaout filename
Write the sampled sequences to filename, in fasta format.
--fastaout_discarded filename
Write the sequences not sampled to filename, in fasta format.
--fastq_ascii positive integer
Define the ASCII character number used as the basis for the FASTQ quality score. The
default is 33, which is used by the Sanger / Illumina 1.8+ FASTQ format (phred+33).
The value 64 is used by the Solexa, Illumina 1.3+ and Illumina 1.5+ formats
(phred+64). Only 33 and 64 are valid arguments.
--fastq_qmax positive integer
Specify the maximum quality score accepted when reading FASTQ files. The default is
41, which is usual for recent Sanger/Illumina 1.8+ files.
--sizein Take the abundance information of the input file into account, otherwise the abundance
of each sequence is considered to be 1.
--sizeout Write abundance information to the output file.
--xlength Strip header attribute ";length=integer" from input sequences. This attribute is added to
output sequences by the --lengthout option.
--xsize Strip abundance information from the headers when writing the output file.
Taxonomic classification options:
The vsearch command --sintax will classify the input sequences according to the Sintax algorithm
as described by Robert Edgar (2016) in SINTAX: a simple non-Bayesian taxonomy classifier for
16S and ITS sequences, BioRxiv, 074161. Preprint. doi: 10.1101/074161 (link) 〈https://
doi.org/10.1101/074161〉
The name of the fasta file containing the input sequences to be classified is given as an argument to
the --sintax command. The reference sequence database is specified with the --db option. The re-
sults are written in a tab delimited text file whose name is specified with the --tabbedout option.
The --sintax_cutoff option may be used to set a minimum level of bootstrap support for the taxo-
nomic ranks to be reported. The --randseed option may be included to specify a seed for initialisa-
tion of the random number generator used by the algorithm. Please note that when using multiple
threads, the --randseed option may not work as intended, because sequences may be processed in a
random order by different threads. To ensure the same results each time, use a single thread
--threads 1) in combination with a fixed random seed specified with --randseed.
Multithreading is supported. Databases in UDB files are supported. The strand option may be
specified.
The reference database must contain taxonomic information in the header of each sequence in the
form of a string starting with ";tax=" and followed by a comma-separated list of up to nine taxo-
nomic identifiers. Each taxonomic identifier must start with an indication of the rank by one of the
letters d (for domain) k (kingdom), p (phylum), c (class), o (order), f (family), g (genus), s
(species), or t (strain). The letter is followed by a colon (:) and the name of that rank. Commas and
semicolons are not allowed in the name of the rank. Non-ascii characters should be avoided in the
names.
Example:
>X80725_S000004313;tax=d:Bacteria,p:Proteobacteria,c:Gammaproteobacteria,o:Enterobacteri-
ales,f:Enterobacteriaceae,g:Escherichia/Shigella,s:Escherichia_coli,t:str._K-12_substr._MG1655
The option --notrunclabels is turned on by default for this command, allowing spaces in the taxo-
nomic identifiers.
If two sequences in the reference database has equally many kmer matches with the query, the
shortest sequence will be chosen by default. If they are equally long, the sequence appearing first
in the database will be chosen. If the recommended option --sintax_random is specified, sequences
with an equal number of kmer matches will instead be chosen by a random draw.
--db filename
Read the reference sequences from filename, in FASTA, FASTQ or UDB format. These
sequences need to be annotated with taxonomy.
--randseed positive integer
Use integer as seed for the random number generator used in the Sintax algorithm. A
given seed always produces the same output order (useful for replicability). Set to 0 to
use a pseudo-random seed (default behaviour). Does not work correctly with multiple
threads; please use --threads 1 to ensure correct behaviour.
--sintax filename
Read the input sequences from filename, in FASTA or FASTQ format.
--sintax_cutoff real
Specify a minimum level of bootstrap support for the taxonomic ranks that will be in-
cluded in column 4 of the output file. For instance 0.9, corresponding to 90%.
--sintax_random
Break ties between sequences with equally many kmer matches by a random draw.
This option is recommended and may be made the default in the future.
--tabbedout filename
Write the results to filename, in a tab-separated text format. Column 1 contains the
query label. Column 2 contains the predicted taxonomy in the same format as for the
reference data, with bootstrap support indicated in parentheses after each rank. Column
3 contains the strand. If the --sintax_cutoff option is used, the predicted taxonomy will
be repeated in column 4 while omitting the bootstrap values and including only the
ranks with support at or above the threshold.
UDB options:
Databases to be used with the --usearch_global command may be prepared from FASTA files and
stored to a binary UDB formatted file in order to speed up searching. This may be worthwhile
when searching a large database repeatedly. The sequences are indexed and stored in a way that
can be quickly loaded into memory. The commands and options below can be used to create and
inspect UDB files. An UDB file may be specified with the --db option instead of a FASTA format-
ted file with the --usearch_global command.
--dbmask none|dust|soft
Specify the sequence masking method used with the --makeudb_usearch command, ei-
ther none, dust or soft. No masking is performed when none is specified. When dust is
specified, the DUST algorithm will be used for masking low complexity regions (short
repeats and skewed composition). Lower case letters in the input file will be masked
when soft is specified (soft masking).
--hardmask
Mask sequences by replacing letters with N for the --makeudb_usearch command. The
default is to use lower case letters (soft masking).
--makeudb_usearch filename
Create an UDB database file from the FASTA-formatted sequences in the file with the
given filename. The UDB database is written to the file specified with the --output op-
tion.
--output filename
Specify the filename of a FASTA or UDB output file for the --makeudb_usearch or the
--udb2fasta command, respectively.
--udb2fasta filename
Read the UDB database in the file with the given filename and output the sequences in
FASTA format in the file specified by the --output option.
--udbinfo filename
Show information about the UDB database in the file with the given filename.
--udbstats filename
Report statistics about the indexed words in the UDB database in the file with the given
filename.
--wordlength positive integer
Specify the length of the words to be used when creating the UDB database index us-
ing the --makeudb_usearch command. Valid numbers range from 3 to 15. The default is
8.
DELIBERATE CHANGES
If you are a usearch user, our objective is to make you feel at home. That’s why vsearch was designed to
behave like usearch, to some extent. Like any complex software, usearch is not free from quirks and incon-
sistencies. We decided not to reproduce some of them, and for complete transparency, to document here the
deliberate changes we made.
During a search with usearch, when using the options --blast6out and --output_no_hits, for queries with no
match the number of fields reported is 13, where it should be 12. This is corrected in vsearch.
The field raw of the --userfields option is not informative in usearch. This is corrected in vsearch.
The fields qlo, qhi, tlo, thi now have counterparts (qilo, qihi, tilo, tihi) reporting alignment coordinates ig-
noring terminal gaps.
In usearch, when using the option --output_no_hits, queries that receive no match are reported in
--blast6out file, but not in the alignment output file. This is corrected in vsearch.
vsearch introduces a new --cluster_size command that sorts sequences by decreasing abundance before
clustering.
vsearch reintroduces --iddef alternative pairwise identity definitions that were removed from usearch.
vsearch extends the --topn option to sorting commands.
vsearch extends the --sizein option to dereplication (--derep_fulllength) and clustering (--cluster_fast).
vsearch treats T and U as identical nucleotides during dereplication.
vsearch sorting is stabilized by using sequence abundances or sequences labels as secondary or tertiary
keys.
vsearch by default uses the DUST algorithm for masking low-complexity regions. Masking behaviour is
also slightly changed to be more consistent.
NOVELTIES
vsearch introduces new commands and new options not present in usearch 7. They are described in the
’Options’ section of this manual. Here is a short list:
- uchime2_denovo, uchime3_denovo, alignwidth, borderline, fasta_score (chimera checking)
- cluster_size, cluster_unoise, clusterout_id, clusterout_sort, profile (clustering)
- fasta_width, gzip_decompress, bzip2_decompress (general option)
- iddef (clustering, pairwise alignment, searching)
- maxuniquesize (dereplication)
- relabel_md5, relabel_self and relabel_sha1 (chimera detection, dereplication, FASTQ process-
ing, shuffling, sorting)
- shuffle (shuffling)
- fastq_eestats, fastq_eestats2, fastq_maxlen, fastq_truncee (FASTQ processing)
- fastaout_discarded, fastqout_discarded (subsampling)
- rereplicate (dereplication/rereplication)
EXAMPLES
Align all sequences in a database with each other and output all pairwise alignments:
vsearch --allpairs_global database.fas --alnout results.aln --acceptall
Check for the presence of chimeras (de novo); parents should be at least 1.5 times more abundant than
chimeras. Output non-chimeric sequences in fasta format (no wrapping):
vsearch --uchime_denovo queries.fas --abskew 1.5 --nonchimeras results.fas --fasta_width 0
Cluster with a 97% similarity threshold, collect cluster centroids, and write cluster descriptions using a
uclust-like format:
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
(link) 〈https://www.gnu.org/licenses/〉 <https://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 fol-
lowing 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 IM-
PLIED 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 CONSEQUEN-
TIAL 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 DAM-
AGE.
We would like to thank the authors of the following projects for making their source code available:
- vsearch includes code from Google’s CityHash project by Geoff Pike and Jyrki Alakuijala, pro-
viding 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.
- vsearch binaries may include code from the zlib library, copyright Jean-Loup Gailly and Mark
Adler.
- vsearch binaries may include code from the bzip2 library, copyright Julian R. Seward.
SEE ALSO
swipe, an extremely fast pairwise local (Smith-Waterman) database search tool by Torbjørn Rognes, avail-
able at (link) 〈https://github.com/torognes/swipe〉 <https://github.com/torognes/swipe>.
swarm, a fast and accurate amplicon clustering method by Frédéric Mahé and Torbjørn Rognes, available
at (link) 〈https://github.com/torognes/swarm〉 <https://github.com/torognes/swarm>.
VERSION HISTORY
New features and important modifications of vsearch (short lived or minor bug releases may not be men-
tioned):
- fix: memory error (segmentation fault) when using --derep_id and --strand (issue #565),
- fix: --fastq_join now obeys to --quiet and --log options (commit
87f968b09f17c17ebf8db00aebe86e89b13a3948),
- fix: --fastq_join quality padding is now also set to Q40 when quality offset is 64 (commit
be0bf9b48d782286c4ce38f0bf1a4c82bd230250),
- fix: (partial) --fastq_join’s handling of abundance annotations (commit
f2bbcb421dc2f4dfa6603b9f31ec3e4598c1b591),
- improve: additional safeguards to validate input values and to make sure that they are within ac-
ceptable limits. Changes concern options --abskew (commit
a530dd8990f8a05cb25fc0b6a5da5a14d28fbedd) and --fastq_maxdiffs (commit
4b254db7f120bfd49e86185ef3cd9070c236f940),
- improve: code quality (1.3k+ commits, 6k+ clang-tidy warnings eliminated),
- improve: documentation and help messages (issue #568),
- improve: complete refactoring and modernization of a subset of commands (--sortbylength,
--sortbysize, --shuffle, --rereplicate, --cut, --fastq_join, --fasta2fastq, --fastq_chars),
- improve: code-coverage of our test-suite for the above-mentioned commands (1,210 new tests,
4,753 in total)
v2.29.1 released October 24th, 2024
Fix a segmentation fault that could occur during alignment in version 2.29.0, for example with
--uchime_ref. Some improvements to code and documentation.