<commit_before># phred

[![NPM](https://nodei.co/npm/phred.png?global=true)](https://nodei.co/npm/phred/)

convert phred quality scores to and from other numerical representations

## Overview

[Phred quality scores](https://en.wikipedia.org/wiki/Phred_quality_score) 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)`.

[(https://upload.wikimedia.org/math/2/7/9/27965b367978f44297efd5b3544bae04.png)](https://en.wikipedia.org/wiki/Phred_quality_score)

Inversely, `P = 10^(-Q/10)`:

[(https://upload.wikimedia.org/math/5/b/c/5bc7e86d6002b0f824c1cc00b97e3047.png)](https://en.wikipedia.org/wiki/Phred_quality_score)

This library encapsulates conversions between error probabilities and phred scores.

## Installation

```
npm install phred
```<commit_msg>fixes readme<commit_after># phred

[![NPM](https://nodei.co/npm/phred.png?global=true)](https://nodei.co/npm/phred/)

[![Build Status](https://travis-ci.org/ekg/phred.svg)](https://travis-ci.org/ekg/phred)

convert phred quality scores to and from other numerical representations

## Overview

[Phred quality scores](https://en.wikipedia.org/wiki/Phred_quality_score) 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)`.

[![q to p](https://upload.wikimedia.org/math/2/7/9/27965b367978f44297efd5b3544bae04.png)](https://en.wikipedia.org/wiki/Phred_quality_score)

Inversely, `P = 10^(-Q/10)`:

[![p to q](https://upload.wikimedia.org/math/5/b/c/5bc7e86d6002b0f824c1cc00b97e3047.png)](https://en.wikipedia.org/wiki/Phred_quality_score)

This library encapsulates conversions between error probabilities and phred scores.

## Installation

```
npm install phred
```
{'fraction_non_alphanumeric': 0.13039309683604985, 'fraction_numerical': 0.053691275167785234, 'mean_word_length': 5.211309523809524, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5115846', 'n_tokens_mistral': 778, 'n_tokens_neox': 696, 'n_words': 173}