52 int delx =
min((
i+1)*m_step,MaxLen())-l;
53 double dely = (
i == 0 ? 1 : m_clscore[
i-1])-m_clscore[
i];
54 return log(dely/m_step*delx+m_clscore[
i]);
58 : m_stop(point), m_strand(strn),
59 m_score(
BadScore()), m_leftstate(0), m_terminal(0),
111 m_prevexon(0), m_mscore(
BadScore()),
112 m_param(&exon_params)
124 if(frame < 0) frame += 3;
140 if(frame < 0) frame += 3;
156 if(frame < 0) frame += 3;
176 :
CExon(strn,point,2,seqscr,exon_params)
202 :
CExon(strn,point,ph,seqscr,exon_params)
235 if((ph+1)%3 ==
next.Phase())
return 0;
240 :
CExon(strn,point,ph,seqscr,exon_params)
255 if(ph0 < 0) ph0 += 3;
273 :
CExon(strn,point,ph,seqscr,exon_params)
308 m_param(&intron_params)
327 int shift =
next.Stop()-
next.Start();
342 m_param(&intergenic_params)
403 CMarkov_chain_params::TProbabilities::const_iterator
i = from.
GetProbabilities().begin();
404 m_score[
enA] = (*
i++)->GetValue();
405 m_score[
enC] = (*
i++)->GetValue();
406 m_score[
enG] = (*
i++)->GetValue();
407 m_score[
enT] = (*
i++)->GetValue();
410 m_score[
enN] = 0.25*(m_score[
enA]+m_score[
enC]+m_score[
enG]+m_score[
enT]);
419 m_score[
enN] = 0.25*(m_score[
enA]+m_score[
enC]+m_score[
enG]+m_score[
enT]);
448 if(first < 0 || last >= (
int)seq.size())
return BadScore();
470 if((seq[
i+1] !=
enT || seq[
i+2] !=
enA || seq[
i+3] !=
enA) &&
471 (seq[
i+1] !=
enT || seq[
i+2] !=
enA || seq[
i+3] !=
enG) &&
525 for(
int i = num-2;
i >= 0; --
i)
528 for(
int i = 0;
i < num; ++
i)
543 through = (l2-2*seqlen)*w/2*exp(
m_score[ifirst]);
546 int ilast = (seqlen-1)/
m_step;
547 for(
int i = 0;
i < ilast; ++
i) {
554 int w = seqlen-ilast*
m_step;
555 int l2 = ilast*
m_step+1+seqlen;
556 through += (l2-2*seqlen)*w/2*exp(
m_score[ilast]);
561 through = (through <= 0) ?
BadScore() :
log(through);
575 Error(
label+
" Too long First_exon_phase_probabilities");
582 for(
int i = 0;
i < 3; ++
i) {
583 for(
int j = 0; j < 3; ++j) {
588 Error(
label+
" Too long Internal_exon_phase_probabilities");
624 for(
int i = 0;
i < 3; ++
i)
662 ITERATE(vector<CInputModel*>,
i, all_created_models)
664 all_created_models.clear();
671 if (
i->second.empty())
672 i->second.push_back(make_pair<int,CInputModel*>(101,
NULL));
682 TCGContentList::iterator
i = list.begin();
683 while(
i->first <= low ) {
689 i = list.insert(
i, *
i );
694 if (high < i->
first) {
695 i = list.insert(
i, *
i );
697 }
else if (high >
i->first) {
701 i->second = input_model;
720 template <
class CParam>
724 if ((*p)->GetParam().Which() != choice)
727 int low = (*p)->GetGc_content_range().GetFrom();
728 int high = (*p)->GetGc_content_range().GetTo();
729 if (!( 0<=low && low < high && high <= 100) )
733 if (input_model==
NULL)
736 all_created_models.push_back(input_model);
738 StoreParam(CParam::class_id(), input_model, low, high);
744 DeleteAllCreatedModels();
767 else if (cgcontent >= 100)
771 if (i_param == params.end())
775 if (cgcontent < i->
first) {
776 if (
i->second ==
NULL) {
785 return *params.begin()->second.front().second;
double m_internalphase[3][3]
CExonParameters(const objects::CGnomon_param::C_Param &from)
void UpdatePrevExon(const CExon &e)
const CExonParameters * m_param
CExon(EStrand strn, int point, int ph, const CSeqScores &seqscr, const CExonParameters ¶ms)
double BranchScore(const CHMM_State &) const
CFirstExon(EStrand strn, int ph, int point, const CSeqScores &seqscr, const CExonParameters ¶ms)
double LengthScore() const
void DeleteAllCreatedModels()
void ReadParameters(const objects::CGnomon_params &hmm_params_asn, objects::CGnomon_param::C_Param::E_Choice choice)
vector< pair< int, CInputModel * > > TCGContentList
TCGContentList & GetCGList(const string &type)
void StoreParam(const string &type, CInputModel *input_model, int low, int high)
SDetails(const objects::CGnomon_params &hmm_params_asn)
const CInputModel & GetParameter(const string &type, int cgcontent) const
CHMMParameters(const objects::CGnomon_params &hmm_params_asn)
CRef< SDetails > m_details
const CInputModel & GetParameter(const string &type, int cgcontent) const
const CSeqScores * m_seqscr
const CTerminal * m_terminal
CHMM_State(EStrand strn, int point, const CSeqScores &seqscr)
const CHMM_State * m_leftstate
void SetSeqLen(int seqlen) const
CIntergenicParameters(const objects::CGnomon_param::C_Param &from)
CIntergenic(EStrand strn, int point, const CSeqScores &seqscr, const CIntergenicParameters ¶ms)
double BranchScore(const CHMM_State &) const
const CIntergenicParameters * m_param
double LengthScore() const
CInternalExon(EStrand strn, int ph, int point, const CSeqScores &seqscr, const CExonParameters ¶ms)
void SetSeqLen(int seqlen) const
CIntronParameters(const objects::CGnomon_param::C_Param &from)
const CIntronParameters * m_param
double BranchScore(const CHMM_State &) const
CIntron(int j, char amin, char don11, char don21, char acs11, char acs21, const CAlignInfo &prev, const CAlignInfo &cur, const CNSeq &nseq, const CProSplignScaledScoring &scoring)
double ClosingLengthScore() const
double LengthScore() const
CLastExon(EStrand strn, int ph, int point, const CSeqScores &seqscr, const CExonParameters ¶ms)
double BranchScore(const CHMM_State &) const
CLength_distribution_params –.
double Score(int l) const
void Init(const objects::CLength_distribution_params &from)
double Through(int seqlen) const
double ClosingScore(int l) const
void InitScore(int l, const objects::CMarkov_chain_array &from)
double Score(const EResidue *seq) const
void Init(const objects::CMarkov_chain_params &hmm_param_asn)
void InitScore(const objects::CMarkov_chain_params &hmm_param_asn)
void Average(Type &mc0, Type &mc1, Type &mc2, Type &mc3)
bool OpenCodingRegion(int a, int b, int strand, int frame) const
const CTerminal & Acceptor() const
const CTerminal & Stop() const
double StartScore(int i, int strand) const
bool OpenIntergenicRegion(int a, int b) const
double IntergenicScore(int a, int b, int strand) const
const CTerminal & Start() const
double AcceptorScore(int i, int strand) const
double CodingScore(int a, int b, int strand, int frame) const
double DonorScore(int i, int strand) const
const CTerminal & Donor() const
bool StopInside(int a, int b, int strand, int frame) const
double StopScore(int i, int strand) const
double BranchScore(const CHMM_State &) const
double LengthScore() const
CSingleExon(EStrand strn, int point, const CSeqScores &seqscr, const CExonParameters ¶ms)
double Score(const CEResidueVec &seq, int i) const
CWAM_Stop(const objects::CGnomon_param::C_Param &from)
CMarkovChainArray< 1 > m_matrix
CWMM_Start(const objects::CGnomon_param::C_Param &from)
CMarkovChainArray< 0 > m_matrix
double Score(const CEResidueVec &seq, int i) const
container_type::const_iterator const_iterator
container_type::iterator iterator
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static DLIST_TYPE *DLIST_NAME() last(DLIST_LIST_TYPE *list)
static DLIST_TYPE *DLIST_NAME() next(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
ESerialDataFormat
Data file format.
static CObjectIStream * Open(ESerialDataFormat format, CNcbiIstream &inStream, bool deleteInStream)
Create serial object reader and attach it to an input stream.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
static const char label[]
list< double > TFirst_exon_phase_probabilities
TMin GetMin(void) const
Get the Min member data.
TL GetL(void) const
Get the L member data.
const TSingle_exon_length & GetSingle_exon_length(void) const
Get the Single_exon_length member data.
const TLast_exon_length & GetLast_exon_length(void) const
Get the Last_exon_length member data.
TA GetA(void) const
Get the A member data.
const Tdata & Get(void) const
Get the member data.
TStep GetStep(void) const
Get the Step member data.
const TRange & GetRange(void) const
Get the Range member data.
const TStop & GetStop(void) const
Get the variant data.
const TLength & GetLength(void) const
Get the Length member data.
const TInternal_exon_length & GetInternal_exon_length(void) const
Get the Internal_exon_length member data.
const TStart & GetStart(void) const
Get the variant data.
TIn_intron GetIn_intron(void) const
Get the In_intron member data.
TTo_term GetTo_term(void) const
Get the To_term member data.
const TIntron & GetIntron(void) const
Get the variant data.
const TFirst_exon_length & GetFirst_exon_length(void) const
Get the First_exon_length member data.
TTo_single GetTo_single(void) const
Get the To_single member data.
TIn_exon GetIn_exon(void) const
Get the In_exon member data.
const TP & GetP(void) const
Get the P member data.
TInitp GetInitp(void) const
Get the Initp member data.
const TFirst_exon_phase_probabilities & GetFirst_exon_phase_probabilities(void) const
Get the First_exon_phase_probabilities member data.
TMax GetMax(void) const
Get the Max member data.
list< double > TPhase_probabilities
const TProbabilities & GetProbabilities(void) const
Get the Probabilities member data.
TInitp GetInitp(void) const
Get the Initp member data.
const TPhase_probabilities & GetPhase_probabilities(void) const
Get the Phase_probabilities member data.
const TLength & GetLength(void) const
Get the Length member data.
list< CRef< CGnomon_param > > Tdata
const TIntergenic & GetIntergenic(void) const
Get the variant data.
const TExon & GetExon(void) const
Get the variant data.
const TInternal_exon_phase_probabilities & GetInternal_exon_phase_probabilities(void) const
Get the Internal_exon_phase_probabilities member data.
TOrder GetOrder(void) const
Get the Order member data.
@ e_Coding_region
three elements (per phase)
void EvaluateInitialScore(State &r)