-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSeed.h
45 lines (34 loc) · 981 Bytes
/
Seed.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
#ifndef SEED_H_
#define SEED_H_
#include <stdlib.h>
#include <vector>
#include <string>
#include <iostream>
#include <stdint.h>
#include "pattern.h"
#define MAX_BUCKETS 256
class Seed{
private:
int32_t length;
int32_t weight;
int32_t dontCare;
std::vector<char> dontCarePos;
std::vector<char> matchPos;
public:
Seed(int32_t, int32_t );
void generatePattern();
int32_t getLength();
int32_t getWeight();
int32_t getDontCare();
bool fillDontCare(std::vector<char> &, char *);
bool fillDontCareScore(std::vector<char> & vec, char * seq);
char getMismatches(std::vector<char> & ,std::vector<char> &);
int32_t getScore(std::vector<char> & ,std::vector<char> &);
void getFirstWord(unsigned char &, char *);
void getNextWord(uint32_t &, char *);
static void init();
static unsigned char alphabet[MAX_BUCKETS];
static unsigned char alphabetRev[MAX_BUCKETS];
static char score[4][4];
};
#endif