Skip to content

Commit

Permalink
emit last range, if any
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaGuarracino committed Mar 14, 2024
1 parent ff88bfc commit cdc1733
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/subcommand/paths_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,22 @@ int main_paths(int argc, char** argv) {
}
});
}

// Emit last non reference range, if any
if (end > start && (end - start) >= min_size_in_bp) {
if (_show_step_ranges) {
std::string step_range_str = "";
for (auto& step : step_range) {
const handle_t handle = graph.get_handle_of_step(step);
step_range_str += std::to_string(graph.get_id(handle)) + (graph.get_is_reverse(handle) ? "-" : "+") + ",";
}
#pragma omp critical (cout)
std::cout << graph.get_path_name(path) << "\t" << start << "\t" << end << "\t" << step_range_str.substr(0, step_range_str.size() - 1) << std::endl; // trim the trailing comma from step_range
} else {
#pragma omp critical (cout)
std::cout << graph.get_path_name(path) << "\t" << start << "\t" << end << std::endl;
}
}
}
}

Expand Down

0 comments on commit cdc1733

Please sign in to comment.