convert phred quality scores to and from other numerical representations
Phred quality scores are a humanized representation of small error probabilities. They have a long history of use in genomics, where they have been employed to represent the quality of sequencing observations.
If the probability of error is P, the phred quality score Q is defined as
Q = -10 * log10(P).
P = 10^(-Q/10):
This library encapsulates conversions between error probabilities and phred scores.
npm install phred
A Phred object is provided that allows for manipulation of quality scores.
var Phred =// print the phred to probability mapping01020304050/*0 110 0.120 0.0130 0.00140 0.000150 0.00001*/