Thanks to visit codestin.com
Credit goes to lib.rs

5 releases

Uses new Rust 2024

0.2.0 Apr 22, 2026
0.1.3 Apr 12, 2026
0.1.2 Mar 6, 2026
0.1.1 Feb 28, 2026
0.1.0 Feb 18, 2026

#890 in Biology

30 downloads per month
Used in 4 crates (3 directly)

MIT license

1MB
19K SLoC

SAM/BAM file utilities and header manipulation.

This module provides utilities for working with SAM/BAM files, including:

  • Checking and validating SAM header sort orders
  • Reversing and reverse-complementing per-base tag values
  • Template-coordinate sorting validation
  • Test utilities for building SAM/BAM records
  • Record-level utilities (position mapping, FR pair detection, CIGAR parsing)
  • Read-pair clipping utilities

Sort Orders

The module supports several important sort orders:

  • queryname - Reads sorted by query name (required for grouping by UMI)
  • template-coordinate - Special sort order from fgbio where reads are grouped by query name but ordered by genomic position within each template

Tag Manipulation

Functions are provided to reverse or reverse-complement per-base tag values when reads are mapped to the negative strand, ensuring tag values match the orientation of the read sequence.

Record Utilities

The record_utils submodule provides utilities for working with individual records:

Dependencies

~8–15MB
~302K SLoC