Skip to content

Commit 5e479fe

Browse files
authored
Merge pull request #404 from ksahlin/aemb-o
Make --aemb work with -o
2 parents 64dee19 + e1ea5ba commit 5e479fe

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/main.cpp

+3-6
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ InputBuffer get_input_buffer(const CommandLineOptions& opt) {
105105
}
106106
}
107107

108-
void output_abundance(const std::vector<double>& abundances, const References& references){
108+
void output_abundance(std::ostream& out, const std::vector<double>& abundances, const References& references){
109109
for (size_t i = 0; i < references.size(); ++i) {
110-
std::cout << references.names[i] << '\t' << std::fixed << std::setprecision(6) << abundances[i] / double(references.sequences[i].size()) << std::endl;
110+
out << references.names[i] << '\t' << std::fixed << std::setprecision(6) << abundances[i] / double(references.sequences[i].size()) << std::endl;
111111
}
112112
}
113113

@@ -356,11 +356,8 @@ int run_strobealign(int argc, char **argv) {
356356
abundances[j] += worker_abundances[i][j];
357357
}
358358
}
359-
360-
// output the abundance file
361-
output_abundance(abundances, references);
359+
output_abundance(out, abundances, references);
362360
}
363-
364361

365362
logger.info() << "Total mapping sites tried: " << tot_statistics.tot_all_tried << std::endl
366363
<< "Total calls to ssw: " << tot_statistics.tot_aligner_calls << std::endl

0 commit comments

Comments
 (0)