-
Notifications
You must be signed in to change notification settings - Fork 10
Remove schema data #343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove schema data #343
Conversation
9f727a1
to
f3c040d
Compare
Yes, looks good. There's a few details to follow up on, but it's the right approach. |
f3c040d
to
d61af16
Compare
d30687c
to
5ce3baa
Compare
Rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I think we just need to formalise the interface we're implementing a bit here.
CHANGELOG.md
Outdated
@@ -4,6 +4,8 @@ | |||
|
|||
- Add support for unindexed (and uncompressed) VCFs (#337) | |||
|
|||
- Remove explicit sample, contig and filter lists from the schema (#343) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking schema format change, so will require existing ICFs to be recreated. I listed these as "Breaking changes" below
bio2zarr/vcz.py
Outdated
self.encode_samples(root) | ||
self.encode_filter_id(root) | ||
self.encode_contig_id(root) | ||
if hasattr(self.source, "samples"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Control flow by hasattr
is pretty :vomit: for me - so easy for mistakes to get hidden as code evolves over time.
Every implementation has to have samples
anyway, right? And, I would imagine likewise for contigs, so they should both be unconditional.
For filters, I think we should probably define a superclass which defines the interface we require here, and have filters return None
by default. That way we can detect if filters (and other optional stuff) makes sense or not.
de7b6ce
to
5f1f224
Compare
I've added a base class for the sources and removed the mapping base class from the icf source. I've kept contigs optional as plink doesn't have them in this PR. |
5f1f224
to
aedf90c
Compare
Stacked on #339 - clean diff at 9f727a1