rust-bio / rust-bio-tools

A set of command line utilities based on Rust-Bio.
MIT License
182 stars 24 forks source link

feat: increase base quality scale #179

Closed FelixMoelder closed 3 years ago

FelixMoelder commented 3 years ago

This PR improves calculation of consensus base qualities by increasing the PHRED quality scores from ASCII 74 to ASCII 126. Increasing the range of possible base qualities allows to represent higher certainties in consensus reads as the original reads already exhaust the full range of ASCII 74 scores.

In addition there is a fix for base qualities that originate from a single read. Although the quality for these bases only needs to be adopted from the original reads there had been unintended changes. This happened because of rounding errors when recalculating the quality based on its allele likelihood.

As these changes also impacts testing the corresponding tests have been updated.