Skip to content

Commit 3bd398d

Browse files
committed
Cigar string and read different length bug fixed.
1 parent 220d611 commit 3bd398d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/alignment/alignment.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ int CheckAlignmentSane(std::vector<unsigned char> &alignment, const SingleSequen
297297
// If there are insertions following deletions (or other way around), something is wrong again.
298298
if ((last_move == EDLIB_I && alignment_char == EDLIB_D) || (last_move == EDLIB_D && alignment_char == EDLIB_I)) {
299299
LogSystem::GetInstance().Log(VERBOSE_LEVEL_ALL_DEBUG, true, FormatString("CheckAlignmentSane returned false! return 2. Consecutive I and D operations! last_move = %c, alignment_char = %c. num_same_moves = %ld, qname: '%s', read_length: %ld, ref_length: %ld\n", (last_move == EDLIB_I) ? 'I' : 'D', (alignment_char == EDLIB_I) ? 'I' : 'D', num_same_moves, read->get_header(), read_length, ref_length), "CheckAlignmentSane");
300-
return 0;
300+
return read_length != read->get_sequence_length();
301301
}
302302
}
303303
if (i < alignment.size()) {

src/graphmap/process_read.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ int GraphMap::RNAGenerateAlignments_(int order_number, MappingData *mapping_data
11361136
cigarExons2.push_back(cigExon);
11371137
}
11381138

1139-
double difference = abs(score22-score);
1139+
double difference = fabs(score22-score);
11401140
betterCigarExons = cigarExons1;
11411141

11421142
if(aln_result2->rv == is::AlignmentReturnValue::OK) {

0 commit comments

Comments
 (0)