Home Software Services About Contact usearch manual
fastq_mergepairs command

Performs merging of paired reads. (This is sometimes called 'assembly' of paired reads, but I find this term confusing because assembly usually refers to making longer contigs, so I prefer to call it merging).

The FASTQ filename for the forward reads is specified by the -fastq_mergepairs option, and the reverse read filename is specified by the -reverse option. Output files are specified by -fastqout (for FASTQ) and / or -fastaout (for FASTA).

Forward and reverse must be in 1:1 correspondence and must appear in the same order in both files. The labels for the forward and reverse read in a given pair must be identical except for a single position where a '1' appears in the forward read label and a '2' appears in the reverse read label.

See also
 
FASTQ files
  Quality scores
  FASTQ format options
 

Option   Description
fastq_minovlen k   Minimum length of the overlap. Default: no minimum.

Note: overlaps shorter than the -minhsp option will fail to align, so this option also has the effect of imposing a minimum overlap. You should therefore set -minhsp to the shortest overlap that you expect in your data. Values less than 8 may cause performance problems, and may cause spurious overlaps.
 

fastq_minmergelen L   Minimum length of the merged read. Default: no maximum.
 
fastq_maxmergelen L   Maximum length of the merged read. Default: no maximum.
 
fastq_maxdiffs d   Maximum number of mismatches allowed in the overlap region. Default: any number of mismatches allowed.
 
fastq_truncqual q   Truncate the forward and reverse reads at the first Q<=q, if present. This truncation is performed before aligning the pair. With Illumina paired reads, it is recommended to use ‑fastq_trunqual 2 or higher, as low-quality tails will otherwise often cause alignment of the pair to fail. Default: no quality truncation.
 
fastq_minlen L   Minimum length of the forward and reverse read, after truncating per  ‑fastq_truncqual if applicable. Default: no minimum.
 
fastq_allowmergestagger   Allow merge of a pair where the alignment is "staggered" like this:

  --FORWARD
  REVERSE--

By default, pairs with staggered alignments are discarded.
 

Example

   usearch -fastq_mergepairs fwd.fastq -reverse rev.fastq -fastq_truncqual 3 \
    -fastq_maxdiffs 0 -fastqout merged.fastq