-
Notifications
You must be signed in to change notification settings - Fork 78
/
range.h
54 lines (45 loc) · 1.09 KB
/
range.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
/**
* range.h
*/
#ifndef RANGE_H_
#define RANGE_H_
#include <stdint.h>
#include "assert_helpers.h"
#include "btypes.h"
#include "ds.h"
/**
* A range along with the alignment it represents.
*/
struct Range {
Range() :
top(OFF_MASK), bot(0), cost(0), stratum(0), numMms(0),
fw(true), mate1(true), ebwt(NULL)
{
mms.clear();
refcs.clear();
}
bool valid() const {
return top < OFF_MASK;
}
void invalidate() {
top = OFF_MASK;
}
TIndexOffU top; // top of range
TIndexOffU bot; // bottom of range
uint16_t cost; // cost
uint32_t stratum; // stratum
uint32_t numMms; // # mismatches
bool fw; // the forward orientation of read aligned?
bool mate1; // read aligned is #1 mate/single?
EList<TIndexOffU> mms; // list of positions with mismatches
EList<uint8_t> refcs; // reference characters at mismatch positions
// const Ebwt<seqan::String<seqan::Dna> > *ebwt;
const Ebwt *ebwt;
bool repOk() const {
assert_eq(refcs.size(), mms.size());
assert_eq(numMms, mms.size());
assert_leq(stratum, numMms);
return true;
}
};
#endif /* RANGE_H_ */