1 #ifndef ALGO_GNOMON___HMM__HPP
2 #define ALGO_GNOMON___HMM__HPP
3 
4 /*  $Id: hmm.hpp 620759 2020-11-30 16:00:57Z souvorov $
5  * ===========================================================================
6  *
7  *                            PUBLIC DOMAIN NOTICE
8  *               National Center for Biotechnology Information
9  *
10  *  This software/database is a "United States Government Work" under the
11  *  terms of the United States Copyright Act.  It was written as part of
12  *  the author's official duties as a United States Government employee and
13  *  thus cannot be copyrighted.  This software/database is freely available
14  *  to the public for use. The National Library of Medicine and the U.S.
15  *  Government have not placed any restriction on its use or reproduction.
16  *
17  *  Although all reasonable efforts have been taken to ensure the accuracy
18  *  and reliability of the software and data, the NLM and the U.S.
19  *  Government do not and cannot warrant the performance or results that
20  *  may be obtained by using this software or data. The NLM and the U.S.
21  *  Government disclaim all warranties, express or implied, including
22  *  warranties of performance, merchantability or fitness for any particular
23  *  purpose.
24  *
25  *  Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors:  Alexandre Souvorov
30  *
31  * File Description:
32  *
33  */
34 
35 #include <corelib/ncbistd.hpp>
36 #include <algo/gnomon/gnomon_exception.hpp>
37 #include <algo/gnomon/gnomon.hpp>
38 #include <algo/gnomon/gnomon__.hpp>
39 #include "gnomon_seq.hpp"
40 #include "score.hpp"
41 
42 BEGIN_NCBI_SCOPE
43 BEGIN_SCOPE(gnomon)
44 
45 extern const double          kLnHalf;
46 extern const double          kLnThree;
47        const int             kTooFarLen = 500;
48 
49 
50 template<int order> class CMarkovChain
51 {
52     public:
53         typedef CMarkovChain<order> Type;
54         void InitScore(const objects::CMarkov_chain_params& hmm_param_asn);
Score(const EResidue * seq)55         double& Score(const EResidue* seq) { return m_next[(int)*(seq-order)].Score(seq); }
Score(const EResidue * seq) const56         const double& Score(const EResidue* seq) const { return m_next[(int)*(seq-order)].Score(seq); }
SubChain(int i)57         CMarkovChain<order-1>& SubChain(int i) { return m_next[i]; }
58         void Average(Type& mc0, Type& mc1, Type& mc2, Type& mc3);
59         void toScore();
60 
61     private:
62         friend class CMarkovChain<order+1>;
63         void Init(const objects::CMarkov_chain_params& hmm_param_asn);
64 
65         CMarkovChain<order-1> m_next[5];
66 };
67 
68 template<> class CMarkovChain<0>
69 {
70     public:
71         typedef CMarkovChain<0> Type;
72         void InitScore(const objects::CMarkov_chain_params& from);
Score(const EResidue * seq)73         double& Score(const EResidue* seq) { return m_score[(int)*seq]; }
Score(const EResidue * seq) const74         const double& Score(const EResidue* seq) const { return m_score[(int)*seq]; }
SubChain(int i)75         double& SubChain(int i) { return m_score[i]; }
76         void Average(Type& mc0, Type& mc1, Type& mc2, Type& mc3);
77         void toScore();
78     private:
79         friend class CMarkovChain<1>;
80         void Init(const objects::CMarkov_chain_params& from);
81 
82         double m_score[5];
83 };
84 
85 template<int order> class CMarkovChainArray
86 {
87     public:
88         void InitScore(int l, const objects::CMarkov_chain_array& from);
89         double Score(const EResidue* seq) const;
90     private:
91         int m_length;
92         vector< CMarkovChain<order> > m_mc;
93 };
94 
95 class CInputModel
96 {
97     public:
98         virtual ~CInputModel() = 0;
99 
Error(const string & label)100         static void Error(const string& label)
101         {
102             NCBI_THROW(CGnomonException, eGenericError, label+" initialisation error");
103         }
104 };
105 
106 //Terminal's score is located on the last position of the left state
107 class CTerminal : public CInputModel
108 {
109     public:
~CTerminal()110         ~CTerminal() {}
InExon() const111         int InExon() const { return m_inexon; }
InIntron() const112         int InIntron() const { return m_inintron; }
Left() const113         int Left() const { return m_left; }
Right() const114         int Right() const { return m_right; }
115         virtual double Score(const CEResidueVec& seq, int i) const = 0;
116 
117     protected:
118         int m_inexon, m_inintron, m_left, m_right;
119 };
120 
121 
122 template<int order> class CWAM_Donor : public CTerminal
123 {
124     public:
~CWAM_Donor()125     ~CWAM_Donor() {}
class_id()126     static string class_id() { return "WAM_Donor_"+NStr::NumericToString(order); }
127         CWAM_Donor(const objects::CGnomon_param::C_Param& from);
128         double Score(const CEResidueVec& seq, int i) const;
129 
130     private:
131         CMarkovChainArray<order> m_matrix;
132 };
133 
134 template<int order> class CWAM_Acceptor : public CTerminal
135 {
136     public:
class_id()137     static string class_id() { return "WAM_Acceptor_"+NStr::NumericToString(order); }
138         CWAM_Acceptor(const objects::CGnomon_param::C_Param& from);
~CWAM_Acceptor()139     ~CWAM_Acceptor() {}
140         double Score(const CEResidueVec& seq, int i) const;
141 
142     private:
143         CMarkovChainArray<order> m_matrix;
144 
145 };
146 
147 class CWMM_Start : public CTerminal
148 {
149     public:
class_id()150     static string class_id() { return "WMM_Start"; }
151         CWMM_Start(const objects::CGnomon_param::C_Param& from);
~CWMM_Start()152     ~CWMM_Start() {}
153         double Score(const CEResidueVec& seq, int i) const;
154 
155     private:
156         CMarkovChainArray<0> m_matrix;
157 };
158 
159 class CWAM_Stop : public CTerminal
160 {
161     public:
class_id()162     static string class_id() { return "WAM_Stop_1"; }
163         CWAM_Stop(const objects::CGnomon_param::C_Param& from);
~CWAM_Stop()164     ~CWAM_Stop() {}
165         double Score(const CEResidueVec& seq, int i) const;
166 
167     private:
168         CMarkovChainArray<1> m_matrix;
169 };
170 
171 class CCodingRegion : public CInputModel
172 {
173     public:
class_id()174     static string class_id() { return "CodingRegion"; }
175         virtual double Score(const CEResidueVec& seq, int i, int codonshift) const = 0;
~CCodingRegion()176         ~CCodingRegion() {}
177 };
178 
179 template<int order> class CMC3_CodingRegion : public CCodingRegion
180 {
181     public:
class_id()182     static string class_id() { return "MC3_CodingRegion_"+NStr::NumericToString(order); }
183         CMC3_CodingRegion(const objects::CGnomon_param::C_Param& from);
~CMC3_CodingRegion()184     ~CMC3_CodingRegion() {}
185         double Score(const CEResidueVec& seq, int i, int codonshift) const;
186 
187     private:
188         CMarkovChain<order> m_matrix[3];
189 };
190 
191 class CNonCodingRegion : public CInputModel
192 {
193     public:
class_id()194     static string class_id() { return "NonCodingRegion"; }
195         virtual double Score(const CEResidueVec& seq, int i) const = 0;
~CNonCodingRegion()196         ~CNonCodingRegion() {}
197 };
198 
199 template<int order> class CMC_NonCodingRegion : public CNonCodingRegion
200 {
201     public:
class_id()202     static string class_id() { return "MC_NonCodingRegion_"+NStr::NumericToString(order); }
203         CMC_NonCodingRegion(const objects::CGnomon_param::C_Param& from);
~CMC_NonCodingRegion()204     ~CMC_NonCodingRegion() {}
205         double Score(const CEResidueVec& seq, int i) const;
206 
207     private:
208         CMarkovChain<order> m_matrix;
209 };
210 
211 class CNullRegion : public CNonCodingRegion
212 {
213     public:
~CNullRegion()214     ~CNullRegion() {}
Score(const CEResidueVec &,int) const215         double Score(const CEResidueVec&, int) const { return 0; };
216 };
217 
218 struct SStateScores
219 {
220     double m_score,m_branch,m_length,m_region,m_term;
221 };
222 
CalcStateScores(const State & st)223 template<class State> SStateScores CalcStateScores(const State& st)
224 {
225     SStateScores sc;
226 
227     if(st.NoLeftEnd())
228     {
229         if(st.NoRightEnd()) sc.m_length = st.ThroughLengthScore();
230         else sc.m_length = st.InitialLengthScore();
231     }
232     else
233     {
234         if(st.NoRightEnd()) sc.m_length = st.ClosingLengthScore();
235         else sc.m_length = st.LengthScore();
236     }
237 
238     sc.m_region = st.RgnScore();
239     sc.m_term = st.TermScore();
240     if(sc.m_term == BadScore()) sc.m_term = 0;
241     sc.m_score = st.Score();
242     if(st.LeftState()) sc.m_score -= st.LeftState()->Score();
243     sc.m_branch = sc.m_score-sc.m_length-sc.m_region-sc.m_term;
244 
245     return sc;
246 }
247 
248 class CLorentz
249 {
250     public:
251         void Init(const objects::CLength_distribution_params& from);
Score(int l) const252         double Score(int l) const { return m_score[(l-1)/m_step]; }
253         double ClosingScore(int l) const;
MinLen() const254         int MinLen() const { return m_minl; }
MaxLen() const255         int MaxLen() const { return m_maxl; }
AvLen() const256         double AvLen() const { return m_avlen; }
257         double Through(int seqlen) const;
258 
259     private:
260         int m_minl, m_maxl, m_step;
261         double m_A, m_L, m_avlen, m_lnthrough;
262         TDVec m_score, m_clscore;
263 };
264 
265 class CSeqScores;
266 
267 class CHMM_State {
268 public:
269     CHMM_State(EStrand strn, int point, const CSeqScores& seqscr);
~CHMM_State()270     virtual ~CHMM_State() {}
LeftState() const271     const CHMM_State* LeftState() const { return m_leftstate; }
TerminalPtr() const272     const CTerminal* TerminalPtr() const { return m_terminal; }
UpdateLeftState(const CHMM_State & left)273     void UpdateLeftState(const CHMM_State& left) { m_leftstate = &left; }
ClearLeftState()274     void ClearLeftState() { m_leftstate = 0; }
UpdateScore(double scr)275     void UpdateScore(double scr) { m_score = scr; }
MaxLen() const276     int MaxLen() const { return numeric_limits<int>::max(); }
MinLen() const277     int MinLen() const { return 1; };
StopInside() const278     bool StopInside() const { return false; }
Strand() const279     EStrand Strand() const { return m_strand; }
isPlus() const280     bool isPlus() const { return (m_strand == ePlus); }
isMinus() const281     bool isMinus() const { return (m_strand == eMinus); }
Score() const282     double Score() const { return m_score; }
Start() const283     int Start() const { return m_leftstate ? m_leftstate->m_stop+1 : 0; }
NoRightEnd() const284     bool NoRightEnd() const { return m_stop < 0; }
NoLeftEnd() const285     bool NoLeftEnd() const { return m_leftstate == 0; }
Stop() const286     int Stop() const { return NoRightEnd() ? m_seqscr->SeqLen()-1 : m_stop; }
287     int RegionStart() const;
288     int RegionStop() const;
GetSeqScores() const289     const CSeqScores& GetSeqScores() const { return *m_seqscr; }
290     virtual SStateScores GetStateScores() const = 0;
291     virtual string GetStateName() const = 0;
292 
isExon() const293     virtual bool isExon() const { return false; }
isGeneLeftEnd() const294     virtual bool isGeneLeftEnd() const { return false; }
isGeneRightEnd() const295     virtual bool isGeneRightEnd() const { return false; }
296     virtual double VirtTermScore() const = 0;
297 
298 protected:
299     int m_stop;
300     EStrand m_strand;
301     double m_score;
302     const CHMM_State* m_leftstate;
303     const CTerminal* m_terminal;
304     const CSeqScores* m_seqscr;
305 };
306 
307 class CIntron;
308 class CIntergenic;
309 
310 class CExonParameters: public CInputModel {
311 public:
class_id()312     static string class_id() { return "Exon"; }
313     CExonParameters(const objects::CGnomon_param::C_Param& from);
~CExonParameters()314     ~CExonParameters() {}
315 
316     double m_firstphase[3], m_internalphase[3][3];
317     CLorentz m_firstlen, m_internallen, m_lastlen, m_singlelen;
318     bool m_initialised;
319 };
320 
321 class CExon : public CHMM_State
322 {
323 public:
324     CExon(EStrand strn, int point, int ph, const CSeqScores& seqscr, const CExonParameters& params);
~CExon()325     virtual ~CExon() {}
326 
Phase() const327     int Phase() const { return m_phase; }  // frame of right exon end relatively start-codon
328     bool StopInside() const;
329     bool OpenRgn() const;
330     double RgnScore() const;
DenScore() const331     double DenScore() const { return 0; }
ThroughLengthScore() const332     double ThroughLengthScore() const { return BadScore(); }
InitialLengthScore() const333     double InitialLengthScore() const { return BadScore(); }
ClosingLengthScore() const334     double ClosingLengthScore() const { return BadScore(); }
335     void UpdatePrevExon(const CExon& e);
MScore() const336     double MScore() const { return m_mscore; }
337 
isExon() const338     virtual bool isExon() const { return true; }
ExonScore() const339     double ExonScore() const { return LeftState()->VirtTermScore() + VirtTermScore(); }
340 
341 protected:
342     int m_phase;
343     const CExon* m_prevexon;
344     double m_mscore;
345 
346     const CExonParameters* m_param;
347 };
348 
349 class CSingleExon : public CExon
350 {
351 public:
~CSingleExon()352     ~CSingleExon() {}
353     CSingleExon(EStrand strn, int point, const CSeqScores& seqscr, const CExonParameters& params);
MaxLen() const354     int MaxLen() const { return m_param->m_singlelen.MaxLen(); }
MinLen() const355     int MinLen() const { return m_param->m_singlelen.MinLen(); }
PrevExon() const356     const CSingleExon* PrevExon() const { return static_cast<const CSingleExon*>(m_prevexon); }
357     double LengthScore() const;
358     double TermScore() const;
VirtTermScore() const359     virtual double VirtTermScore() const { return TermScore(); }
BranchScore(const CHMM_State &) const360     double BranchScore(const CHMM_State& ) const { return BadScore(); }
361     double BranchScore(const CIntergenic& next) const;
GetStateScores() const362     SStateScores GetStateScores() const { return CalcStateScores(*this); }
GetStateName() const363     string GetStateName() const { return "SingleExon"; }
364 
isGeneLeftEnd() const365     virtual bool isGeneLeftEnd() const { return true; }
isGeneRightEnd() const366     virtual bool isGeneRightEnd() const { return true; }
367 };
368 
369 class CFirstExon : public CExon
370 {
371     public:
~CFirstExon()372         ~CFirstExon() {}
373     CFirstExon(EStrand strn, int ph, int point, const CSeqScores& seqscr, const CExonParameters& params);
MaxLen() const374         int MaxLen() const { return m_param->m_firstlen.MaxLen(); }
MinLen() const375         int MinLen() const { return m_param->m_firstlen.MinLen(); }
PrevExon() const376         const CFirstExon* PrevExon() const { return static_cast<const CFirstExon*>(m_prevexon); }
377         double LengthScore() const;
378         double TermScore() const;
VirtTermScore() const379     virtual double VirtTermScore() const { return TermScore(); }
BranchScore(const CHMM_State &) const380         double BranchScore(const CHMM_State& ) const { return BadScore(); }
381         double BranchScore(const CIntron& next) const;
GetStateScores() const382         SStateScores GetStateScores() const { return CalcStateScores(*this); }
GetStateName() const383         string GetStateName() const { return "FirstExon"; }
384 
isGeneLeftEnd() const385     virtual bool isGeneLeftEnd() const { return isPlus(); }
isGeneRightEnd() const386     virtual bool isGeneRightEnd() const { return isMinus(); }
387 };
388 
389 class CInternalExon : public CExon
390 {
391     public:
~CInternalExon()392         ~CInternalExon() {}
393         CInternalExon(EStrand strn, int ph, int point, const CSeqScores& seqscr, const CExonParameters& params);
MaxLen() const394         int MaxLen() const { return m_param->m_internallen.MaxLen(); }
MinLen() const395         int MinLen() const { return m_param->m_internallen.MinLen(); }
PrevExon() const396         const CInternalExon* PrevExon() const { return static_cast<const CInternalExon*>(m_prevexon); }
397         double LengthScore() const;
398         double TermScore() const;
VirtTermScore() const399     virtual double VirtTermScore() const { return TermScore(); }
BranchScore(const CHMM_State &) const400         double BranchScore(const CHMM_State& ) const { return BadScore(); }
401         double BranchScore(const CIntron& next) const;
GetStateScores() const402         SStateScores GetStateScores() const { return CalcStateScores(*this); }
GetStateName() const403         string GetStateName() const { return "InternalExon"; }
404 };
405 
406 class CLastExon : public CExon
407 {
408     public:
~CLastExon()409         ~CLastExon() {}
410         CLastExon(EStrand strn, int ph, int point, const CSeqScores& seqscr, const CExonParameters& params);
MaxLen() const411         int MaxLen() const { return m_param->m_lastlen.MaxLen(); }
MinLen() const412         int MinLen() const { return m_param->m_lastlen.MinLen(); }
PrevExon() const413         const CLastExon* PrevExon() const { return static_cast<const CLastExon*>(m_prevexon); }
414         double LengthScore() const;
415         double TermScore() const;
VirtTermScore() const416     virtual double VirtTermScore() const { return TermScore(); }
BranchScore(const CHMM_State &) const417         double BranchScore(const CHMM_State& ) const { return BadScore(); }
418         double BranchScore(const CIntergenic& next) const;
GetStateScores() const419         SStateScores GetStateScores() const { return CalcStateScores(*this); }
GetStateName() const420         string GetStateName() const { return "LastExon"; }
421 
isGeneLeftEnd() const422     virtual bool isGeneLeftEnd() const { return isMinus(); }
isGeneRightEnd() const423     virtual bool isGeneRightEnd() const { return isPlus(); }
424 };
425 
426 class CIntronParameters : public CInputModel {
427 public:
class_id()428     static string class_id() { return "Intron"; }
429     CIntronParameters(const objects::CGnomon_param::C_Param& from);
~CIntronParameters()430     ~CIntronParameters() {}
431 
432     void SetSeqLen(int seqlen) const;
MinLen() const433     int MinLen() const { return m_intronlen.MinLen(); }
434 
435     mutable double m_lnThrough[3];
436     mutable double m_lnDen[3];
437     double m_lnTerminal, m_lnInternal;
438     CLorentz m_intronlen;
439 private:
440     double m_initp, m_phasep[3];
441     mutable bool m_initialised;
442 
443     friend class CIntron;
444 };
445 
446 class CIntron : public CHMM_State
447 {
448 public:
449     CIntron(EStrand strn, int ph, int point, const CSeqScores& seqscr,const CIntronParameters& params);
~CIntron()450     virtual ~CIntron() {}
MinLen() const451     int MinLen() const { return m_param->MinLen(); }
MaxLen() const452     int MaxLen() const { return m_param->m_intronlen.MaxLen(); }
Phase() const453     int Phase() const { return m_phase; }
OpenRgn() const454     bool OpenRgn() const { return m_seqscr->OpenNonCodingRegion(Start(),Stop(),Strand()); }
455     double RgnScore() const;
TermScore() const456     double TermScore() const
457     {
458         if(isPlus()) return m_seqscr->AcceptorScore(Stop(),Strand());
459         else return m_seqscr->DonorScore(Stop(),Strand());
460     }
VirtTermScore() const461     virtual double VirtTermScore() const { return TermScore(); }
DenScore() const462     double DenScore() const { return m_param->m_lnDen[Phase()]; }
LengthScore() const463     double LengthScore() const
464     {
465         if(SplittedStop())
466             return BadScore();
467         else
468             return m_param->m_intronlen.Score(Stop()-Start()+1);
469     }
470     double ClosingLengthScore() const;
ThroughLengthScore() const471     double ThroughLengthScore() const  { return m_param->m_lnThrough[Phase()]; }
InitialLengthScore() const472     double InitialLengthScore() const { return m_param->m_lnDen[Phase()]+ClosingLengthScore(); }  // theoretically we should substract log(AvLen) but it gives to much penalty to the first element
BranchScore(const CHMM_State &) const473     double BranchScore(const CHMM_State& ) const { return BadScore(); }
474     double BranchScore(const CLastExon& next) const;
475     double BranchScore(const CInternalExon& next) const;
SplittedStop() const476     bool SplittedStop() const
477     {
478         if(Phase() == 0 || NoLeftEnd() || NoRightEnd())
479             return false;
480         else if (isPlus())
481             return m_seqscr->SplittedStop(LeftState()->Stop(),Stop(),Strand(),Phase()-1);
482         else
483             return m_seqscr->SplittedStop(Stop(),LeftState()->Stop(),Strand(),Phase()-1);
484     }
485 
486 
GetStateScores() const487     SStateScores GetStateScores() const { return CalcStateScores(*this); }
GetStateName() const488     string GetStateName() const { return "Intron"; }
489 
490 protected:
491     int m_phase;
492     const CIntronParameters* m_param;
493 };
494 
BranchScore(const CInternalExon & next) const495 inline double CIntron::BranchScore(const CInternalExon& next) const
496 {
497     if(Strand() != next.Strand()) return BadScore();
498 
499     if(isPlus()) {
500         int shift = next.Stop()-next.Start();
501         if((Phase()+shift)%3 == next.Phase())
502             return m_param->m_lnInternal;
503     } else if(Phase() == next.Phase())
504         return m_param->m_lnInternal;
505 
506     return BadScore();
507 }
508 
BranchScore(const CIntron & next) const509 inline double CInternalExon::BranchScore(const CIntron& next) const
510 {
511     if(Strand() != next.Strand()) return BadScore();
512 
513     int ph = isPlus() ? Phase() : Phase()+Stop()-Start();
514 
515     if((ph+1)%3 == next.Phase()) return 0;
516     else return BadScore();
517 }
518 
519 class CIntergenicParameters : public CInputModel {
520 public:
class_id()521     static string class_id() { return "Intergenic"; }
522     CIntergenicParameters(const objects::CGnomon_param::C_Param& from);
~CIntergenicParameters()523     ~CIntergenicParameters() {}
524 
525     void SetSeqLen(int seqlen) const;
MinLen() const526     int MinLen() const { return m_intergeniclen.MinLen(); }
527 
528     mutable double m_lnThrough, m_lnDen;
529     double m_lnSingle, m_lnMulti;
530     CLorentz m_intergeniclen;
531 private:
532     double m_initp;
533     mutable bool m_initialised;
534     friend class CIntergenic;
535 };
536 
537 class CIntergenic : public CHMM_State
538 {
539     public:
540     CIntergenic(EStrand strn, int point, const CSeqScores& seqscr, const CIntergenicParameters& params);
~CIntergenic()541     virtual ~CIntergenic() {}
542         bool OpenRgn() const;
543         double RgnScore() const;
544         double TermScore() const;
VirtTermScore() const545     virtual double VirtTermScore() const { return TermScore(); }
DenScore() const546         double DenScore() const { return m_param->m_lnDen; }
LengthScore() const547         double LengthScore() const { return m_param->m_intergeniclen.Score(Stop()-Start()+1); }
ClosingLengthScore() const548         double ClosingLengthScore() const { return m_param->m_intergeniclen.ClosingScore(Stop()-Start()+1); }
ThroughLengthScore() const549         double ThroughLengthScore() const { return m_param->m_lnThrough; }
InitialLengthScore() const550         double InitialLengthScore() const { return m_param->m_lnDen+ClosingLengthScore(); }  // theoretically we should substract log(AvLen) but it gives to much penalty to the first element
BranchScore(const CHMM_State &) const551         double BranchScore(const CHMM_State& ) const { return BadScore(); }
552         double BranchScore(const CFirstExon& next) const;
553         double BranchScore(const CSingleExon& next) const;
GetStateScores() const554         SStateScores GetStateScores() const { return CalcStateScores(*this); }
GetStateName() const555         string GetStateName() const { return "Intergenic"; }
556 
557     protected:
558         const CIntergenicParameters* m_param;
559 };
560 
561 class CHMMParameters::SDetails : public CObject {
562 public:
563     SDetails(const objects::CGnomon_params& hmm_params_asn);
564     ~SDetails();
565     const CInputModel& GetParameter(const string& type, int cgcontent) const;
566 private:
567     template <class CParam>
568     void ReadParameters(const objects::CGnomon_params& hmm_params_asn, objects::CGnomon_param::C_Param::E_Choice choice);
569     typedef vector< pair<int,CInputModel*> > TCGContentList;
570     typedef map<string, TCGContentList > TParamMap;
571     TParamMap params;
572 
573     vector<CInputModel*> all_created_models;
574 
575     void DeleteAllCreatedModels();
576     TCGContentList& GetCGList(const string& type);
577     void StoreParam( const string& type, CInputModel* input_model, int low, int high );
578 };
579 
580 
581 
582 
583 END_SCOPE(gnomon)
584 END_NCBI_SCOPE
585 
586 #endif  // ALGO_GNOMON___HMM__HPP
587