6 releases (breaking)

Uses new Rust 2021

0.6.0 Nov 18, 2021
0.5.0 Nov 11, 2021
0.4.0 Aug 19, 2021
0.3.0 Aug 11, 2021
0.1.0 Jul 14, 2021
Download history 107/week @ 2021-08-10 141/week @ 2021-08-17 50/week @ 2021-08-24 129/week @ 2021-08-31 69/week @ 2021-09-07 78/week @ 2021-09-14 29/week @ 2021-09-21 26/week @ 2021-09-28 37/week @ 2021-10-05 129/week @ 2021-10-12 16/week @ 2021-10-19 71/week @ 2021-10-26 120/week @ 2021-11-02 188/week @ 2021-11-09 67/week @ 2021-11-16 19/week @ 2021-11-23

407 downloads per month
Used in 12 crates (8 directly)

MIT license

61KB
1.5K SLoC

noodles

crates.io Docs.rs CI status

noodles is a library for handling various bioinformatics file formats. It currently includes readers and writers for BAM 1.6, BCF 2.2, BGZF, CRAM 3.0, CSI, FASTA, FASTQ, GFF3, GTF 2.2, SAM 1.6, tabix, and VCF 4.3.

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, enable the bam feature.

noodles = { version = "0.13.0", 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, FASTQ, SAM, tabix, and VCF)
  • libdeflate: Use libdeflate to encode and decode DEFLATE streams. (BGZF)

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

~0.3–1.3MB
~22K SLoC

a