65 breaking releases

0.66.0 Nov 7, 2024
0.64.0 Sep 4, 2024
0.62.0 Jul 14, 2024
0.55.0 Mar 28, 2024
0.2.0 Jul 30, 2021

#1088 in Parser implementations

Download history 1317/week @ 2024-07-30 1199/week @ 2024-08-06 548/week @ 2024-08-13 955/week @ 2024-08-20 601/week @ 2024-08-27 831/week @ 2024-09-03 425/week @ 2024-09-10 376/week @ 2024-09-17 826/week @ 2024-09-24 539/week @ 2024-10-01 1631/week @ 2024-10-08 774/week @ 2024-10-15 748/week @ 2024-10-22 787/week @ 2024-10-29 791/week @ 2024-11-05 438/week @ 2024-11-12

2,826 downloads per month
Used in 44 crates (9 directly)

MIT license

785KB
19K SLoC

noodles-sam handles the reading and writing of the SAM (Sequence Alignment/Map) format.

SAM is a format typically used to store biological sequences, either mapped to a reference sequence or unmapped. It has two sections: a header and a list of records.

The header mostly holds meta information about the data: a header describing the file format version, reference sequences reads map to, read groups reads belong to, programs that previously manipulated the data, and free-form comments. The header is optional and may be empty.

Each record represents a read, a linear alignment of a segment. Records have fields describing how a read was mapped (or not) to a reference sequence.

Examples

Read all records from a file

use noodles_sam as sam;

let mut reader = sam::io::reader::Builder::default().build_from_path("sample.sam")?;
let header = reader.read_header()?;

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

Dependencies

~2.8–9.5MB
~80K SLoC