SeqFu consists of core programs, available as seqfu subcommands, and a set of
utilities with the fu- prefix. Type seqfu alone to list the subcommands, and
seqfu <command> --help for the help of each one. seqfu version prints the version and
seqfu cite the paper.
Basic operations: cat, head, tail, grep, rc
These commands are inspired by the GNU utilities, and all of them can read from the standard input.
seqfu cat reads mixed FASTA and FASTQ files, and can
be forced to write either format. It bundles common manipulations:
- renaming sequences (prefix, suffix, file basename, stripping comments…)
- annotating headers with length, GC content, expected errors or the original name
- filtering by length or expected errors, and trimming bases from either end
seqfu grep extracts records by name, comment or
oligonucleotide. Oligos are searched on both strands, can contain IUPAC degenerate bases
(e.g. primers) and can be matched allowing mismatches. For finer control, use the
by-id,
by-comment and
by-seq selectors.
seqfu head can skip records between the ones it
prints (i.e. print the first N sequences taking one every M), to extract a small subset
that samples deeper into the file.
seqfu rc is unusual in taking as input both files and
sequences typed on the command line, and supports IUPAC degenerate bases.
Getting an idea: view, less, qual, stats, count
seqfu view gives visual feedback on quality values
and on the presence of oligonucleotides, and
seqfu less is a full-screen interactive pager:

seqfu stats prints the number of sequences, total
bases, average length, N50, N75, N90, auN, minimum and maximum length, as TSV, CSV, JSON,
MultiQC or a terminal table:
┌───────────────────────┬───────┬──────────┬────────┬─────┬─────┬─────┬────────┬─────┬─────┐
│ File │ #Seq │ Total bp │ Avg │ N50 │ N75 │ N90 │ auN │ Min │ Max │
├───────────────────────┼───────┼──────────┼────────┼─────┼─────┼─────┼────────┼─────┼─────┤
│ data/illumina_1.fq.gz │ 7 │ 630 │ 90.00 │ 90 │ 90 │ 90 │ 90.00 │ 90 │ 90 │
│ data/filt.fa.gz │ 78730 │ 24299931 │ 308.65 │ 316 │ 316 │ 220 │ 318.44 │ 180 │ 485 │
└───────────────────────┴───────┴──────────┴────────┴─────┴─────┴─────┴────────┴─────┴─────┘
seqfu count counts reads and pairs R1/R2 files
automatically, seqfu qual detects the quality
encoding, and seqfu check validates FASTQ files.
Managing datasets: interleave, deinterleave, lanes, metadata
Interleaving and deinterleaving Illumina paired-end datasets are very common tasks:
seqfu interleave and
seqfu deinterleave do them quickly and
with checks against corrupted pairs.
Multiple lanes are merged with seqfu lanes, and
seqfu metadata writes sample sheets for QIIME 2,
nf-core pipelines, IRIDA and others from a directory of reads.
Sorting and dereplicating
seqfu sort sorts sequences by length.
seqfu derep dereplicates datasets, printing the
number of identical sequences. It also reads that information from its input, so a set of
already dereplicated files can be dereplicated again while keeping track of the original counts.
Everything else
The Tools catalogue lists every command and utility, grouped by task and filterable by input type.