source: trunk/GDE/MAFFT/mafft-7.055-with-extensions/extensions/mxscarna_src/AlifoldMEA.h

Last change on this file was 10371, checked in by aboeckma, 11 years ago

updated mafft version. Added extensions (no svn ignore, yet)

File size: 1.6 KB
Line 
1#ifndef _ALIFOLDMEA_H_
2#define _ALIFOLDMEA_H_
3
4#include <iostream>
5#include <string>
6#include <cassert>
7#include "scarna.hpp"
8#include "nrutil.h"
9#include "Util.hpp"
10#include "Beta.hpp"
11#include "BPPMatrix.hpp"
12#include "MultiSequence.h"
13#include "Sequence.h"
14#include "SafeVector.h"
15
16using namespace std;
17
18namespace MXSCARNA {
19class AlifoldMEA {
20    MultiSequence *alignment;
21    SafeVector<BPPMatrix*> BPPMatrices;
22    float BasePairConst;
23    Trimat<float> M;
24    Trimat<int> traceI;
25    Trimat<int> traceJ;
26    Trimat<float> bppMat;
27    NRVec<float>  Qi;
28    NRVec<float>  Qj;
29    NRVec<char> ssCons;
30   
31    static const int TURN;
32
33    void Initialization();
34    void makeProfileBPPMatrix(const MultiSequence *Sequences);
35    void DP();
36    void TraceBack();
37 public:
38    AlifoldMEA(MultiSequence *inalignment, SafeVector<BPPMatrix*> &inBPPMatrices, float inBasePairConst = 6) :
39        alignment(inalignment), BPPMatrices(inBPPMatrices),
40        BasePairConst(inBasePairConst),
41        M(inalignment->GetSequence(0)->GetLength()+1), 
42        traceI(inalignment->GetSequence(0)->GetLength()+1),
43        traceJ(inalignment->GetSequence(0)->GetLength()+1),
44        bppMat(inalignment->GetSequence(0)->GetLength() + 1), 
45        Qi(inalignment->GetSequence(0)->GetLength() + 1), 
46        Qj(inalignment->GetSequence(0)->GetLength() + 1), 
47        ssCons(inalignment->GetSequence(0)->GetLength() + 1){}
48
49    void Run();
50
51    string *getSScons() {
52        string *sscons = new string();
53        sscons->push_back(' ');
54        int length = alignment->GetSequence(0)->GetLength();
55        for (int i = 1; i <= length; i++) {
56            sscons->push_back(ssCons[i]);
57        }
58       
59        return sscons;
60    }
61};
62}
63#endif // _ALIFOLDMEA_H_
Note: See TracBrowser for help on using the repository browser.