We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 357552e commit e65486bCopy full SHA for e65486b
1 file changed
src/filter.rs
@@ -178,8 +178,8 @@ fn phred_mean(
178
) -> u8 {
179
let ave_error = qual
180
.iter()
181
- .map(|x| { 10.0f64.powf((x -phred) as f64 / 10.0) })
+ .map(|x| { 10.0f64.powf((x - phred) as f64 / -10.0) })
182
.sum::<f64>() / qual.len() as f64;
183
184
- (ave_error.log10() * -10.0f64) as u8 - phred
+ (-10.0f64 * ave_error.log10()) as u8
185
}
0 commit comments