11 breaking releases

0.12.0 Jan 25, 2024
0.11.0 Dec 14, 2023
0.10.0 Jun 15, 2023
0.8.0 Mar 3, 2023
0.2.0 Mar 29, 2022

#256 in Biology

Download history 617/week @ 2023-11-04 541/week @ 2023-11-11 550/week @ 2023-11-18 666/week @ 2023-11-25 273/week @ 2023-12-02 385/week @ 2023-12-09 367/week @ 2023-12-16 282/week @ 2023-12-23 300/week @ 2023-12-30 369/week @ 2024-01-06 215/week @ 2024-01-13 546/week @ 2024-01-20 484/week @ 2024-01-27 608/week @ 2024-02-03 186/week @ 2024-02-10 755/week @ 2024-02-17

2,270 downloads per month
Used in 11 crates (3 directly)

MIT license

115KB
2.5K SLoC

noodles

crates.io Docs.rs CI status

noodles attempts to provide correct 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, enable the bam feature.

noodles = { version = "0.64.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, FASTA, FASTQ, 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-bed handles the reading and writing of the BED (Browser Extensible Data) format.

Dependencies