modified: SpatialOmicsCoord.py
[GalaxyCodeBases.git] / c_cpp / etc / KaKs_Calculator / src / NG86.h
blob617dfcb73918705f780413bb13b82fcc2af104f1
1 /***************************************************************
2 * Copyright (c) 2005, BGI of Chinese Academy of Sciences
3 * All rights reserved.
5 * Filename: NG86.h
6 * Abstract: Declaration of NG86 class inherited base class.
8 * Version: 1.0
9 * Author: Zhang Zhang (zhanghzhang@genomics.org.cn)
10 * Date: Feb.21, 2005
12 References:
13 Nei M, Gojobori T (1986) Simple methods for estimating the
14 numbers of synonymous and nonsynonymous nucleotide substitutions.
15 Mol Biol Evol 3:418-426.
16 ****************************************************************/
18 #if !defined(NG86_H)
19 #define NG86_H
21 #include "base.h"
23 using namespace std;
25 /* NG86 class */
26 class NG86: public Base {
28 public:
29 NG86();
31 /* Main function of calculating kaks */
32 string Run(string seq1, string seq2);
34 protected:
35 /* Count codon's sites */
36 void getCondonSite(string codon);
37 /* Count codon's differences */
38 void getCondonDifference(string codon1, string codon2);
39 /* Preprocess */
40 void PreProcess(string seq1, string seq2);
41 /* Jukes and Cantor's one-parameter formula */
42 double kaks_formula(double p);
44 public:
45 /* Proportions of sysnonymous(Ps) and nonsysnonymous(Pn): Ps=Sd/S, Pn=Nd/N */
46 double Ps, Pn;
47 };
49 class NONE: public NG86 {
51 public:
52 NONE();
53 /* Main function of calculating kaks */
54 string Run(string seq1, string seq2);
58 #endif