-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAlignmentKernel.h
51 lines (38 loc) · 1.05 KB
/
AlignmentKernel.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
/*
* AlignmentKernel.h
*
* Created on: May 23, 2016
* Author: Tobias Neumann
* Email: [email protected]
*/
#ifndef ALIGNMENTKERNEL_H
#define ALIGNMENTKERNEL_H
struct Alignment {
char * read = 0;
char * ref = 0;
short readStart;
short readEnd;
short refStart;
short refEnd;
~Alignment() {
if (read != 0) delete[] read;
if (ref != 0) delete[] ref;
}
};
/*
Options:
int alignment_algorithm = opt & 0xF;
-> 0 .. Smith-Waterman
-> 1 .. Needleman-Wunsch
*/
class AlignmentKernel {
public:
virtual ~AlignmentKernel() {}
virtual void score_alignments(int const & opt, int const & aln_number, char const * const * const reads,
char const * const * const refs, short * const scores) = 0;
virtual void compute_alignments(int const & opt, int const & aln_number, char const * const * const reads,
char const * const * const refs, Alignment * const alignments) = 0;
};
typedef AlignmentKernel * (*fp_load_alignment_kernel)();
typedef void (*fp_delete_alignment_kernel)(AlignmentKernel*);
#endif /* ALIGNMENTKERNEL_H */