Skip to content

Commit

Permalink
Merge branch 'preprint-testing'
Browse files Browse the repository at this point in the history
  • Loading branch information
geetduggal committed Jun 26, 2015
2 parents f9d56f8 + 57aec9a commit 21bf89a
Show file tree
Hide file tree
Showing 6 changed files with 283 additions and 84 deletions.
4 changes: 4 additions & 0 deletions include/EquivalenceClassBuilder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,17 @@ class EquivalenceClassBuilder {

bool finish() {
active_ = false;
size_t totalCount{0};
for (auto kv = countMap_.begin(); !kv.is_end(); ++kv) {
kv->second.normalizeAux();
totalCount += kv->second.count;
countVec_.push_back(*kv);
}

logger_->info("Computed {} rich equivalence classes "
"for further processing", countVec_.size());
logger_->info("Counted {} total reads in the equivalence classes ",
totalCount);
return true;
}

Expand Down
5 changes: 4 additions & 1 deletion include/SalmonOpts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ struct SalmonOpts {
bool maxMEMIntervals; // If true, don't split (S)MEMs into MEMs
*/

SalmonOpts() : splitSpanningSeeds(false), noFragLengthDist(false),
SalmonOpts() : allowOrphans(false), splitSpanningSeeds(false), noFragLengthDist(false),
noEffectiveLengthCorrection(false), useReadCompat(false),
maxReadOccs(200), extraSeedPass(false),
mappingCacheMemoryLimit(5000000) {}

bool allowOrphans; // Consider orphaned reads when performing lightweight alignemnt.

bool splitSpanningSeeds; // Attempt to split seeds that span multiple transcripts.

bool noFragLengthDist; // Do not give a fragment assignment a likelihood based on an emperically
Expand Down
6 changes: 5 additions & 1 deletion include/Transcript.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,12 @@ class Transcript {
return std::numeric_limits<uint8_t>::max();
}

inline void setSharedCount(double sc) {
sharedCount_.store(sc);
}

inline void addSharedCount(double sc) {
salmon::utils::incLoop(sharedCount_, sc);
salmon::utils::incLoop(sharedCount_, sc);
}

inline void setLastTimestepUpdated(uint64_t currentTimestep) {
Expand Down
8 changes: 5 additions & 3 deletions src/CollapsedEMOptimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,10 @@ size_t markDegenerateClasses(
errstream << "}\n";
errstream << "============================\n\n";

jointLog->info(errstream.str());
bool verbose{false};
if (verbose) {
jointLog->info(errstream.str());
}
++numDropped;
kv.first.setValid(false);
}
Expand Down Expand Up @@ -405,7 +408,6 @@ bool CollapsedEMOptimizer::optimize(ExpT& readExp,
alphaSum += alphas[i];
}


if (alphaSum < minWeight) {
jointLog->error("Total alpha weight was too small! "
"Make sure you ran salmon correclty.");
Expand All @@ -417,9 +419,9 @@ bool CollapsedEMOptimizer::optimize(ExpT& readExp,
for (size_t i = 0; i < transcripts.size(); ++i) {
// Set the mass to the normalized (after truncation)
// relative abundance
transcripts[i].setSharedCount(alphas[i]);
transcripts[i].setMass(alphas[i] / alphaSum);
}

return true;
}

Expand Down

0 comments on commit 21bf89a

Please sign in to comment.