Skip to content
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

Pass Through chunks arg in write_zarr to layers #523

Open
ilan-gold opened this issue Mar 22, 2021 · 3 comments
Open

Pass Through chunks arg in write_zarr to layers #523

ilan-gold opened this issue Mar 22, 2021 · 3 comments

Comments

@ilan-gold
Copy link
Contributor

Would it be possible to replicate this functionality:

https://github.com/theislab/anndata/blob/2723c9c9e8bc0fe50a9513f292916616a603923b/anndata/_io/zarr.py#L48-L51

in the layers as well?

https://github.com/theislab/anndata/blob/2723c9c9e8bc0fe50a9513f292916616a603923b/anndata/_io/zarr.py#L58

Maybe there is a reason not to do this though

@ilan-gold ilan-gold changed the title Pass Through chunks Keyword in write_zarr to layers Pass Through chunks arg in write_zarr to layers Mar 22, 2021
@ivirshup
Copy link
Member

ivirshup commented Apr 6, 2021

So, I'm a little bit hesitant to define much about the behavior of chunks at the moment. This is because we'd like to integrate dask with anndata, where chunks need to be aligned between arrays that are used together. In this instance, it may make more sense if sparse arrays aren't chunked along the indices or data but the sparse arrays themselves would be chunked by their cartesian indices (e.g. you'd get chunks of sparse arrays instead of chunks of dense arrays).

I don't see any harm in adding the behavior you suggest right now, but it could change soon. I think there would be value in being able to specify these things separately.

@ilan-gold
Copy link
Contributor Author

@ivirshup I agree that they should be specified separately, especially since they layers and X might be different types. Perhaps in order to wrap up #524 as well, we could just add a sparse_chunks argument to write_zarr? Then these could both be passed on to the layers?

@flying-sheep
Copy link
Member

@ilan-gold is this issue still relevant?

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

No branches or pull requests

3 participants