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

as.anndata issue #162

Closed
williamsdrake opened this issue Feb 26, 2024 · 2 comments
Closed

as.anndata issue #162

williamsdrake opened this issue Feb 26, 2024 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement Enhance existing function/feature

Comments

@williamsdrake
Copy link

Hi,

Great package - use it all the time. I saw you recently added as.anndata as a function. It works great - however I initially had an issue. Here is the code/error:

> as.anndata(x = combined_s, file_path = "/data/Anndata/", file_name = "combined.h5ad")
• Checking Seurat object validity & Extracting Data
• Creating anndata object.
Error in py_module_import(module, convert = convert) : 
  ModuleNotFoundError: No module named 'anndata'
Run `reticulate::py_last_error()` for details.
In addition: Warning messages:
1: Adding a command log without an assay associated with it 
2: Adding a command log without an assay associated with it 
3: Adding a command log without an assay associated with it 

I previously had a python environment which did not require anndata. It was easy enough to install it using

> library(reticulate)
> py_install("anndata")

which fixed the issue. It would be nice if there was a check to see if the python environment contains anndata already and if not either install it or return a message asking the user to install it.

@samuel-marsh
Copy link
Owner

Hi @williamsdrake,

Thanks for kind words and feedback! I agree it is probably better to have a more informative error message after a check for anndata. I will add that to my list for next version update.

I hesitate to add direct installation because I don’t want to directly modulate users python and reticulate environments as cross talk can be tricky for some.

Thanks!
Sam

@samuel-marsh samuel-marsh self-assigned this Feb 28, 2024
@samuel-marsh samuel-marsh added documentation Improvements or additions to documentation enhancement Enhance existing function/feature labels Feb 28, 2024
@samuel-marsh samuel-marsh mentioned this issue Mar 12, 2024
9 tasks
@samuel-marsh
Copy link
Owner

Hi @williamsdrake,

This is now updated and present in develop branch (v2.1.2.9018 or greater). Thanks again for reporting issue!

Best,
Sam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement Enhance existing function/feature
Projects
None yet
Development

No branches or pull requests

2 participants