24 releases (14 breaking)

0.15.0 May 8, 2024
0.14.0 Jan 25, 2024
0.13.0 Dec 14, 2023
0.12.0 Jun 15, 2023
0.1.2 Jul 30, 2021

#2954 in Parser implementations

Download history 1016/week @ 2024-07-21 1014/week @ 2024-07-28 2509/week @ 2024-08-04 1822/week @ 2024-08-11 1638/week @ 2024-08-18 1346/week @ 2024-08-25 1532/week @ 2024-09-01 1013/week @ 2024-09-08 872/week @ 2024-09-15 1069/week @ 2024-09-22 1074/week @ 2024-09-29 1644/week @ 2024-10-06 1950/week @ 2024-10-13 1257/week @ 2024-10-20 1308/week @ 2024-10-27 1249/week @ 2024-11-03

5,902 downloads per month
Used in 86 crates (16 directly)

MIT license

27KB
535 lines

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

lib.rs:

noodles-core contains shared structures and behavior among noodles libraries.

Dependencies

~0.6–1MB
~16K SLoC