package biocaml

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Biocaml_ez.Phred_scoreSource

include module type of struct include Biocaml_unix.Phred_score end
Sourcetype t = private int
include Sexplib0.Sexpable.S with type t := t
Sourceval t_of_sexp : Sexplib0.Sexp.t -> t
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t
Sourcetype offset = [
  1. | `Offset33
  2. | `Offset64
]
Sourceval sexp_of_offset : offset -> Sexplib0.Sexp.t
Sourceval offset_of_sexp : Sexplib0.Sexp.t -> offset
Sourceval __offset_of_sexp__ : Sexplib0.Sexp.t -> offset
Sourceval to_int : t -> int

Convert a PHRED score to an integer.

Sourceval to_probability : t -> float

to_probablity x converts x to a probablity score. Note this is not the inverse of of_probability due to the rounding done by the latter.

Sourceval of_solexa_score : ?f:(float -> int) -> Biocaml_unix.Solexa_score.t -> t

of_solexa_score x converts Solexa score x to a PHRED score.

The conversion produces a float, and it is unclear what convention is used to convert the resulting float value to an integer. As in of_probability, the optional f parameter is provided to dictate this.

Sourceval to_solexa_score : ?f:(float -> int) -> t -> Biocaml_unix.Solexa_score.t

to_solexa_score t converts PHRED score t to a Solexa score.

The conversion produces a float, and it is unclear what convention is used to convert the resulting float value to an integer. As in of_probability, the optional f parameter is provided to dictate this.

Sourceval min_as_char : offset -> t

The min and max PHRED scores when encoded as ASCII characters. Since PHRED scores are virtually always ASCII encoded, you are unlikely to see values outside this range. However, this module allows creating values outside this range, e.g. of_probability 1e-13 exceeds max_as_char, and of_probability 0.9 is smaller than min_as_char (for either offset).

Sourceval max_as_char : t
Sourceval of_char : ?offset:offset -> char -> t
Sourceval to_char : ?offset:offset -> t -> char
Sourceval of_int : int -> t
Sourceval of_probability : ?f:(float -> int) -> float -> t
OCaml

Innovation. Community. Security.