-
-
Notifications
You must be signed in to change notification settings - Fork 16
Zarr support #190
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
base: devel
Are you sure you want to change the base?
Zarr support #190
Changes from 78 commits
19698c3
5100a40
4c9d01f
eb8b69c
58f5ce4
a15513a
1ef1be6
77a7ee2
27ce6c1
8790715
bb0c6c7
0456ecd
acac772
30316ed
c6b4d89
9cadc26
a40a618
1afd6eb
7f53049
3800f38
4a7d4c2
c881bb9
4a1bbde
15dfbde
438809a
2215402
087ffb7
37d1ae5
357a8d7
d192e68
1e0e868
fe07028
7ef94f8
bf8e797
5abcc75
c5ec1c0
84ad61f
c3cb8aa
63f102c
a31ff9b
e98f877
b0bfad4
7ebe151
96c5824
c41a042
370ac17
ddb5271
755904d
4290aed
e43c819
a98b58f
2d551d8
42fcbb1
205dee4
f7638eb
acede3c
07c92f7
2b672ab
555a634
dcaf157
b10faa5
e3d08f8
1e2addc
570325b
0fac149
79023b4
bece447
a46c9e1
f90d70a
73934a7
f42a6df
a373973
2f73501
540852d
a22d007
1cc5ff6
2499d5c
bd6238a
aaf9801
43d4f1f
73ee0e3
d70a011
ccb0cdf
fe8f196
e6efbf2
8b0d1b0
bafae8e
eead040
64e4289
23f8ac5
0852908
8677fad
efa2ca0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,4 +60,4 @@ rsconnect/ | |
| vignettes/data/*.h5ad | ||
| /doc/ | ||
| /Meta/ | ||
| /data/ | ||
| /data/ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,6 +49,7 @@ Suggests: | |
| knitr, | ||
| processx, | ||
| rhdf5 (>= 2.52.1), | ||
| Rarr, | ||
| rmarkdown, | ||
| S4Vectors, | ||
| Seurat, | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -287,6 +287,28 @@ AbstractAnnData <- R6::R6Class( | |||||
| ) | ||||||
| }, | ||||||
| #' @description | ||||||
| #' Convert to an [`ZarrAnnData`] | ||||||
| #' | ||||||
| #' See [as_ZarrAnnData()] for more details on the conversion | ||||||
| #' | ||||||
| #' @param file See [as_ZarrAnnData()] | ||||||
| #' @param compression See [as_ZarrAnnData()] | ||||||
| #' @param mode See [as_ZarrAnnData()] | ||||||
| #' | ||||||
| #' @return An [`ZarrAnnData`] object | ||||||
|
||||||
| #' @return An [`ZarrAnnData`] object | |
| #' @return A [`ZarrAnnData`] object |
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.
fixed
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.
| #' Write the `AnnData` object to an H5AD file | |
| #' Write the `AnnData` object to a Zarr file |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,75 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #' create_zarr_group | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #' create zarr groups | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #' @param store the location of (zarr) store | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #' @param name name of the group | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #' @param version zarr version | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #' @importFrom utils tail | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #' @examples | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #' store <- tempfile(fileext = ".zarr") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #' create_zarr(store) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #' create_zarr_group(store, "gp") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #' @export | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #' create_zarr_group | |
| #' | |
| #' create zarr groups | |
| #' | |
| #' @param store the location of (zarr) store | |
| #' @param name name of the group | |
| #' @param version zarr version | |
| #' @importFrom utils tail | |
| #' @examples | |
| #' store <- tempfile(fileext = ".zarr") | |
| #' create_zarr(store) | |
| #' create_zarr_group(store, "gp") | |
| #' @export | |
| #' Create Zarr group | |
| #' | |
| #' Create a new group in a Zarr store | |
| #' | |
| #' @param store the location of the Zarr store | |
| #' @param name name of the group to create | |
| #' @param version Zarr version | |
| #' | |
| #' @noRd | |
| #' | |
| #' @examples | |
| #' store <- tempfile(fileext = ".zarr") | |
| #' create_zarr(store) | |
| #' create_zarr_group(store, "gp") |
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.
Use snake_case for variable names
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.
ok, I think it is fixed.
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.
Should this check be in create_zarr() (or wherever it will be first triggered)?
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.
Hmm, good idea but I think it doesn't matter where it is put. Either in create_zarr or create_zarr_group this check should be performed. Since root zarr is a zarr group too, we call create_zarr_group with create_zarr.
However, I like how you think. This functions are auxiliary and will be deprecated once @Bisaloo implements it in Rarr.
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.
What are your thoughts on being able to support v3?
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.
@Bisaloo is working on it, i think he wants to do this until march-april
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.
Use cli_abort() for errors
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.
fixed
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.
If the function is named is_zarr_empty() it should return TRUE when the store is empty. I'm not sure if it's the name or the documentation that is wrong but they don't match.
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.
fixed
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.
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.
fixed