pub type LibraryLookup = Arc<HashMap<String, Arc<str>>>;Expand description
A lookup table mapping read group IDs to library names.
This is built from the SAM header’s @RG lines and used to resolve the library name (LB field) from a record’s RG tag. This matches fgbio’s behavior where grouping uses the library name, not the read group ID.
Uses Arc<str> for library names to avoid cloning strings for every read.
§Note: LibraryLookup vs LibraryIndex
Both LibraryLookup and LibraryIndex exist for different use cases:
LibraryLookup: String-based lookup returning library names. Used byReadInfo::fromwhere the actual library name string is needed.LibraryIndex: Hash-based lookup returning numeric indices. Used bycompute_group_keyin the hot path where only equality comparison matters, avoiding string allocations.
Aliased Type§
pub struct LibraryLookup { /* private fields */ }