Skip to content

zellkonverter replaced with anndataR#273

Open
BilalsGituation wants to merge 5 commits intolmweber:sandboxfrom
BilalsGituation:BG_contrib
Open

zellkonverter replaced with anndataR#273
BilalsGituation wants to merge 5 commits intolmweber:sandboxfrom
BilalsGituation:BG_contrib

Conversation

@BilalsGituation
Copy link

@BilalsGituation BilalsGituation commented Feb 4, 2026

First of all, great ebook!

I received a deprecation notice for zellkonverter when trying to run some code from this chapter and wanted to keep the chapter reproducible by "future-proofing" it a little with tools provided in anndataR.

I explained my reasoning for the edit in more detail in Issue#272 available at #272

I was able to test everything here, although my render had trouble reading the .h5ad file in chunk {python spatial-scatter}. I had success reading the file and saw what one would expect in there, using the anndataR package (edit: and anndata via reticulate using an absolute path), so I went ahead and committed without changing your version of the chunk.

There was another an error I had to suppress when running ad3 <- anndata$read_h5ad() in reticulate (chunk named r h5ad2Reticulate in my version), since it was mitigated by successful creation of the ad3 object.

Thank you for reading. Please feel free to comment either here or on Issue#272 if you have questions or feedback.

@HelenaLC
Copy link
Collaborator

Thank you for the suggestion and effort to draft a PR! I agree that replacing zellkonverter with anndataR is preferable, and this has been on our radar now that the package is in Bioc and stable.

We are currently facing issues with the book build related to the Python environment setup. I will look into the proposed PR after this has been resolved, as we currently cannot test the book build and deployment.

@BilalsGituation
Copy link
Author

No problem, good luck finding a solution to the book build issue! I hope that my PR is useful once you can look into it.

@BilalsGituation
Copy link
Author

Discovered and corrected a typo building the file spe.h5ad. I had written obs_mapping rather than obsm_mapping.
Retested file contents produced by chapter render using the following code, with anndata referring to the python module, exactly as called in the pre-PR chapter.

h5ad <- "inst/pages/spe.h5ad"
(adata <- anndata$read_h5ad(h5ad)) # ReticulateAnnData object with expected form + elements
adata$uns # shows image metadata for one sample
adata$obsm # shows spatial x and y coords for each spot
adata$obs # shows spot barcodes and columns "in_tissue array_row array_col sample_id library_id" in df-like format

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