Skip to content

Commit 3295c35

Browse files
committed
filter.rs: fix bugs in average quality score calculation (f64.round())
1 parent e65486b commit 3295c35

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/filter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,5 +181,5 @@ fn phred_mean(
181181
.map(|x| { 10.0f64.powf((x - phred) as f64 / -10.0) })
182182
.sum::<f64>() / qual.len() as f64;
183183

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

0 commit comments

Comments
 (0)