Skip to content
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 an option to compress HDF5 files #246

Merged
merged 5 commits into from
Dec 14, 2023
Merged

Conversation

allyhawkins
Copy link
Member

Closes #244

This PR adds new options to the sce_to_anndata() function to allow for compression of the exported HDF5 files.

  • I added a compression option and set the default to gzip. I like the idea of having a separate argument rather than just using ..., partially as a reminder. I did not use the same default of none that the zellkonverter::writeH5AD function uses. Instead, I set it to gzip since I think we want to compress by default. I'm on the fence on whether that was a good decision.
  • I added ... as an option to pass any additional arguments to the function.
  • I updated the tests to test that compression fails with an invalid option and a test to make sure using additional arguments works. Let me know if I should create any additional tests.
  • I also allowed for the .h5ad extension.

Copy link
Member

@jashapiro jashapiro left a comment

Choose a reason for hiding this comment

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

Just a couple little comments, including a reminder about match.arg, which is built for situations like this!

R/sce_to_anndata.R Outdated Show resolved Hide resolved
R/sce_to_anndata.R Outdated Show resolved Hide resolved
R/sce_to_anndata.R Outdated Show resolved Hide resolved
@allyhawkins allyhawkins merged commit 79f1b9b into main Dec 14, 2023
2 checks passed
@allyhawkins allyhawkins deleted the allyhawkins/compress-h5 branch December 14, 2023 19:21
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.

Support compression in sce_to_anndata()
2 participants