forked from josiahseaman/skittle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNucleotideLinker.h
56 lines (38 loc) · 1.22 KB
/
NucleotideLinker.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
#ifndef NLINK
#define NLINK
//#include <GL/glut.h>
#include <QtOpenGL/QGLWidget>
#include <vector>
#include <string>
#include <list>
#include <map>
#include <algorithm>
#include <math.h>
#include "NucleotideLink.h"
#define PI 3.141592653589793
using namespace std;
class NucleotideLinker
{
public:
int F_width;
int min_width;
vector<NucleotideLink> links;
NucleotideLinker();
/*
inline NucleotideLink operator[] (int index)
{
return link_map[ (index/8) * 8 ];//round down index
}*/
void display();
void calculate(string sequence, int min = 200);
vector<float> smooth( int preferred_width, int blur_size);
// void tie_up_loose_ends(vector<float>& width_list);
private:
void draw_arc(int distance);
void DrawArc(float r, float cx = 0, float cy = 0, float start_angle = PI, float arc_angle= PI, int num_segments = 0);
NucleotideLink multiples_check(const string& seq, NucleotideLink match, int consensus_width);
NucleotideLink localized_search(const string& seq, int start, int dist, unsigned int range);
void check_for_max(const string& seq, int dist, int index, short int& max, int& best_distance);
float average( const list<int>& window );
};
#endif