USEARCH manual > commands > sortbylength
sortbylength command
 
See also
  UCLUST sort order

Sort sequences by decreasing length. The output file is specified by the ‑output option. The ‑minseqlength option can be used to specify a minimum length to keep.

The -relabel prefix option can be used to generate sequential labels for the sorted sequences (requires v6.0.235 or later). The output label is prefixN where N=1, 2, 3 etc. If -sizeout is used, a size annotation will be appended to the sequential label.

Example

usearch -sortbylength seqs.fasta -output seqs_sorted.fasta -minseqlength 64

Bug
Produces empty output file if -minseqlength is not specified. Fixed in 6.0.175.