Skip to content

Commit 05de791

Browse files
committed
Add learnings from Jouni about working with haplotypes that end
1 parent 933056a commit 05de791

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/haplotype_extracter.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ Path path_from_thread_t(thread_t& t, const HandleGraph& source);
5050
// then the search stops. The search will also emit a result if any selected sample stops.
5151
//
5252
// No empty sub-haplotypes will be returned.
53+
//
54+
// For haplotypes emitted because a sample stopped, the corresponding GBWT
55+
// search state will have been extended with the end marker. It will have the
56+
// correct .size() for the number of haplotypes that stop there, but it will
57+
// *not* be usable with locate() queries! If you need to do locate() queries,
58+
// you need to filter the output and keep only results that would have
59+
// satisfied the stop_fn predicate.
60+
//
61+
// TODO: Adopt a different internal format that doesn't have such a weird
62+
// quirk.
5363
vector<pair<vector<gbwt::node_type>, gbwt::SearchState> > list_haplotypes(const HandleGraph& graph,
5464
const gbwt::GBWT& gbwt,
5565
handle_t start,

0 commit comments

Comments
 (0)