source: trunk/yat/omic/phred.h @ 3325

Last change on this file since 3325 was 3325, checked in by Peter, 7 years ago

new functions phred and phred_inv that calculate phred scaled probability and its inverse, respectively.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.2 KB
Line 
1#ifndef theplu_yat_omic_phred
2#define theplu_yat_omic_phred
3
4// $Id: phred.h 3325 2014-10-07 01:44:54Z peter $
5
6/*
7  Copyright (C) 2014 Peter Johansson
8
9  This file is part of the yat library, http://dev.thep.lu.se/yat
10
11  The yat library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU General Public License as
13  published by the Free Software Foundation; either version 3 of the
14  License, or (at your option) any later version.
15
16  The yat library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  General Public License for more details.
20
21  You should have received a copy of the GNU General Public License
22  along with yat. If not, see <http://www.gnu.org/licenses/>.
23*/
24
25namespace theplu {
26namespace yat {
27namespace omic {
28
29  /**
30     Phred scaled probability is defined as \f$ \textrm{Phred} = -10
31     \log_{10} (x) \f$
32
33     \return phred scaled probability
34
35     \since New in yat 0.13
36
37     \see phred_inv
38   */
39  double phred(double p);
40
41
42  /**
43     The inverse of Phred scaling is calculated as \f$ 10^{-x/10} \f$
44
45     \return inverse of Phred scaling
46
47     \since New in yat 0.13
48
49     \see phred
50   */
51  double phred_inv(double x);
52
53}}}
54#endif
Note: See TracBrowser for help on using the repository browser.