Create a VariantData.from_arrays method#1074
Create a VariantData.from_arrays method#1074hyanwong wants to merge 2 commits intotskit-dev:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1074 +/- ##
=======================================
Coverage 87.16% 87.16%
=======================================
Files 5 5
Lines 1792 1792
Branches 317 317
=======================================
Hits 1562 1562
Misses 140 140
Partials 90 90
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c2bd995 to
aeaa446
Compare
This makes an in-memory vdata object that can be used for testing. Fixes tskit-dev#924
See tskit-dev#1028 - however we still have an out-by-one error when taking the sequence length from the VCF contig
jeromekelleher
left a comment
There was a problem hiding this comment.
I'm not sure this is the right way to go, and the API will result in more hard to maintain tests.
I'm thinking about some upstream infractructure in bio2zarr which will make it easy to create Zarr groups that are valid vcf zarr entitities. Leave it with me for now, please.
| @classmethod | ||
| def from_arrays( | ||
| cls, | ||
| variant_matrix_phased, |
There was a problem hiding this comment.
We could indeed use that, but adding _phased is intended to indicate to any user that it is assumed phased. But if you are refactoring, then perhaps not worth me revisiting it?
If there is a neat bio2zarr way to make in-memory VariantData versions from simple arrays for testing, then great.
This makes an in-memory vdata object that can be used for testing. Fixes #924