File: QualityTransform.hpp

package info (click to toggle)
pbseqlib 5.3.4%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 7,020 kB
  • sloc: cpp: 77,246; python: 331; sh: 103; makefile: 42
file content (28 lines) | stat: -rw-r--r-- 600 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef _BLASR_QVS_QUALITY_TRANSFORM_HPP_
#define _BLASR_QVS_QUALITY_TRANSFORM_HPP_

#include <cmath>

#include <pbdata/qvs/QualityValue.hpp>

/*
 * Base lookup table class for quality values.
 */
class QualityToProb
{
public:
    float prob[MAX_QUALITY_VALUE - MIN_QUALITY_VALUE + 1];
    float operator()(int index);
};

/*
 * Create a lookup table for transforming from quality value
 * to p-value using Patrick Marks' low-end expand qv = -100*log10(p/(1-p))
 */
class LowEndExpandQualityTransform
{
public:
    void operator()(QualityToProb &qt);
};

#endif  // _BLASR_QVS_QUALITY_TRANSFORM_HPP_