Skip to content

Implement ZarrADMatrix objects#9

Open
Artur-man wants to merge 11 commits into
Bioconductor:develfrom
Artur-man:anndata_matrix
Open

Implement ZarrADMatrix objects#9
Artur-man wants to merge 11 commits into
Bioconductor:develfrom
Artur-man:anndata_matrix

Conversation

@Artur-man

@Artur-man Artur-man commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Hey @hpages, I am assuming you are ok with the naming of ZarrADMatrix, otherwise checks are passing except for some tests unrelated to this PR, e.g.

── Failure ('test-writeZarrArray.R:177:13'): writeZarrArray() ──────────────────
Expected `extract_array(A, index)` to be identical to `a3[1, 15:11, , drop = FALSE]`.
Differences:
12/15 mismatches (average diff: 12)
[1]   41 -  57 == -16
[2]   45 -  53 ==  -8
[4]   53 -  45 ==   8
[5]   57 -  41 ==  16
[6]  441 - 457 == -16
[7]  445 - 453 ==  -8
[9]  453 - 445 ==   8
[10] 457 - 441 ==  16
[11] 841 - 857 == -16

I have also corrected some surplus comments leftover from HDF5Array.

Should we add a few line of code to vignettes too? I did not add there anything for this PR, since we did not add any in the sparse matrix PR either but let me know.

@Bisaloo Bisaloo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposed the same changes as in #10, does this make sense?

Comment thread R/ZarrADMatrixSeed-class.R Outdated
Comment thread R/ZarrADMatrixSeed-class.R Outdated
Comment thread R/ZarrADMatrixSeed-class.R Outdated
@hpages

hpages commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Thanks @Artur-man. Will check this soon...

Yeah adding a section in the vignette about the new ZarrSparseMatrix/ZarrADMatrix stuff is a good idea but let's do this in a separate PR.

Oh I forgot to mention that I'm using zarr_store for the first argument of ZarrSparseMatrixSeed() and ZarrSparseMatrix() to distinguish it from the first argument of ZarrArraySeed() and ZarrArray() which is zarr_path. Can you use zarr_store for ZarrADMatrixSeed() and ZarrADMatrix() too? Thanks.

BTW I think I will change ZarrArraySeed() and ZarrArray() interface at some point to also use zarr_store / name for consistency with ZarrSparseMatrixSeed() and ZarrSparseMatrix(). This will allow the user to access a dense matrix stored within an AnnData-style Zarr store in a way that is consistent with how they access a sparse matrix.

@Artur-man

Artur-man commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

BTW I think I will change ZarrArraySeed() and ZarrArray() interface at some point to also use zarr_store / name for consistency with ZarrSparseMatrixSeed() and ZarrSparseMatrix()

Ah please ... it is actually really hard to work around this non-group based interface to zarr, we can at least have em in ZarrArray.

Will change to zarr_store now.

@Artur-man

Copy link
Copy Markdown
Contributor Author

Proposed the same changes as in #10, does this make sense?

implementing now ...

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.

3 participants