Closed derrik-gratz closed 1 year ago
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
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
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()
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!
I'm using
AzimuthReference
to generate a custom reference. Using debug, I can see that the lineCreates a slot called
Azimuth::AzimuthReference
. But this is not recognized as valid when executingValidateAzimuthReference
at the end of AzimuthReference, as it is looking forAzimuthReference
. If I execute the same check with the full namespace, e.g.:The return is now true and the validation can proceed.
https://github.com/satijalab/azimuth/blob/fa45d4c153d2623b89792f8b57aab333e889cdab/R/azimuth.R#L800