#noodles #bam

noodles-core

Shared utilities when working with noodles

21 releases (11 breaking)

0.12.0 Jun 15, 2023
0.11.0 Mar 3, 2023
0.10.0 Feb 3, 2023
0.9.0 Oct 20, 2022
0.1.2 Jul 30, 2021

#1572 in Rust patterns

Download history 686/week @ 2023-08-17 847/week @ 2023-08-24 726/week @ 2023-08-31 1241/week @ 2023-09-07 1189/week @ 2023-09-14 1079/week @ 2023-09-21 931/week @ 2023-09-28 1337/week @ 2023-10-05 1171/week @ 2023-10-12 1271/week @ 2023-10-19 1299/week @ 2023-10-26 1340/week @ 2023-11-02 1376/week @ 2023-11-09 1142/week @ 2023-11-16 1388/week @ 2023-11-23 691/week @ 2023-11-30

4,846 downloads per month
Used in 59 crates (18 directly)

MIT license

29KB
603 lines

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.59.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-core contains shared structures and behavior among noodles libraries.

No runtime deps