Zarr (AnnData) sparse matrices#6
Open
Artur-man wants to merge 10 commits intoBioconductor:develfrom
Open
Conversation
Both `ImageArray` and `SpatialData` now depends on BioC/ZarrArray.
Contributor
Author
|
I am also adding now a higher level class for AnnData-zarr associated with feature observation matrices, similar to H5ADMatrix. How about if I call it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi @hpages,
I gave this a try again and after some experiments with
read_zarr_arrayandh5mreadI was able to mimicH5SparseMatrix. Please ignore if you were already working on this.The codebase of
ZarrSparseMatrixandZarrADMatrixis almost identical to H5s. The PR tests the CSC matrices of both zarr v2 and v3 datasets (anndata).There are lots of utilities that do not exist in
Rarris introduced here to, e.g. detect groups, arrays etc., since it is needed to validate the existence of arrays that make up CSR and CSC matrices.zarr_mreadis an auxiliary function that mimicsh5mreadpackage (I am guessing there is no need for such a separate package for zarr).Please also check this PR in
anndataRthat introduces delayed supportAdd support for
DelayedArrayreading scverse/anndataR#387Going back to the possibility of having native sparse matrix support in Zarr, I was not able to find any such utility (@Bisaloo?). Apart from anndata,
backedarrayhas zarr support too but the sparse encoding looks identical: https://pypi.org/project/backedarray/ZarrArray/TODO
Lines 12 to 17 in 498be8c
CC @HelenaLC @Bisaloo, so we can discuss details if needed.