Skip to content

Commit

Permalink
Sanity check sequence length after primer stripping
Browse files Browse the repository at this point in the history
  • Loading branch information
apmasell committed Nov 6, 2014
1 parent 447a4d3 commit f1c79dd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions assembler.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ static bool align(
double rquality = 0;
ptrdiff_t len;

if (assembler->minoverlap + result->forward_offset >= result->forward_length || assembler->minoverlap + result->reverse_offset >= result->reverse_length) {
LOG(PANDA_DEBUG_BUILD, PANDA_CODE_NEGATIVE_SEQUENCE_LENGTH);
return false;
}

if (assembler->maxoverlap == 0) {
maxoverlap = result->forward_length < result->reverse_length ? result->forward_length : result->reverse_length;
} else if (maxoverlap > assembler->maxoverlap) {
Expand Down

0 comments on commit f1c79dd

Please sign in to comment.