File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -574,15 +574,20 @@ main_hmr(int argc, const char **argv) {
574574 build_domains (cpgs, reset_points, state_ids, domains);
575575
576576 std::ofstream of;
577- if (!outfile.empty ()) of.open (outfile. c_str () );
577+ if (!outfile.empty ()) of.open (outfile);
578578 std::ostream out (outfile.empty () ? std::cout.rdbuf () : of.rdbuf ());
579579
580580 size_t good_hmr_count = 0 ;
581581 for (auto i = 0u ; i < size (domains); ++i)
582582 if (p_values[i] < domain_score_cutoff) {
583- domains[i].set_name (" HYPO" + to_string (good_hmr_count++));
584- out << domains[i] << ' \n ' ;
583+ domains[good_hmr_count] = domains[i];
584+ domains[good_hmr_count].set_name (" HYPO" + to_string (good_hmr_count));
585+ ++good_hmr_count;
585586 }
587+ domains.resize (good_hmr_count);
588+
589+ for (const auto &d: domains)
590+ out << d << ' \n ' ;
586591
587592 if (!hypo_post_outfile.empty ()) {
588593 if (verbose)
You can’t perform that action at this time.
0 commit comments