1 /************************************************************
2 * Copyright (c) 2005, BGI of Chinese Academy of Sciences
6 * Abstract: Declaration of KAKS class including several methods.
9 * Author: Zhang Zhang (zhanghzhang@genomics.org.cn)
12 *************************************************************/
28 class KAKS
: public Base
{
34 /* Main function to call kaks's methods */
35 bool Run(int argc
, const char* argv
[]);
36 /* Read and Calculate seq, called in "Run" main function */
37 bool ReadCalculateSeq(string filename
);
39 /* Initialize class, ready for running */
41 /* Unitialize class, for unloading */
45 /* Use several methods to calculate ka/ks */
47 /* Show help information */
50 /* NONE: an in-house algorithm in BGI, that is NG86 without correction */
68 /* Model Selection and Model Averaging */
72 /* Get GCC of entire sequences and of three codon positions */
73 void getGCContent(string str
);
74 /* Check the sequence whether is valid or not */
75 bool checkValid(string name
, string str1
, string str2
);
76 /* Parse the input parameters */
77 bool parseParameter(int argc
, const char* argv
[]);
78 /* Show input parameters' information on screen */
80 /* Get title information for writing into file */
81 string
getTitleInfo();
84 /* Methods' name and reference */
85 vector
<string
> method_name
;
86 vector
<string
> method_ref
;
88 /* Parameters' title in outputing file */
89 vector
<string
> titleInfo
;
91 /* Results for windows parser that shows results on ListCtrl */
94 /* File name for output */
95 string output_filename
;
96 /* Sequence file name */
99 /* Flag for whether to run NG86, MLWL85, MLPB93, GY94, YN00, MYN, MS/A=model selection/averaging */
100 bool none
, ng86
, lwl85
, lpb93
, yn00
, mlwl85
, mlpb93
, gy94
, myn
, ms
, ma
;
101 /* Number of compared pairwise sequences */
102 unsigned long number
; //Maybe too many
105 /* File name for detailed results for model selection */
106 string detail_filename
;
107 /* Detailed results */
111 /* The temporary results for write into file */
115 /* A pair of sequence */