Skip to content

Commit

Permalink
Merge pull request #544 from ekg/skip-depth-partials
Browse files Browse the repository at this point in the history
avoid position skipping logic when getting partial alignments covering haplotype calls
  • Loading branch information
ekg committed May 30, 2019
2 parents e09b591 + fbaed2e commit 7e863ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/AlleleParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1992,9 +1992,9 @@ void AlleleParser::updateAlignmentQueue(long int position,
}

if (!gettingPartials && currentAlignment.ENDPOSITION < position) {
cerr << currentAlignment.QNAME << " at " << currentSequenceName << ":" << currentAlignment.POSITION << " is out of order!"
<< " expected after " << position << endl;
continue;
cerr << currentAlignment.QNAME << " at " << currentSequenceName << ":" << currentAlignment.POSITION << " is out of order!"
<< " expected after " << position << endl;
continue;
}

// otherwise, get the sample name and register the alignment to generate a sequence of alleles
Expand Down Expand Up @@ -2029,7 +2029,7 @@ void AlleleParser::updateAlignmentQueue(long int position,
if (parameters.skipCoverage > 0) {
for (unsigned long int i = currentAlignment.POSITION; i < currentAlignment.ENDPOSITION; ++i) {
unsigned long int x = ++coverage[i];
if (x > parameters.skipCoverage) {
if (x > parameters.skipCoverage && !gettingPartials) {
considerAlignment = false;
// we're exceeding coverage at this position for the first time, so clean up
if (!coverageSkippedPositions.count(i)) {
Expand Down Expand Up @@ -3224,7 +3224,7 @@ void AlleleParser::buildHaplotypeAlleles(
for (deque<RegisteredAlignment>::iterator r = ras.begin(); r != ras.end(); ++r) {
RegisteredAlignment& ra = *r;
if ((ra.start > currentPosition && ra.start < currentPosition + haplotypeLength)
|| (ra.end > currentPosition && ra.end < currentPosition + haplotypeLength)) {
|| (ra.end > currentPosition && ra.end < currentPosition + haplotypeLength)) {
Allele* aptr;
bool allowPartials = true;
ra.fitHaplotype(currentPosition, haplotypeLength, aptr, allowPartials);
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Compiler

CXXFLAGS=-O3 -D_FILE_OFFSET_BITS=64 -g
CXXFLAGS=-O3 -D_FILE_OFFSET_BITS=64 -g -ggdb
CXX=g++ ${CXXFLAGS}
C=gcc

Expand Down

0 comments on commit 7e863ee

Please sign in to comment.