-
Notifications
You must be signed in to change notification settings - Fork 1
/
Alignment.h
37 lines (30 loc) · 917 Bytes
/
Alignment.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
#ifndef _H_TNEMNGILA_
#define _H_TNEMNGILA_
#include"bam_alignment_record.h"
#include<string>
#include<vector>
#include<utility>
class Alignment
{
public:
Alignment(){}
Alignment(BamAlignmentRecord*& bar);
void setBar(BamAlignmentRecord*& bar);
public:
int getReadType();
int getClipType(int& pos1, int& len1, int& pos2, int& len2);
std::string getCigar();
void str2Cigar(std::string cigar, std::vector<std::pair<std::string, int> >& vcigar);
bool isClipped();
bool isHardClipped();
bool isDuplicate();//whether optimal duplicate
bool isPrimaryAlign();//whether is primary alignment
bool passQualityCK();//whether fails quality check
bool isMateMapped();//whether mate read is mapped or not
bool isFirstInPair();//for pair-end reads, it is the first in pair.
bool isSecondInPair();//for pair-end reads, it is the second in pair.
private:
BamAlignmentRecord* bar;
std::string cigar;
};
#endif