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
First of all, thank you very much for this package. It helps me a lot in my work.
I had a problem recently with RunAzimuth() when I used a reference of my own.
My ref data has 30 PCs. I used the first 13 PCs to run FindNeighbors() and RunUmap()
Then I made a reference with still the first 13 PCs to get the same neighbors :
Error in index$getNNsbyVectorList(query[x,], k, search.k, include.distance) : fv.size() != vector_size
So I checked thourougly the code for RunAzimuth and I found out that the problem was with dims = 13 when I made the reference.
The neighbors were calculated with the first 13 PCs.
But in RunAzimuth code the dims variable takes as a value the length of the refDR which is 30 here :
Because of that, there are errors in FindTransferAnchors and FindNeighbors where dims is set to 30 and not 13 the number of PCs used in the reference for FindNeighbors.
I runned RunAzmituh myself step by step by changing dims variable to 13 instead of 30 and it worked without errors.
I am not sure if it's better to set dims as follow : dims <- as.double(slot(reference, "neighbors")$refdr.annoy.neighbors@alg.info$ndim)
And change the following part :
query[["query_ref.nn"]] <- FindNeighbors(object = Embeddings(reference[["refDR"]][,1:dims],
query = Embeddings(reference[["refDR"]],
return.nghbor = TRUE,
l2.norm = TRUE,
verbose = F )
Best regards,
Deniz Fettahoglu
The text was updated successfully, but these errors were encountered:
Hi, thanks for bringing this up and providing a fix! This is now changed in the seurat5 branch of Azimuth and will be merged into the master branch soon. For details in installing seurat5 packages, see here: https://satijalab.org/seurat/articles/install.html
Hi,
First of all, thank you very much for this package. It helps me a lot in my work.
I had a problem recently with RunAzimuth() when I used a reference of my own.
My ref data has 30 PCs. I used the first 13 PCs to run FindNeighbors() and RunUmap()
Then I made a reference with still the first 13 PCs to get the same neighbors :
ref <- AzimuthReference(object = data,
refDR = "pca",
refAssay = "integrated",
refUMAP = "umap",
metadata = "clusters",
dims= 1:13)
After that, I used it with RunAzimuth :
options(Azimuth.map.ndims = 13)
query_projected <- RunAzimuth(query, "path_to_ref", do.adt = FALSE)
and I had the following error :
Error in index$getNNsbyVectorList(query[x,], k, search.k, include.distance) : fv.size() != vector_size
So I checked thourougly the code for RunAzimuth and I found out that the problem was with dims = 13 when I made the reference.
The neighbors were calculated with the first 13 PCs.
But in RunAzimuth code the dims variable takes as a value the length of the refDR which is 30 here :
dims <- as.double(length(slot(reference, "reductions")$refDR))
Because of that, there are errors in FindTransferAnchors and FindNeighbors where dims is set to 30 and not 13 the number of PCs used in the reference for FindNeighbors.
I runned RunAzmituh myself step by step by changing dims variable to 13 instead of 30 and it worked without errors.
I am not sure if it's better to set dims as follow : dims <- as.double(slot(reference, "neighbors")$refdr.annoy.neighbors@alg.info$ndim)
And change the following part :
query[["query_ref.nn"]] <- FindNeighbors(object = Embeddings(reference[["refDR"]][,1:dims],
query = Embeddings(reference[["refDR"]],
return.nghbor = TRUE,
l2.norm = TRUE,
verbose = F )
Best regards,
Deniz Fettahoglu
The text was updated successfully, but these errors were encountered: