Open-source project
shenwei356/seqkit avatar
shenwei356/seqkit

SeqKit for Cross-Platform FASTA and FASTQ Processing

A cross-platform and ultrafast toolkit for FASTA/Q file manipulation

1,605 stars189 forksGoMIT

At a glance

What is it?
SeqKit is a Go command-line toolkit for converting, filtering, analyzing, and extracting records from FASTA and FASTQ files. It suits bioinformatics users who want one cross-platform utility with compressed input and output support.
Who is it for?
SeqKit fits users who need repeatable FASTA and FASTQ transformations in scripts, particularly when compressed streams and one executable simplify pipeline integration across systems. It is less suitable for work requiring controls that the documented subcommands do not expose.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Why SeqKit Targets Everyday Sequence File Work

SeqKit addresses a practical gap between reading FASTA or FASTQ in a custom script and assembling several format-specific utilities. The README describes it as a cross-platform toolkit for manipulating sequence files and groups its commands into basic operations and format conversion. The documented command table includes sequence transformation, statistics, subsequence extraction, sliding windows, FASTA indexing, sequence translation, online monitoring, streaming concatenation, and conversions among FASTA, FASTQ, and tabular data.

That scope makes SeqKit most relevant to bioinformaticians, pipeline authors, and researchers who repeatedly filter records, inspect sequence quality, extract regions, convert formats, or concatenate files. A single command-line interface is especially relevant for shell pipelines. SeqKit parses FASTA and FASTQ and accepts gzip, xz, zstd, bzip2, and lz4 compressed standard input and files, so it is intended for processing data without first creating an uncompressed temporary copy.

The project does not present SeqKit as a general workflow engine or sequence assembler. Its documented boundary is sequence-file manipulation. Commands such as `stats` calculate file and sequence properties, while `convert` handles FASTQ quality encoding between Sanger, Solexa, and Illumina. SeqKit can perform individual FASTA and FASTQ operations, but the README does not describe scheduling those operations as a complete analysis workflow.

SeqKit also supports custom sequence IDs through regular expressions and reproducible random operations through a configurable seed in `sample` and `shuffle`. These details address cases where headers do not follow a simple fixed split or where a change in ordering must remain consistent between runs.

SeqKit's Command Architecture and Record Flow

Based on the repository layout, SeqKit is a Go command-line application with its executable entry point under the `seqkit` directory. The `go.mod` file identifies the module as `github.com/shenwei356/seqkit/v2` and includes Cobra for command-line interfaces. This structure fits the README's list of 39 subcommands. Each operation can be exposed as a discrete command while sharing the same FASTA and FASTQ processing foundation.

The data flow starts with FASTA or FASTQ records arriving from standard input, a named input file, or compressed forms of those streams. A selected subcommand transforms, reports on, or converts records, then writes results to standard output or an output file. Compression support covers the same pipeline-oriented access model. This design allows SeqKit commands to sit between other shell tools instead of requiring every intermediate result to be materialized as a plain file.

Some commands expose controls that matter in analysis pipelines. The README identifies configurable random seeds for `sample` and `shuffle`, which can prevent random selection and ordering from changing between runs. Custom sequence ID regular expressions provide a more controlled interpretation of record headers than assuming that every identifier follows one separator convention.

Not every command has the same execution model or strand behavior. According to the command table, `stats` supports multiple threads, as does `scat`. Commands differ in strand sensitivity: `subseq` and `translate` support plus or minus strand handling, `sliding` is limited to the plus strand, and `fa2fq` is listed as plus-strand only. Input types differ too. `fq2fa` accepts FASTQ, while `fa2fq` retrieves corresponding FASTQ records by a FASTA file. Those distinctions should be checked before adding a strand-aware or mixed-format operation to a pipeline.

Installing SeqKit and Running the First Statistics Command

The README documents statically linked binaries for Linux, Windows, and macOS on amd64 and arm64. It says these binaries require no dependency installation, compilation, or configuration. The project download page is the documented source for platform-specific executables.

For environments that already use Conda or Pixi, the documented package installation path is shorter. This command installs SeqKit from the `bioconda` channel:

bash
conda install -c bioconda seqkit

A Pixi global installation uses the same package channel:

bash
pixi global install -c bioconda seqkit

Homebrew is also documented for installations managed through that package manager:

bash
brew install seqkit

After installation, `stats` is a practical first use because the command table identifies it as producing sequence counts, minimum and maximum lengths, N50, Q20 percent, Q30 percent, and other simple statistics. Its documented input is FASTA or FASTQ. Invoke the subcommand as follows:

bash
seqkit stats

SeqKit supports FASTA and FASTQ on standard input, so this invocation can receive a sequence stream from a pipeline or redirected input. The reader should see statistics for that input. The README does not give a complete first-use invocation with captured output, so it does not establish the exact column layout or platform-independent default formatting. The usage guide is the appropriate place to confirm those details before parsing the result automatically.

For an initial pipeline-oriented use, connect a compressed or uncompressed FASTA or FASTQ source to `seqkit stats`. Confirm that records are read, then compare the reported sequence count and length bounds with the source file. This exercises format parsing and input handling without changing biological records.

Format Conversion, Compression, and Pipeline Integration

SeqKit's conversion commands cover several common representation changes. `fq2fa` converts FASTQ to FASTA, while `fx2tab` converts FASTA or FASTQ into tabular output. In the other direction, `tab2fx` converts TSV data into FASTA or FASTQ. The `fa2fq` command is more specialized because it retrieves corresponding FASTQ records by a FASTA file, requiring records to be matched across two inputs rather than merely changing notation.

