From 5c0f196a683cb01a4233f9cf22999b449da25738 Mon Sep 17 00:00:00 2001 From: Jouni Siren Date: Fri, 25 Oct 2019 14:20:49 -0700 Subject: [PATCH] Stupid bug fix --- path_cover.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/path_cover.cpp b/path_cover.cpp index bc7071c..3e167fe 100644 --- a/path_cover.cpp +++ b/path_cover.cpp @@ -265,7 +265,7 @@ struct LocalHaplotypes { bool success = false; BestCoverage best; - auto start = (path.size() + 1 < k ? path.begin() : path.end() - (path.size() - 1)); + auto start = (path.size() + 1 < k ? path.begin() : path.end() - (k - 1)); std::vector context(start, path.end()); gbwt::BidirectionalState state = graph.bd_find(context); graph.follow_paths(state, false, [&](const gbwt::BidirectionalState& next) -> bool