Repository navigation
Finish Variant Class - #2326
Finish Variant Class#2326
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2326 +/- ##
=======================================
Coverage 93.30% 93.30%
=======================================
Files 28 28
Lines 26510 26553 +43
Branches 1211 1213 +2
=======================================
+ Hits 24734 24776 +42
- Misses 1744 1745 +1
Partials 32 32
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
776db74 to
88c10f6
Compare
|
Getting some codecov weirdness here, I'm sure the lines are covered that it says aren't. |
jeromekelleher
left a comment
There was a problem hiding this comment.
LGTM, few minor comments.
|
|
||
| def test_isolated_as_missing(self): | ||
| ts = self.get_example_tree_sequence() | ||
| v = _tskit.Variant( |
| After creation a Variant is not yet decoded, and has no genotypes. | ||
| To decode a Variant, call the :meth:`decode` method. The Variant class will then | ||
| use a Tree, internal to the Variant, to seek to the position of the site and decode | ||
| the genotypes at that site. As such it is currently much more efficient to decode |
There was a problem hiding this comment.
I think it'll always be more efficient to do it this way, indexes will just make it less inefficient to randomly seek. I'd say "It is therefore much more efficient to sites in sequential genomic order, either in a forwards or backwards direction, than to do so randomly".
| samples at the current site. | ||
| """ | ||
| return self._ll_variant.alleles[-1] is None | ||
| return ( |
There was a problem hiding this comment.
This is creating the alleles tuple twice I guess? This gets called a lot, so makes sense to keep it tight.
88c10f6 to
3892e0d
Compare
|
Fixed the comments, thanks! |
3892e0d to
e585667
Compare
Fixes #2176