Skip to content

Commit e55318c

Browse files
committed
Revert "[FIX] build-tracks: bug introdcued in #cc1347b" (was actually not a bug)
This reverts commit 094decd.
1 parent 86a1f8f commit e55318c

File tree

7 files changed

+74387
-74382
lines changed

7 files changed

+74387
-74382
lines changed

src/phylocsf++build_tracks.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,12 @@ void run_tracks(const std::string & alignment_path, const Model & model, const T
187187
// the last 0-2 remaining basepairs in the bls array do not have a codon entry
188188
assert(lpr_per_codon[thread_id].size() * 3 <= bls_per_bp[thread_id].size());
189189

190-
for (size_t xx = 0, bls_pos = aln.skip_bases; xx < lpr_per_codon[thread_id].size(); ++xx, bls_pos += 3)
190+
size_t bls_pos;
191+
if (strand == '+')
192+
bls_pos = aln.skip_bases;
193+
else
194+
bls_pos = aln.length() % 3;
195+
for (size_t xx = 0; xx < lpr_per_codon[thread_id].size(); ++xx, bls_pos += 3)
191196
{
192197
const float bls_codon_sum = bls_per_bp[thread_id][bls_pos]
193198
+ bls_per_bp[thread_id][bls_pos + 1]

0 commit comments

Comments
 (0)