Skip to content

Commit

Permalink
fix: Fix getting qname from record in read_bam_records
Browse files Browse the repository at this point in the history
  • Loading branch information
cauliyang committed Oct 10, 2024
1 parent 13a11e1 commit 1b75970
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/output/bam.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ pub fn read_bam_records_parallel<P: AsRef<Path>>(
.par_bridge()
.map(|result| {
let record = result?;
let qname = String::from_utf8(record.name().unwrap().as_bytes().to_vec())?;
let qname = String::from_utf8(record.name().unwrap().to_vec())?;
let mapping_quality = record.mapping_quality().unwrap().get() as usize;

let ops: Vec<Op> = record.cigar().iter().collect::<Result<Vec<_>, _>>()?;
Expand Down Expand Up @@ -258,7 +258,7 @@ pub fn read_bam_records<P: AsRef<Path>>(path: P) -> Result<HashMap<String, BamRe
.par_bridge()
.map(|result| {
let record = result?;
let qname = String::from_utf8(record.name().unwrap().as_bytes().to_vec())?;
let qname = String::from_utf8(record.name().unwrap().to_vec())?;
let mapping_quality = record.mapping_quality().unwrap().get() as usize;

let ops: Vec<Op> = record.cigar().iter().collect::<Result<Vec<_>, _>>()?;
Expand Down

0 comments on commit 1b75970

Please sign in to comment.