Repository navigation
Update example dataset - #74
Conversation
|
Possibly we also want a similar R example (maybe using the in-memory interface)? I wasn't sure how best to do that but if we come up with something it could go here or in a separate PR. |
rcannood
left a comment
There was a problem hiding this comment.
Makes sense to remove the krumsiek dataset.
However, the resulting example.h5ad is too big for my liking. Can you create something that's a little smaller, e.g. <100KB?
|
Maybe??? It's only 100 cells x 200 genes so I'm not sure that can be reduced much. Some of the things might be redundant (in that they are the same types) but I'm not sure exactly which parts are taking up space. Any idea if there is an easy way to tell that from a HDF5 file? I guess the other option would be to put it on Figshare and use {BiocCache} to get it as needed but it would be simpler to have something in the package. |
|
Ok, I got it down to ~400kb. Small enough? |
rcannood
left a comment
There was a problem hiding this comment.
400KB is already a lot better :)
* origin/main: (74 commits) make sure path is printed ignore complexity fix typo in docs update roxygen implement get_generator class improve test redesign HDF5AnnData constructor based on #51 rename write h5ad encoding function move validation functions move check fix tests improve roundtrip test wip fix write functions fix read functions check data frame first fix write_encoding_attribute function refactor tests using helper functions fix abstract method error fix issues add reticulate-based tests for the hdf5 backend (#69) ...
|
FYI I want to add some things to this so please don't merge yet |
All arrays were being coerced to vectors
Replace with a single check in HDF5AnnData$new()
Also reduce the size of adata.uns["String2D"]
…xample-dataset * 'example-dataset' of github.com:scverse/scverseio:
| #' | ||
| #' @return A named list with names type and version | ||
| read_h5ad_encoding <- function(file, name) { | ||
| requireNamespace("rhdf5") |
There was a problem hiding this comment.
Isn't it better to keep requireNamespace("rhdf5") in here, if these functions are meant to be transferred to a separate package?
This applies to all of the other read_h5ad_* and write_h5ad_* functions as well.
There was a problem hiding this comment.
I'm not quite sure what you mean? These functions aren't exported so I was imagining anyone depending on this would use HDF5AnnData which now contains a dependency check when the object is created. Maybe I'm missing something though.
There was a problem hiding this comment.
Weren't you planning on moving all of the read_h5ad_* and so on functions into a separate package which could then be used by anndataR, mudata and spatialdataR?
There was a problem hiding this comment.
Ah, possibly... I had forgotten about that. Even if that does happen I think this would need to be revisited anyway. That package might just import {rhdf5} so this wouldn't be necessary there either.
Co-authored-by: Robrecht Cannoodt <[email protected]>
The example Krumsiek H5AD files from {zellkonverter} we were using for testing were missing some things we want to check. This dataset should be more complete and easier to add things to as needed.