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

ValidateAzimuthReference does not recognize full namespace #155

Closed
derrik-gratz opened this issue May 17, 2023 · 4 comments
Closed

ValidateAzimuthReference does not recognize full namespace #155

derrik-gratz opened this issue May 17, 2023 · 4 comments

Comments

@derrik-gratz
Copy link

I'm using AzimuthReference to generate a custom reference. Using debug, I can see that the line

Tool(object = object) <- ad

Creates a slot called Azimuth::AzimuthReference. But this is not recognized as valid when executing ValidateAzimuthReference at the end of AzimuthReference, as it is looking for AzimuthReference. If I execute the same check with the full namespace, e.g.:

inherits(Tool(object, slot = 'Azimuth::AzimuthReference'), what = 'AzimuthData')

The return is now true and the validation can proceed.

ValidateAzimuthReference <- function(object, ad.name = "AzimuthReference") {

@derrik-gratz
Copy link
Author

This only seems to arise if you specify Azimuth::AzimuthReference() Which I did to have explicit calls in a wrapper function as part of a package

@Gesmira
Copy link
Collaborator

Gesmira commented May 24, 2023

Hi, thanks for reporting this. I've included a fix on the development branch for the new version of Azimuth that is compatible with Seurat v5. To use this, you will have to install Seurat v5 and its dependencies which is described here: https://satijalab.org/seurat/articles/install.html

@z5ouyang
Copy link

Hi @Gesmira and @derrik-gratz,
This seems happens again? I can successfully call "AzimuthReference" in the main script, but not in the function.
success:

D1 <- readRDS("CCA.rds")
D_ref <- AzimuthReference(D1,refAssay=DefaultAssay(D1),
                            metadata=c("Celltype"))

Fail:

test <- function(){
  D1 <- readRDS("CCA.rds")
  D_ref <- AzimuthReference(D1,refAssay=DefaultAssay(D1),
                            metadata=c("Celltype"))
}
test()

@maud-p
Copy link

maud-p commented Aug 27, 2024

Hi @z5ouyang, @Gesmira ,
I am facing the same issue, I cannot source() a script that call AzimuthReference while I am able to run it in the main function.
Do you have an idea how to solve it? would be a great help if AzimuthReference can be called inside a function!
Thanks!

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

No branches or pull requests

4 participants