Skip to content

Commit

Permalink
no reason not to write out flenDist.txt in alignment mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Patro committed Jan 14, 2021
1 parent 42b4192 commit cec542d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/SalmonQuantify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2704,7 +2704,7 @@ transcript abundance from RNA-seq reads
bfs::path libCountFilePath = outputDirectory / "lib_format_counts.json";
experiment.summarizeLibraryTypeCounts(libCountFilePath);

// Test writing out the fragment length distribution
// Write out the fragment length distribution
if (!sopt.noFragLengthDist) {
bfs::path distFileName = sopt.paramsDirectory / "flenDist.txt";
{
Expand Down
10 changes: 10 additions & 0 deletions src/SalmonQuantifyAlignments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1498,6 +1498,16 @@ bool processSample(AlignmentLibraryT<ReadT>& alnLib, size_t requiredObservations
jointLog->info("done.");
}

// If we have the fragment length distribution, then dump it here.
if (!sopt.noFragLengthDist) {
bfs::path distFileName = sopt.paramsDirectory / "flenDist.txt";
{
std::unique_ptr<std::FILE, int (*)(std::FILE*)> distOut(
std::fopen(distFileName.c_str(), "w"), std::fclose);
fmt::print(distOut.get(), "{}\n",
alnLib.fragmentLengthDistribution()->toString());
}
}

// If we are dumping the equivalence classes, then
// do it here.
Expand Down

0 comments on commit cec542d

Please sign in to comment.