Skip to content

Commit

Permalink
Fix logspace regression in aln-based salmon
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-p committed Jun 13, 2015
1 parent 75095f2 commit 3c797d1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/SalmonQuantifyAlignments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,14 @@ void processMiniBatch(AlignmentLibrary<FragT>& alnLib,

// EQCLASS
TranscriptGroup tg(txpIDs, txpIDsHash);
double auxProbSum{0.0};
for (auto& p : auxProbs) {
p -= auxDenom;
p = std::exp(p - auxDenom);
auxProbSum += p;
}
if (std::abs(auxProbSum - 1.0) > 0.01) {
std::cerr << "weights had sum of " << auxProbSum
<< " but it should be 1!!\n\n";
}
eqBuilder.addGroup(std::move(tg), auxProbs);

Expand Down

0 comments on commit 3c797d1

Please sign in to comment.