Skip to content

Clean file when writing H5AD #156

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

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Clean file when writing H5AD #156

wants to merge 6 commits into from

Conversation

lazappi
Copy link
Collaborator

@lazappi lazappi commented Dec 5, 2023

Address #121 where old fields are not removed from files when writing to an existing H5AD file. This PR currently solves this by adding an overwrite argument to write_h5ad(). Possibly needs more work depending on what interfaces we want exposed to the user.

lazappi and others added 6 commits December 5, 2023 14:31
Error if file exists and overwrite = FALSE

Fixes #121
* origin/main: (52 commits)
  Use  {cli} for alerts (#231)
  Seurat metadata granularity (#224)
  Tidy DESCRIPTION (#234)
  Add more comprehensive to_Seurat tests (#225)
  Add logo (#226)
  Update README.md with trademark (#233)
  Standardise styling (#230)
  Make HDF5AnnData$finalize() private (#228)
  Fix linting issues after breaking changes in lintr (#229)
  Update URL in DESCRIPTION (#227)
  Conversion from & to SingleCellExperiment (#212)
  fix recursive default (#222)
  dimension issue has been fixed (#221)
  Support writing dgeMatrix (#219)
  Support arrays with >2 dimensions (#218)
  fix issue by explicitly adding dimensions to arrays and vectors (#216)
  update list of vignettes in readme (#217)
  remove known issue (#215)
  Compare writing h5ad in Python & in R with h5diff (#207)
  Rework documentation (#213)
  ...
Copy link
Collaborator

@rcannood rcannood left a comment

Choose a reason for hiding this comment

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

I'm not sure whether it's currently possible to trigger this condition:

if (is.character(file) && !file.exists(file)) {

Either the file doesn't exist yet, or the constructor will fail if you try to open an H5AD file and change stuff at the same time.

Could you take a look? 🙇

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.

2 participants