Skip to content

Commit

Permalink
Update base.cpp
Browse files Browse the repository at this point in the history
Fixed bug with physical coverage (hopefully)
  • Loading branch information
gbirolo authored Jan 2, 2020
1 parent 851306f commit bd6fbe5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,14 @@ int main(int argc, char *argv[]) {
// increment coverage with alignments that start here
while (more_alignments_for_ref && next_change == alignment.Position) {
if (physical_coverage) {
if (alignment.InsertSize > 0)
if (alignment.InsertSize > 0) {
coverage_ends.push({alignment.Position + alignment.InsertSize, alignment.IsReverseStrand()});
} else
coverage.inc(alignment.IsReverseStrand());
}
} else {
coverage_ends.push({alignment.GetEndPosition(), alignment.IsReverseStrand()});
coverage.inc(alignment.IsReverseStrand());
coverage.inc(alignment.IsReverseStrand());
}
more_alignments = input.get_next_alignment(alignment);
more_alignments_for_ref = more_alignments && alignment.RefID == ref_id;
}
Expand Down

0 comments on commit bd6fbe5

Please sign in to comment.