Repository navigation
Allow haplotypes and alignments to have left, right, samples params - #2397
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2397 +/- ##
=======================================
Coverage 93.33% 93.33%
=======================================
Files 28 28
Lines 26952 26977 +25
Branches 1236 1245 +9
=======================================
+ Hits 25155 25180 +25
Misses 1763 1763
Partials 34 34
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
(Note that as written your description will close #2092) Should |
Yep, That was basically deliberate. I will open a new issue with the unaddressed bits there.
I guess it could. Do you want me to add it to this PR then? |
|
p.s. do we want "start" and "stop" or "left" and "right"? |
Everywhere else that we talk about genomic intervals we talk about left, right, so that seems to make the most sense. |
I agree. It's clearly a genomic position if we say |
07f6175 to
d74df96
Compare
|
@hyanwong Is this ready for review? |
Yes, it is.. Thanks Ben. |
benjeffery
left a comment
There was a problem hiding this comment.
LGTM!
Thanks for picking this one up - great to use all the new Variant machinery.
f16ffae to
e296327
Compare
e296327 to
31b7e63
Compare
|
Changes made. Would be nice to merge before the new point release, but whatever. |
|
|
||
| def test_bad_left(self): | ||
| ts = tskit.TableCollection(10).tree_sequence() | ||
| for bad_left in [-1, 10, 100, np.nan, np.inf, -np.inf]: |
There was a problem hiding this comment.
We prefer pytest.mark.parametrize for this sort of thing going forward
Description
Adds "samples", "start", and "stop" parameters to
ts.haplotypes()andts.alignments(). This (partially) fixes #2092. I was worried that callingvar.decode(site_id)by simply iterating over the site ids would be slow, but that's how thesites()method does it anyway.Is this the right approach? I haven't written any new tests until it's deemed sensible.
PR Checklist: