Skip to content

Commit

Permalink
Num observed != num assigned
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-p committed Nov 14, 2015
1 parent 8456d6b commit 9a71b6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions include/ReadExperiment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ class ReadExperiment {

void setNumObservedFragments(uint64_t numObserved) { numObservedFragments_ = numObserved; }

uint64_t numObservedFragments() {
return numObservedFragments_;
}

double mappingRate() {
if (quantificationPasses_ > 0) {
return static_cast<double>(numAssignedFragsInFirstPass_) / numObservedFragsInFirstPass_;
Expand Down
2 changes: 1 addition & 1 deletion src/SalmonQuantify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3212,7 +3212,7 @@ transcript abundance from RNA-seq reads
{
bfs::path statPath = outputDirectory / "stats.tsv";
std::ofstream statStream(statPath.string(), std::ofstream::out);
statStream << "numObservedFragments\t" << experiment.numMappedFragments() << '\n';
statStream << "numObservedFragments\t" << experiment.numObservedFragments() << '\n';
for (auto& t : experiment.transcripts()) {
auto l = (sopt.noEffectiveLengthCorrection) ? t.RefLength :
std::exp(t.getCachedLogEffectiveLength());
Expand Down

0 comments on commit 9a71b6c

Please sign in to comment.