Skip to content

Commit

Permalink
explicit number casts
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasrausch committed Jul 2, 2015
1 parent 90f7239 commit 59ee139
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/bolog.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ struct BoLog {

// Phred-scaled genotype likelihoods
uint32_t pl[3];
pl[0] = boost::math::round(-10 * gl[0]);
pl[1] = boost::math::round(-10 * gl[1]);
pl[2] = boost::math::round(-10 * gl[2]);
pl[0] = (uint32_t) boost::math::round(-10 * gl[0]);
pl[1] = (uint32_t) boost::math::round(-10 * gl[1]);
pl[2] = (uint32_t) boost::math::round(-10 * gl[2]);
if ((peDepth) && (pl[0] + pl[1] + pl[2] > 0)) {
FLP likelihood = std::log10((1-1/(bl.phred2prob[pl[0]]+bl.phred2prob[pl[1]]+bl.phred2prob[pl[2]])));
FLP likelihood = (FLP) std::log10((1-1/(bl.phred2prob[pl[0]]+bl.phred2prob[pl[1]]+bl.phred2prob[pl[2]])));
likelihood = (likelihood > SMALLEST_GL) ? likelihood : SMALLEST_GL;
gq = boost::math::round(-10 * likelihood);
gq = (TGQ) boost::math::round(-10 * likelihood);
if (glBest==0) gtype = "1/1";
else if (glBest==1) gtype = "0/1";
else gtype = "0/0";
Expand Down

0 comments on commit 59ee139

Please sign in to comment.