Skip to content

Conversation

@percyfal
Copy link

@percyfal percyfal commented Dec 1, 2025

  • Add minimal ZarrVariant class mimicking VCF.Variant
  • Add ZarrStore class that returns a ZarrVariant iterator
  • Add basic test

- Add minimal ZarrVariant class mimicking VCF.Variant
- Add ZarrStore class that returns a ZarrVariant iterator
- Add basic test
@percyfal
Copy link
Author

percyfal commented Dec 1, 2025

Hi @Sendrowski, I have drafted some basic Zarr parsing support. Sorry if you already have gotten started; if not, hopefully we can build on this first draft. I updated the VCFHandler to also deal with Zarr input, keeping the current naming of parameters even though it is inconsistent. Also, I have not added code to actually do any writing but that is easy to fix.

Moving forward, I guess you would want to make Zarr support available for all functions, such as DFE estimation and more. I have not looked into that part of the code base, but once a handler is in place this should be pretty straightforward?

Best,

Per

@percyfal
Copy link
Author

percyfal commented Dec 1, 2025

Oh, I should add that you should probably create a new branch for this feature as I created the new branch from master. Also, you may have to add the latest source version of vcztools; I refrained from adding package versions to pyproject for now.

@Sendrowski
Copy link
Owner

Hi Per,

Many thanks for the first draft to support Zarr. I created a new branch zarr_support, where I created an abstraction layer for variant file handling. All that remains to be implemented now are ZarrHandler, ZarrWriter, and ZarrReader. I'm not so familiar with Zarr so perhaps you could help with that? I'm also not sure how lightweight zarr, and vzftools are, so I might want to keep them as optional dependencies similar to cyvcf2.

Best,
Janek

@percyfal
Copy link
Author

percyfal commented Dec 2, 2025

Hi,

thanks for the quick turnaround! I can certainly help out with Zarr support. With the current abstraction layers I should only have to modify the Zarr classes, right? I think it makes sense as you say to let vcztools / zarr be optional dependencies.

Best,

Per

@Sendrowski
Copy link
Owner

Hi,

Sounds good! Yes, only the Zarr classes should need changes unless I overlooked something. You might also want to create a ZarrVariant class by subclassing Variant.

Best,
Janek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants