-
Notifications
You must be signed in to change notification settings - Fork 10
/
cigar.h
49 lines (43 loc) · 1.17 KB
/
cigar.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
#ifndef CIGAR_H
#define CIGAR_H
#include <iostream>
#include <utility>
#include <sstream>
#include <vector>
#include "Variant.h"
#include "api/BamAux.h" // CigarOp for conversion
#include "gssw.h"
using namespace std;
//using namespace vcf;
struct CigarElement {
int length;
char type;
void clear(void);
bool isInsertion();
bool isDeletion();
bool isIndel();
bool isSoftclip();
CigarElement() : length(0), type('M') { }
CigarElement(int l, char t) : length(l), type(t) { }
};
struct Cigar : vector<CigarElement> {
void append(const Cigar& c);
int refLen(void);
int readLen(void);
int softClipStart(void);
int softClipEnd(void);
bool isReference(void);
string str(void);
Cigar(void) { }
Cigar(int, char);
Cigar(const string& cigarStr);
Cigar(vector<vcf::VariantAllele>& vav);
Cigar(vcf::VariantAllele& va);
Cigar(vector<BamTools::CigarOp>& cigarData);
Cigar(gssw_cigar* c);
void toCigarData(vector<BamTools::CigarOp>& cigarData);
};
std::ostream& operator<<(std::ostream& o, const CigarElement& e);
std::ostream& operator<<(std::ostream& o, const Cigar& c);
Cigar join(std::vector<Cigar>& cigars);
#endif