Skip to content

Commit

Permalink
Quiet debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
adamnovak committed Jun 28, 2024
1 parent 0555273 commit 3277498
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include "region.hpp"
#include <sstream>

// #define debug_simplify

using namespace vg::io;

namespace vg {
Expand Down Expand Up @@ -1286,7 +1288,6 @@ Path concat_paths(const Path& path1, const Path& path2) {
return simplify(res);
}

#define debug_simplify
Path simplify(const Path& p, bool trim_internal_deletions) {
Path s;
s.set_name(p.name());
Expand All @@ -1299,7 +1300,9 @@ Path simplify(const Path& p, bool trim_internal_deletions) {
// push inserted sequences to the left
for (size_t i = 0; i < p.mapping_size(); ++i) {
auto m = simplify(p.mapping(i), trim_internal_deletions);
#ifdef debug_simplify
std::cerr << "Simplify mapping " << pb2json(p.mapping(i)) << " to " << pb2json(m) << std::endl;
#endif
// remove empty mappings as these are redundant
if (trim_internal_deletions) {
// remove wholly-deleted or empty mappings as these are redundant
Expand Down
2 changes: 0 additions & 2 deletions src/unittest/path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ TEST_CASE("Path simplification tolerates adjacent insertions and deletions", "[p
// Simplify without replacing deletions with skips
auto simple = simplify(path, false);

std::cerr << pb2json(simple) << std::endl;

// We need to still touch all the nodes after simplification.
REQUIRE(simple.mapping_size() == 3);
REQUIRE(simple.mapping(0).position().node_id() == 68);
Expand Down

2 comments on commit 3277498

@adamnovak
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vg CI tests complete for branch fix-adjacent-indels. View the full report here.

16 tests passed, 0 tests failed and 0 tests skipped in 17244 seconds

@adamnovak
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vg CI tests complete for branch lr-giraffe. View the full report here.

16 tests passed, 0 tests failed and 0 tests skipped in 17281 seconds

Please sign in to comment.