jellyfish-reader 0.1.0

Pure Rust reader for Jellyfish k-mer counting output files
Documentation

jellyfish-reader

A pure Rust library for reading Jellyfish k-mer counting output files.

Quick Start

cargo add jellyfish-reader
use jellyfish_reader::ReadMerFile;

let reader = ReadMerFile::open("output.jf")?;
for result in reader {
    let (mer, count) = result?;
    println!("{}: {}", mer, count);
}

Features

  • Sequential reading of binary/sorted and text/sorted Jellyfish 2.x files
  • Random-access queries via memory-mapped I/O
  • K-mer type (MerDna) with canonical form, reverse complement, and comparison
  • K-mer extraction from DNA strings (StringMers)
  • Auto-format detection from file headers
  • Pure Rust — no C/C++ dependencies

See docs/usage/ for detailed usage guides, API examples, and rationale.

Compatibility

  • Jellyfish 2.x (current: 2.3.1) — binary/sorted and text/sorted formats
  • Jellyfish 1.x is not supported

License

MIT — see LICENSE for details.

Acknowledgements

This crate reads files produced by Jellyfish, developed by Guillaume Marçais et al. The file format and k-mer encoding are based on the Jellyfish 2.x implementation. See the original repository for the k-mer counting tool itself.

Author

Trent Zeng (@trentzz) — dev@trentz.me