Skip to content

Commit 78e4c67

Browse files
adding check if alignment is empty
1 parent 4e3960a commit 78e4c67

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

sam_record.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ sam_rec::sam_rec(const string &line) {
131131
tags.push_back(tmp);
132132
}
133133

134+
bool
135+
sam_rec::empty() const {
136+
return pos == 0;
137+
}
138+
134139
void
135140
inflate_with_cigar(const sam_rec &sr, string &to_inflate,
136141
const char inflation_symbol) {

sam_record.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ class sam_rec {
117117
seq(_seq),
118118
qual(_qual) {}
119119
void add_tag(const std::string &the_tag) {tags.push_back(the_tag);}
120+
bool empty() const;
120121
std::string tostring() const;
121122
};
122123

0 commit comments

Comments
 (0)