Skip to content

Commit

Permalink
Minor changes and version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-p committed Jan 16, 2015
1 parent e42faca commit 59d3f64
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions include/SalmonConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
namespace salmon {
constexpr char majorVersion[] = "0";
constexpr char minorVersion[] = "2";
constexpr char patchVersion[] = "3";
constexpr char version[] = "0.2.3";
constexpr char patchVersion[] = "5";
constexpr char version[] = "0.2.5";
}

#endif // SALMON_CONFIG_HPP
19 changes: 9 additions & 10 deletions include/Sampler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,14 @@ namespace salmon {
double logFragProb = sailfish::math::LOG_1;

if (!salmonOpts.noFragLengthDist) {
switch (aln->fragType()) {
case ReadType::SINGLE_END:
if (aln->isLeft() and transcript.RefLength - aln->left() < fragLengthDist.maxVal()) {
logFragProb = fragLengthDist.cmf(transcript.RefLength - aln->left());
} else if (aln->isRight() and aln->right() < fragLengthDist.maxVal()) {
logFragProb = fragLengthDist.cmf(aln->right());
}
break;
case ReadType::PAIRED_END:
logFragProb = fragLengthDist.pmf(static_cast<size_t>(aln->fragLen()));
if(aln->fragLen() == 0) {
if (aln->isLeft() and transcript.RefLength - aln->left() < fragLengthDist.maxVal()) {
logFragProb = fragLengthDist.cmf(transcript.RefLength - aln->left());
} else if (aln->isRight() and aln->right() < fragLengthDist.maxVal()) {
logFragProb = fragLengthDist.cmf(aln->right());
}
} else {
logFragProb = fragLengthDist.pmf(static_cast<size_t>(aln->fragLen()));
}
}

Expand Down Expand Up @@ -214,6 +212,7 @@ namespace salmon {
double massInc{0.0};
bool choseAlignment{false};
for (auto& aln : alnGroup->alignments()) {
if (aln->logProb == LOG_0) { continue; }
aln->logProb -= sumOfAlignProbs;

massInc = std::exp(aln->logProb);
Expand Down
1 change: 1 addition & 0 deletions src/SalmonQuantifyAlignments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ void processMiniBatch(AlignmentLibrary<FragT>& alnLib,

// Normalize the scores
for (auto& aln : alnGroup->alignments()) {
if (aln->logProb == LOG_0) { continue; }
aln->logProb -= sumOfAlignProbs;

double r = uni(eng);
Expand Down

0 comments on commit 59d3f64

Please sign in to comment.