-
Notifications
You must be signed in to change notification settings - Fork 8
Common dimensions in schema #361
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
base: main
Are you sure you want to change the base?
Conversation
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.
There is a slight ick factor to modifying the schema like this, but I think this is a good step in the right direction. We do want a Dimension class though
bio2zarr/vcz.py
Outdated
|
||
if dimensions is None: | ||
self.dimensions = { | ||
"variants": {"size": 0, "chunk_size": 1000}, |
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.
Let's define a simple dataclass for Dimension rather than programming with nested dicts
ff81b5c
to
b4514d6
Compare
Should be ready for review now. |
b4514d6
to
8915f73
Compare
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.
Overall looks good, but I think we need to fix the default chunk size distribution problem somehow
self.samples_chunk_size = samples_chunk_size | ||
if dimensions is None: | ||
dimensions = { | ||
"variants": VcfZarrDimension(size=0, chunk_size=1000), |
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.
We're distributing this default to three different locations around the code, I think we need to consolidate this somehow
Part of #351
Thought I would get a quick review here before I fix up the tests. I've had to add side effects to
convert_local_allele_field_types
so that it adds the dimensions it is using to the schema, feels a bit messy.