Skip to content

Commit

Permalink
review fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
nh13 authored May 22, 2024
1 parent 4a51951 commit d4bc492
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bam/record_serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ use serde_bytes::{ByteBuf, Bytes};
use crate::bam::record::Record;

fn fix_l_extranul(rec: &mut Record) {
// first, reset the number of extranuls to 0 for calling .qname(); then calculate how many we actually have
rec.inner_mut().core.l_extranul = 0;
let l_extranul = rec.qname().iter().rev().take_while(|x| **x == 0u8).count() as u8;
rec.inner_mut().core.l_extranul = l_extranul;
}
Expand Down

0 comments on commit d4bc492

Please sign in to comment.