-
Notifications
You must be signed in to change notification settings - Fork 0
/
malign.h
44 lines (38 loc) · 998 Bytes
/
malign.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
#ifndef _MALIGN_H_
#define _MALIGN_H_
#include<string>
#include<vector>
#include<iostream>
#include "align.h"
using namespace std;
class MAlignment{
private:
vector<vector<string> > seqs; // This is the original sequences
vector<vector<string> > profile;//This is the set of aligned sequences
vector<vector<string> > alignment;//Final alignment
vector<string> names;
float gap;
float mismatch;
float similar;
float verysimilar;
float identical;
void UpdateProfile();
bool FloatEqual(float A, float B);
public:
//default constructor
MAlignment(){
gap=1.0;
mismatch=1.0;
similar=-0.5;
verysimilar = -1.0;
identical=-2.0;
}
MAlignment(float a,float b,float c);
void AddSeq(vector<string>& a); // add a single sequence
void AddSeq(vector<vector<string> > & a);// add a set of sequences
float align();//Main program to do the alignment
//float subalign(int m,int n);
void outputalign();
float Similarity(string a,string b);
};
#endif