yat/omic/phred.h

Code
Comments
Other
Rev Date Author Line
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 4 // $Id$
3325 07 Oct 14 peter 5
3325 07 Oct 14 peter 6 /*
3325 07 Oct 14 peter 7   Copyright (C) 2014 Peter Johansson
3325 07 Oct 14 peter 8
3325 07 Oct 14 peter 9   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 11   The yat library is free software; you can redistribute it and/or
3325 07 Oct 14 peter 12   modify it under the terms of the GNU General Public License as
3325 07 Oct 14 peter 13   published by the Free Software Foundation; either version 3 of the
3325 07 Oct 14 peter 14   License, or (at your option) any later version.
3325 07 Oct 14 peter 15
3325 07 Oct 14 peter 16   The yat library is distributed in the hope that it will be useful,
3325 07 Oct 14 peter 17   but WITHOUT ANY WARRANTY; without even the implied warranty of
3325 07 Oct 14 peter 18   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3325 07 Oct 14 peter 19   General Public License for more details.
3325 07 Oct 14 peter 20
3325 07 Oct 14 peter 21   You should have received a copy of the GNU General Public License
3325 07 Oct 14 peter 22   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 30      Phred scaled probability is defined as \f$ \textrm{Phred} = -10
3326 08 Oct 14 peter 31      \log_{10} (p) \f$
3325 07 Oct 14 peter 32
3325 07 Oct 14 peter 33      \return phred scaled probability
3325 07 Oct 14 peter 34
3325 07 Oct 14 peter 35      \since New in yat 0.13
3325 07 Oct 14 peter 36
3325 07 Oct 14 peter 37      \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 43      The inverse of Phred scaling is calculated as \f$ 10^{-x/10} \f$
3325 07 Oct 14 peter 44
3325 07 Oct 14 peter 45      \return inverse of Phred scaling
3325 07 Oct 14 peter 46
3325 07 Oct 14 peter 47      \since New in yat 0.13
3325 07 Oct 14 peter 48
3325 07 Oct 14 peter 49      \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