Augustus 3.4.0
Loading...
Searching...
No Matches
ncmodel.hh
1/*
2 * ncmodel.hh
3 *
4 * License: Artistic License, see file LICENSE.TXT or
5 * https://opensource.org/licenses/artistic-license-1.0
6 */
7
8#ifndef _NCMODEL_HH
9#define _NCMODEL_HH
10
11#include "statemodel.hh"
12
13
19 class NcModel : public StateModel {
20public:
21 NcModel();
22 ~NcModel();
23
24 StateType getStateType( ) const {
25 return nctype;
26 }
27
31 void buildModel( const AnnoSequence* annoseq, int parIndex );
32 void registerPars( Parameters* parameters);
33
34 void printProbabilities ( int zusNumber, BaseCount *bc, const char* suffix = NULL );
35 void initAlgorithms ( Matrix<Double>&, int);
36 void viterbiForwardAndSampling(ViterbiMatrixType&, ViterbiMatrixType&, int, int,
37 AlgorithmVariant, OptionListItem&);
38 Double emiProbUnderModel (int begin, int end) const;
39 Double endPartEmiProb (int begin, int end, int endOfBioExon) const;
40 Double notEndPartEmiProb (int begin, int end, int endOfBioExon, Feature *exonparts) const;
41 void getEndPositions ( int end, int &beginOfEndPart, int &endOfBioExon) const;
42 void precomputeTxEndProbs ( );
43 static void init();
44 static void resetPars(){
45 if (nccount == 0)
46 return;
47 initSnippetProbs();
48 initAlgorithmsCalled = false;
49 }
50 static void updateToLocalGC(int from = -1, int to = -1);
51 static void readAllParameters();
52 static void resetModelCount(){nccount = 0;};
53
54private:
55 // Double seqProb ( int left, int right) const;
56 void computeLengthDistributions( );
57 Double longIntronProb(int internalBegin, int internalEnd) const;
58 static void initSnippetProbs();
59
60private:
61 StateType nctype;
62 Strand strand;
63 Integer gweight;
64 double pIntron; // geometric intron probability for states ncintron, rncintron
65 EOPList eop;
66 static Integer nccount;
67 static vector<Double> lenDistInternal; // length distribution of internal, initial and terminal
68 static vector<Double> lenDistSingle; // length distribution of nc genes with a single exon
69 static Boolean hasLenDist;
70 static bool initAlgorithmsCalled;
71 static bool haveSnippetProbs;
72 static SnippetProbs *snippetProbs;
73 static SegProbs *segProbs;
74 static int boundSpacing; // without hints 5' and 3' transcript end only every ttsSpacing bases, for speed
75 static vector<Double> ttsProbPlus, ttsProbMinus;
76 static vector<Double> tssProbPlus, tssProbMinus;
77};
78
79
83class NcModelError : public ProjectError {
84public:
85 NcModelError(string msg) : ProjectError(msg) {}
86};
87
88#endif // _NCMODEL_HH
Definition gene.hh:548
Definition motif.hh:33
data structure to store possible endOfPred positions to iterate directly only over those endOfPred po...
Definition statemodel.hh:266
Hints on the gene structure.
Definition hints.hh:60
This class implements a double object with a very large range.
Definition lldouble.hh:31
A simple matrix class. Base class for all mathematical matrix objects.
Definition matrix.hh:27
Definition ncmodel.hh:83
Model for non-protein-coding genes (nc)
Definition ncmodel.hh:19
void buildModel(const AnnoSequence *annoseq, int parIndex)
Definition ncmodel.cc:83
Options lists are used for sampling; items also in backtracking.
Definition vitmatrix.hh:748
Definition merkmal.hh:148
Definition types.hh:449
ProjectError()
Definition types.hh:460
another class for caching probabilities of sequence segments
Definition statemodel.hh:232
Definition statemodel.hh:182
This is the base interface class common to all state model classes (ExonModel, IntronModel,...
Definition statemodel.hh:65
An array of Viterbi columns.
Definition vitmatrix.hh:687