-
-
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
Add H5AD read/write helpers #88
Conversation
Makes it possible to use for examples. Also add SingleCellExperiment and Seurat dummy functions.
Needs to be exported for examples
@rcannood The CI here (and on other PRs) is failing on all platforms with an error that I think is coming from your {anndata} package (in the round-trip tests). I can't replicate it locally, though to work out what is going on. Any thoughts on how you want to handle this? |
Sigh! That issue has been popping up everywhere. It's because scipy 1.11 introduced some breaking changes. The development version of reticulate (at rstudio/reticulate) has resolved the issue, but the changes still need to be released on CRAN. I'll add a workaround to the repo for now. |
@lazappi The main branch contains a workaround by switching to the development version of reticulate for now. Can you merge the main branch into this branch? |
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.
These changes make sense to me, though I'd like to allow users to also return hdf5anndata objects instead of only Seurat or SCE. Is this ok with you?
I would prefer not to do this. Part of the reason for having these wrapper functions is to hide the |
Personally, I see no downsides to enabling this functionality, and again it's something that I actually need in order to use the package myself. Sure, I could do it the roundabout way without using However, I can agree to not making the default. Would this be okay with you? |
I guess I can be convinced but I would maybe want to see what other people think. I think we just have a different philosophy/use case in mind. I know you have a use for it and could use it safely but you aren't a normal user and I worry about the average person misusing the interface objects if it's too easy to create them. Maybe I'm just paranoid though. |
* Remove temporary workaround * use `inherits()` instead of `is()` * Add HDF5AnnData and InMemoryAnnData to `read_h5ad()` * fix incorrect merge * try to fix error in R devel * fix docs * add terminal newline * remove conditions * undo previous commit
I merged some changes into this PR. @lazappi Do you have an idea why the devel branch fails when reading the obs in certain unit tests? |
Namely:
|
I think this might have to do with the changes to {rhdf5}. The nullable arrays are now read natively and you don't have to mess around with the masks yourself. I've fixed this in {zellkonverter} already so I can port that other here if you like. |
I see! Is this related to #83 ? |
Yes. Although I'm not sure if we are testing against the release or devel versions of Bioconductor packages (this change is only in devel). |
I made one minor comment but otherwise yes. |
* support rhdf5 nullable vector and boolean enum implementation - use `as.vector()` to reduce code duplication when reading nullable vectors - closes #82 * implement and use read_h5ad_attributes - 'quietly' to suppress warnings; set to TRUE when relevant warnings are handled by calling code * use 'anndataR-category-unknown' as a class of warning - versions of rhdf5 that don't support ENUM; more user-friendly message - use to suppress irrelevant warnings in unit tests * Tidy after merge and style * More tidying... * Roxygenise * Fix namespace --------- Co-authored-by: Martin Morgan <[email protected]> Co-authored-by: Luke Zappia <[email protected]>
Thanks! #90 was merged. Can this PR also be merged? |
Yeah, I think so |
Add user functions for reading/writing H5AD files to/from
SingleCellExperiment
/Seurat
objects. This will likely be the main interface for most normal users.Also adds functions for creating dummy data objects (based on the
dummy_data()
test helper).