-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Zarr support #190
base: main
Are you sure you want to change the base?
Zarr support #190
Conversation
…dataR into keller-mark/zarr
…milar to HDF5AnnData
Simplify how obs and var names handled in ZarrAnnData
More zarr-related changes
Update comments
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.
Fantastic work @keller-mark and @Artur-man !
I went through the PR for a first time and left some minor comments. I will review the code by running it a couple of times next :)
R/read_zarr_helpers.R
Outdated
attrs <- g$get_attrs()$to_list() | ||
|
||
if (!all(c("encoding-type", "encoding-version") %in% names(attrs))) { | ||
path <- name |
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.
where are a lot of linting issues in this file -- could you run lintr::lint_package()
and fix any issues that pop up?
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.
done ... did a full lint_package
check and corrected some R check issues too!
inst/extdata/example2.zarr/.zgroup
Outdated
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.
This file should probably be removed
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.
done
@rcannood @keller-mark should we add
|
…ome documentation
Good point, at minimum we should add a note to the Github README here https://github.com/scverse/anndataR/tree/main?tab=readme-ov-file#installation |
Ah, this is already added here, nevermind then only but will add this to README as well!! |
Not a proper review of the code but I wanted to raise that we plan to submit {anndataR} to Bioconductor (or maybe CRAN) at some point (hopefully soonish). This means we won't be able to depend on GitHub only packages. Do you have plans to submit {pizzarr} somewhere or could you rewrite this to use one of the public Zarr packages? |
@lazappi thanks for the notification, |
Fixes #91
These changes are from both me and @Artur-man
The main public-facing changes here are:
ZarrAnnData
classread_zarr
andwrite_zarr
top-level functionsfrom_Seurat(output_class="ZarrAnnData")
from_SingleCellExperiment(output_class="ZarrAnnData")
Internally:
read_zarr_helpers.R
is the zarr analog ofread_h5ad_helpers.R
write_zarr_helpers.R
is the zarr analog ofwrite_h5ad_helpers.R
inst/extdata/example.zarr
(this makes the diff noisy, apologies)test-Zarr-read.R
(35 new tests)test-Zarr-write.R
(70)test-ZarrAnnData.R
(26)test-h5ad-zarr.R
(17)A number of these functions generate warnings in the R console that are intended to be followed up on to improve the code (and should probably be resolved as end users may not appreciate them), but the tests still pass despite these warnings.
Known things that are not implemented here:
recarrays
mode = c("r", "r+", "a", "w", "w-", "x")
parameter value