#bioinformatics #noodles #gff

noodles-gff

Generic Feature Format (GFF) reader and writer

56 breaking releases

Uses new Rust 2024

0.57.0 May 6, 2026
0.56.0 Mar 13, 2026
0.55.0 Feb 18, 2026
0.54.0 Dec 11, 2025
0.1.1 Jul 21, 2021

#778 in Biology

Download history 474/week @ 2026-01-26 659/week @ 2026-02-02 761/week @ 2026-02-09 949/week @ 2026-02-16 526/week @ 2026-02-23 1168/week @ 2026-03-02 564/week @ 2026-03-09 793/week @ 2026-03-16 340/week @ 2026-03-23 379/week @ 2026-03-30 529/week @ 2026-04-06 589/week @ 2026-04-13 789/week @ 2026-04-20 814/week @ 2026-04-27 982/week @ 2026-05-04 1123/week @ 2026-05-11

3,796 downloads per month
Used in 53 crates (5 directly)

MIT license

475KB
11K SLoC

noodles-gff handles the reading and writing of the GFF3 format.

GFF (Generic Feature Format) is a text-based format used to represent genomic features.

Examples

Read all records

use noodles_gff as gff;

let mut reader = File::open("annotations.gff3")
    .map(BufReader::new)
    .map(gff::io::Reader::new)?;

for result in reader.record_bufs() {
    let record = result?;
    // ...
}

noodles

crates.io Docs.rs CI status

noodles attempts to provide specification-compliant (when applicable) implementations of libraries for handling various bioinformatics file formats. It currently supports BAM 1.6, BCF 2.2, BED, BGZF, CRAM 3.0/3.1, CSI, FASTA, FASTQ, GFF3, GTF 2.2, htsget 1.3, refget 2.0, SAM 1.6, tabix, and VCF 4.3/4.4.

Usage

noodles is published on crates.io. Early versions can be used in projects, but keep in mind that the API is still considered experimental.

noodles is split into multiple crates by file format. For convenience, a top-level meta crate named noodles can be added to your project's dependency list; and formats, listed as features. For example, to work with the BAM format, add the noodles crate and enable the bam feature.

cargo add noodles --features bam

Each enabled feature can then be imported by its re-exported name, e.g.,

use noodles::bam;

Feature flags

Individual crates may have optional features that can be enabled using feature flags.

  • async: Enables asynchronous I/O with Tokio. (BAM, BCF, BGZF, CRAM, CSI, FASTA, FASTQ, GFF, SAM, tabix, and VCF)
  • libdeflate: Use libdeflate to encode and decode DEFLATE streams. (BGZF and CRAM)

Examples

Each crate may have its own examples directory, and all examples are runnable as an application. After cloning the repository, run cargo run --release --example for a list of available examples. Use the example name as the option argument and append program arguments to the command, e.g.,

cargo run --release --example bam_write > sample.bam
cargo run --release --example bam_read_header sample.bam

Dependencies

~3–4.5MB
~72K SLoC