You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error in Reductions(obj) : could not find function "Reductions" #112
We're calling Vision() from within an R package to load a seurat object. When we call our package's method from R (which in turn calls Vision), the output is this:
Importing counts from obj[["RNA"]]@counts ...
Normalizing to counts per 10,000...
Importing Meta Data from [email protected] ...
Error in Reductions(obj) : could not find function "Reductions"
I believe you should either quality the Seurat methods, or @import Seurat here:
Is that something you'd consider adding? I'm happy to draft a PR. If I manually run "library(Seurat)" to load seurat, this works, but that's a sub-optimal solution.
I believe I've made the simple fix that you requested in this PR: #113 . Would you mind taking a look and making sure this addresses your problem so I can merge it in?
@mattjones315 Thanks for checking. I dont think that's best practice on how to do this. I think you should either:
In DESCRIPTION, you could put Seurat under Depends. I think this loads it. Not sure if you want to do this since not all applications need seurat
Add "Seurat::" to all the Seurat methods in that codepath
I think it's a better idea to add "@import Seurat" to the roxygen doc, and then re-run that to update NAMESPACE, rather than put "library(Seurat)" in your code.
Activity
mattjones315 commentedon Mar 2, 2022
Hey @bbimber ,
Sorry you're running into this problem! I'll be happy to make this change in a PR soon.
Thanks for suggesting this and I'll circle back when it's solved.
Best,
Matt
mattjones315 commentedon Mar 3, 2022
Hi @bbimber ,
I believe I've made the simple fix that you requested in this PR: #113 . Would you mind taking a look and making sure this addresses your problem so I can merge it in?
Thanks!
-Matt
bbimber commentedon Mar 3, 2022
@mattjones315 Thanks for checking. I dont think that's best practice on how to do this. I think you should either:
In DESCRIPTION, you could put Seurat under Depends. I think this loads it. Not sure if you want to do this since not all applications need seurat
Add "Seurat::" to all the Seurat methods in that codepath
I think it's a better idea to add "@import Seurat" to the roxygen doc, and then re-run that to update NAMESPACE, rather than put "library(Seurat)" in your code.
bbimber commentedon Mar 3, 2022
Note: the third point is basically what you're already doing in this file with "@import logging"
mattjones315 commentedon Mar 5, 2022
Hi @bbimber -- I see what you mean, and I see now that this is what we used to handle Seurat 2.X objects.
I've made these changes in the repo, let me know if this works for you.