Skip to content

Commit

Permalink
filter.rs: fix bugs in average quality score calculation (f64.round())
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkLoc committed Dec 20, 2023
1 parent e65486b commit 3295c35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,5 +181,5 @@ fn phred_mean(
.map(|x| { 10.0f64.powf((x - phred) as f64 / -10.0) })
.sum::<f64>() / qual.len() as f64;

(-10.0f64 * ave_error.log10()) as u8
(-10.0f64 * ave_error.log10()).round() as u8
}

0 comments on commit 3295c35

Please sign in to comment.