The `convert` command changes FASTQ quality encoding among Sanger, Solexa, and Illumina schemes. This is important because a conversion that leaves quality scores under the wrong interpretation can change their meaning. SeqKit treats quality encoding as a named command concern instead of leaving users to rewrite conversion logic.

Compression support makes these operations practical for large sequence files, although the README does not document memory use or compression overhead. It lists gzip, xz, zstd, bzip2, and lz4 for compressed standard input, standard output, and files. Bash and Zsh completion are also documented, which helps users discover subcommands and options without retaining every name and option.

Streaming appears in two forms. `scat` provides real-time concatenation and streaming of sequence files and supports multiple threads. It is therefore the documented command for joining streams, rather than assuming that basic conversion commands provide the same behavior. The README does not document rollback, transactional output, or automatic recovery after an interrupted write. Scripts that depend on those properties need another mechanism.

SeqKit's Indexed-Extraction Boundary

The command table identifies a meaningful boundary around FASTA indexing. SeqKit's `faidx` creates a FASTA index and extracts subsequences, and the README says it offers more features than `samtools faidx`. It also marks SeqKit `faidx` as sensitive to plus and minus strands. However, the README does not enumerate those additional features, so an engineering decision should not assume parity or superiority for a particular indexing workflow.

A real alternative for that narrow operation is `samtools faidx`. The approaches differ in context: SeqKit provides FASTA indexing as one subcommand within a broader sequence-manipulation interface, while `samtools faidx` belongs to the separate Samtools command set. The README only states that SeqKit has more features. Its usage documentation must be checked for supported indexing fields, coordinate conventions, update behavior, and reference compatibility before choosing between them.

SeqKit is also the wrong tool when a requirement is outside its documented subcommands. For example, the command table assigns `sliding` to plus-strand extraction only, while `subseq` supports plus or minus strand handling. `fa2fq` is also plus-strand only. Those are concrete boundaries rather than inferred limitations.

The README calls SeqKit "ultrafast" and links to technical details and benchmark pages, but it does not present benchmark commands, datasets, measurements, or comparison results. This review therefore does not attach a speed figure to the project. Validate performance with the record counts, compression formats, and exact operations used by the intended pipeline.

Parallelism should also be checked per command rather than assumed for the entire toolkit. Only `stats` and `scat` are marked as supporting multiple threads in the command table. Other commands leave that column blank, which does not prove their implementation is always single-threaded, but it does prevent treating multithreading as a universal feature.

SeqKit Releases, Go Builds, and MIT Licensing

The repository is not archived, and its last push was on 2026-10-15. The release record also shows v2.14.0 on 2026-09-24, v2.13.0 on 2026-02-27, and v2.12.0 on 2025-12-04. These dated records support recent project activity, but the release list does not promise compatibility across every version or operation.

The root `go.mod` declares Go 1.25.14 and the module path `github.com/shenwei356/seqkit/v2`. The repository's `Dockerfile` defaults `GO_VERSION` to 1.25.5, downloads modules, and builds the `./seqkit` package with `CGO_ENABLED=0`, `-tags netgo`, `-trimpath`, and linker flags. Its final image is based on `scratch` and contains CA certificates plus the `seqkit` executable. The container also sets `/data` as its working directory and `/usr/local/bin/seqkit` as the entrypoint.

This Dockerfile provides a concrete path for containerized use when a small image and a self-contained binary are preferred. It also exposes a version detail that matters for image maintenance: the Go builder and the Go version declared in `go.mod` are not identical. A build using the Dockerfile base therefore needs separate verification if local toolchain compatibility is also expected.

The project is licensed under MIT. That identifier permits use and modification under the terms and conditions in the repository's `LICENSE` file. Organizations still need to retain required notices and comply with the license text. This is not legal advice, and the license file should be reviewed for the complete obligations attached to a particular distribution.

Upgrade cost appears manageable for users of released binaries or packages, but source builds require a compatible Go toolchain. Command behavior can still change between releases, so workflows should pin a SeqKit version and check its release notes before upgrading scripts that consume command output.

Editorial conclusion

SeqKit fits users who need repeatable FASTA and FASTQ transformations in scripts, particularly when compressed streams and one executable simplify pipeline integration across systems. It is less suitable for work requiring controls that the documented subcommands do not expose. Before adoption, verify the relevant command options in the SeqKit usage guide, test a representative compressed input, and confirm that the installed version's output matches what downstream software expects.

Frequently asked questions

How do I install SeqKit?

The README documents installation through platform-specific binaries, Pixi, Conda, or Homebrew. For Conda and Pixi, the package source is the `bioconda` channel.

Which file formats does SeqKit support?

SeqKit supports FASTA and FASTQ across its documented operations. It also supports gzip, xz, zstd, bzip2, and lz4 compressed inputs and outputs, plus TSV for commands such as `tab2fx`.

Can SeqKit reproduce random sampling or shuffling?

The README states that `sample` and `shuffle` support a configurable random seed. This provides a documented mechanism for repeatable random operations.

Does every SeqKit command support multiple threads?

The command table does not claim multithreading across the entire toolkit. It marks `stats` and `scat` as supporting multiple threads, while other commands do not show that support.

Official sources

  1. License: MIT
  2. Project website
  3. README
  4. Releases
  5. shenwei356/seqkit on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/shenwei356-seqkit.svg)](https://hysenlabs.com/projects/shenwei356-seqkit)

Was this useful?