Replies: 1 comment
-
|
I think all it needs is this: start = 0
end = len(haplotype)
if haplotype[0] == tskit.MISSING_DATA:
# could have missing flank at start
start = np.where(haplotype != tskit.MISSING_DATA)[0][0]
if haplotype[-1] == tskit.MISSING_DATA:
# could have missing flank at end
end = np.where(haplotype != tskit.MISSING_DATA)[0][-1] + 1
result = self.find_path(
matcher=local_data.matcher,
child_id=self.sample_id_map[j],
haplotype=haplotype,
start=start,
end=end,
) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
There are a few use-cases of wanting to match samples that are e.g. single reads against a tree sequence. These would be represented by samples that have long missing flanking regions. The current sample matcher does the following:
I suspect it would be easy to override the start and end values here, and treat it a bit like a partial-length ancestor match. There might be fiddling later on to allow samples not to be matched anywhere though.
Beta Was this translation helpful? Give feedback.
All reactions