3325 |
07 Oct 14 |
peter |
1 |
#ifndef theplu_yat_omic_phred |
3325 |
07 Oct 14 |
peter |
2 |
#define theplu_yat_omic_phred |
3325 |
07 Oct 14 |
peter |
3 |
|
3325 |
07 Oct 14 |
peter |
// $Id$ |
3325 |
07 Oct 14 |
peter |
5 |
|
3325 |
07 Oct 14 |
peter |
6 |
/* |
3325 |
07 Oct 14 |
peter |
Copyright (C) 2014 Peter Johansson |
3325 |
07 Oct 14 |
peter |
8 |
|
3325 |
07 Oct 14 |
peter |
This file is part of the yat library, http://dev.thep.lu.se/yat |
3325 |
07 Oct 14 |
peter |
10 |
|
3325 |
07 Oct 14 |
peter |
The yat library is free software; you can redistribute it and/or |
3325 |
07 Oct 14 |
peter |
modify it under the terms of the GNU General Public License as |
3325 |
07 Oct 14 |
peter |
published by the Free Software Foundation; either version 3 of the |
3325 |
07 Oct 14 |
peter |
License, or (at your option) any later version. |
3325 |
07 Oct 14 |
peter |
15 |
|
3325 |
07 Oct 14 |
peter |
The yat library is distributed in the hope that it will be useful, |
3325 |
07 Oct 14 |
peter |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
3325 |
07 Oct 14 |
peter |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3325 |
07 Oct 14 |
peter |
General Public License for more details. |
3325 |
07 Oct 14 |
peter |
20 |
|
3325 |
07 Oct 14 |
peter |
You should have received a copy of the GNU General Public License |
3325 |
07 Oct 14 |
peter |
along with yat. If not, see <http://www.gnu.org/licenses/>. |
3325 |
07 Oct 14 |
peter |
23 |
*/ |
3325 |
07 Oct 14 |
peter |
24 |
|
3325 |
07 Oct 14 |
peter |
25 |
namespace theplu { |
3325 |
07 Oct 14 |
peter |
26 |
namespace yat { |
3325 |
07 Oct 14 |
peter |
27 |
namespace omic { |
3325 |
07 Oct 14 |
peter |
28 |
|
3325 |
07 Oct 14 |
peter |
29 |
/** |
3325 |
07 Oct 14 |
peter |
Phred scaled probability is defined as \f$ \textrm{Phred} = -10 |
3326 |
08 Oct 14 |
peter |
\log_{10} (p) \f$ |
3325 |
07 Oct 14 |
peter |
32 |
|
3325 |
07 Oct 14 |
peter |
\return phred scaled probability |
3325 |
07 Oct 14 |
peter |
34 |
|
3325 |
07 Oct 14 |
peter |
\since New in yat 0.13 |
3325 |
07 Oct 14 |
peter |
36 |
|
3325 |
07 Oct 14 |
peter |
\see phred_inv |
3325 |
07 Oct 14 |
peter |
38 |
*/ |
3325 |
07 Oct 14 |
peter |
39 |
double phred(double p); |
3325 |
07 Oct 14 |
peter |
40 |
|
3325 |
07 Oct 14 |
peter |
41 |
|
3325 |
07 Oct 14 |
peter |
42 |
/** |
3325 |
07 Oct 14 |
peter |
The inverse of Phred scaling is calculated as \f$ 10^{-x/10} \f$ |
3325 |
07 Oct 14 |
peter |
44 |
|
3325 |
07 Oct 14 |
peter |
\return inverse of Phred scaling |
3325 |
07 Oct 14 |
peter |
46 |
|
3325 |
07 Oct 14 |
peter |
\since New in yat 0.13 |
3325 |
07 Oct 14 |
peter |
48 |
|
3325 |
07 Oct 14 |
peter |
\see phred |
3325 |
07 Oct 14 |
peter |
50 |
*/ |
3325 |
07 Oct 14 |
peter |
51 |
double phred_inv(double x); |
3325 |
07 Oct 14 |
peter |
52 |
|
3325 |
07 Oct 14 |
peter |
53 |
}}} |
3325 |
07 Oct 14 |
peter |
54 |
#endif |