-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Update h5ad datatype #17574
base: dev
Are you sure you want to change the base?
Update h5ad datatype #17574
Conversation
Can you show me where this is used in the linked PR. Could not find it...
Metadata is just used in very few tools. |
Some tests from the preprocessing tool (planemo/galaxy) are failing currently to set the metadata. If the same Python code is run outside Galaxy, they are working fine. For a quick test, try to upload this h5ad file to a Galaxy server. The upload will fail, despite the fact that it is a valid file h5ad file. Reading the same file using |
Maybe my previous comment was not clear. I edited it. |
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.
How about adding a unit test over here: https://github.com/galaxyproject/galaxy/tree/dev/test/unit/data/datatypes? Seems that you already have a test case (or is it a large file)?
Should not be to complicated with inspiration from other data types, e.g. here.
@@ -1565,7 +1565,7 @@ def _layercountsize(tmp, lennames=0): | |||
# Shape we determine here due to the non-standard representation of 'X' dimensions | |||
shape = anndata_file["X"].attrs.get("shape") | |||
if shape is not None: | |||
dataset.metadata.shape = tuple(shape) | |||
dataset.metadata.shape = (int(shape[0]), int(shape[1])) | |||
elif hasattr(anndata_file["X"], "shape"): | |||
dataset.metadata.shape = tuple(anndata_file["X"].shape) |
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.
Guess an analogous change should be applied here, or?
Bumped to 24.2 for now. We can merge it into 24.1 though since this is a bug and/or a datatype fix. |
@pavanvidem do you still want to get this in ? Can you address the comments ? |
I will try to write tests in coming days. If it cannot wait, it is fine to remove from the next release. |
A small fix to the h5ad shape metadata. Recently, found an issue setting the metadata of an anndata object as part of this PR tests: galaxyproject/tools-iuc#5740
Surprisingly, in all these years, we did not encounter a dataset with this particular case of setting metadata.
How to test the changes?
(Select all options that apply)
License