satijalab / azimuth

A Shiny web app for mapping datasets using Seurat v4
https://satijalab.org/azimuth
GNU General Public License v3.0
108 stars 31 forks source link

Issue while running RunAzimuth function on my own reference created using Azimuthreference #228

Open sadhanagaddam3 opened 3 months ago

sadhanagaddam3 commented 3 months ago

Hi,

I'm trying to runAzimuth using my own scRNA reference and the query/input object is a nanostring cosmx dataset. I was able to generate reference using AzimuthReference() but can't able to runAzimuth() using reference and cosmx data. Below is the steps I'm following and the error I ran into. Could you please help me fix it.

ref <- AzimuthReference( object = scRNA_DH7_obj_subset, refUMAP = "umap", refDR = "pca", refAssay = "SCT", metadata = c("celltype"), dims = 1:30, k.param = 30 ) ref.dir <- "azimuth/DH007_reference/" SaveAnnoyIndex(object = ref[["refdr.annoy.neighbors"]], file = file.path(ref.dir, "idx.annoy")) saveRDS(object = ref, file = file.path(ref.dir, "ref.Rds"))

RunAzimuth( nano_obj_DH07, reference = 'azimuth/DH007_reference/', annotation.levels = NULL, umap.name = "ref.umap", verbose = TRUE )

Warning: Adding a dimensional reduction (refUMAP) without the associated assay being present detected inputs from HUMAN with id type Gene.name reference rownames detected HUMAN with id type Gene.name Normalizing query using reference SCT model Warning: No layers found matching search pattern provided Error: k.score or k.anchor is larger than the number of neighbors contained in reference.nn. Recompute reference.nn using FindNeighbors with k > k.score and k > k.anchor