package biocaml
Install
Dune Dependency
Authors
Maintainers
Sources
md5=486aeb3e552dabae85839e2af30d6c52
sha512=4ed2df0b7cbd80bd6e29bd8fee9d2dacd9379ad0f4ff142bd8e16ade3f1507f6cc7cbe4c614943b8feb8fa4705935695cb458606b0da813dbf255b1e566a43cf
doc/biocaml.unix/Biocaml_unix/Solexa_score/index.html
Module Biocaml_unix.Solexa_score
Source
Solexa quality scores.
A Solexa score is defined as -10*log(p/(1-p)) rounded to an integer, where p is a probability. Phred scores are far more widely used, and the Phred_score
module supports converting Solexa scores to Phred scores.
For details see The Sanger FASTQ file format for sequences with quality scores, and the Solexa/Illumina FASTQ variants. This module supports what is called the fastq-solexa format in this paper, with one exception. We are more permissive here in allowing conversions from/to the entire range of visible ASCII characters (codes 33 - 126) instead of restricting to codes 59 - 126 as specified in this paper. The smaller range is apparently based on the original Solexa software returning minimum scores of -5, but there is no reason for this minimum based on the general definition of Solexa scores.
of_probability ~f x
returns -10 * log_10(x/(1-x))
, which is the definition of Solexa scores.
Solexa scores are integral, and it is unclear what convention is used to convert the resulting float value to an integer. Thus, the optional f
is provided to dictate this. The default is to round the computed score to the closest integer.