-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFast3PMC.H
57 lines (51 loc) · 2.07 KB
/
Fast3PMC.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/****************************************************************
Fast3PMC.H
Copyright (C)2013 William H. Majoros ([email protected]).
This is OPEN SOURCE SOFTWARE governed by the Gnu General Public
License (GPL) version 3, as described at www.opensource.org.
****************************************************************/
#ifndef INCL_Fast3PMC_H
#define INCL_Fast3PMC_H
#include "BOOM/Alphabet.H"
#include "BOOM/File.H"
#include "ContentSensor.H"
#include "FastMarkovChain.H"
#include "ThreePeriodicMarkovChain.H"
#include "ThreePeriodicIMM.H"
class Fast3PMC : public ContentSensor
{
FastMarkovChain *chains[3];
Fast3PMC *revComp;
void load(const BOOM::String &filename);
void load(BOOM::File &);
void compileFrom(ThreePeriodicMarkovChain &);
void compileFrom(ThreePeriodicIMM &);
Fast3PMC(ContentType);
public:
Fast3PMC(ThreePeriodicMarkovChain &);
Fast3PMC(ThreePeriodicIMM &);
Fast3PMC(const BOOM::String &filename);
Fast3PMC(BOOM::File &);
virtual int getOrder() {return chains[0]->getOrder();}
virtual bool isPhased() {return true;}
virtual double scoreSingleBase(const Sequence &,const BOOM::String &,
int index,Symbol,char);
virtual void scoreSingleBase(const Sequence &,const BOOM::String &,
int index,Symbol,char,double &scorePhase0,
double &scorePhase1,double &scorePhase2);
// NOTE: before calling scoreSubsequence() you should call reset() to
// place the model into its initial state...unless you really
// know what you're doing...
virtual double scoreSubsequence(const Sequence &,const BOOM::String &,
int begin,int length,int phase);
virtual ContentSensor *reverseComplement();
virtual bool save(const BOOM::String &filename);
virtual bool save(ostream &os);
bool save(BOOM::File &);
virtual void useLogOdds(ContentSensor &nullModel)
{throw "Fast3PMC::useLogOdds() not yet implemented";}
virtual void useLogOdds_anonymous(ContentSensor &nullModel)
{throw "Fast3PMC::useLogOdds_anonymous() not yet implemented";}
virtual void reset(const Sequence &,const BOOM::String &,int pos);
};
#endif