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
I am attempting to map a query scRNA-seq dataset (GSE12) with 12 donors onto an existing UMAP generated from a reference dataset (seurat) that has already been integrated using SCVI. However, I encounter the following error when running FindTransferAnchors:
Projecting cell embeddings
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 't': Argument 'dim.' must be an integer vector of length two.
Both datasets have been processed to include only the common genes between them. Below is the code I used:
# Set default assay and ensure alignment of genes
DefaultAssay(seurat) <- "RNA"
common_genes <- intersect(rownames(seurat), rownames(GSE12))
length(common_genes) # 18831
# Subset reference and query datasets to include only common genes
seurat.ss <- subset(seurat, features = common_genes)
GSE12.ss <- subset(GSE12, features = common_genes)
# Ensure both reference and query have the same gene order
seurat.ss <- seurat.ss[common_genes, ]
GSE12.ss <- GSE12.ss[common_genes, ]
# Modify reference to v5 assay for compatibility
seurat.ss[['RNA']] <- as(object = seurat.ss[["RNA"]], Class = "Assay5")
# Find transfer anchors
anchors <- FindTransferAnchors(
reference = seurat.ref,
query = GSE12.ss,
dims = 1:10,
reference.reduction = "scvi"
)
Could you please help me identify the root cause of this issue and approaches to solving this? Specifically:
1. Is there an issue with how I am setting up the FindTransferAnchors function, particularly the reference.reduction?
2. Are there additional preprocessing steps required to ensure compatibility between the SCVI-integrated reference and the query dataset?
3. Is it required to convert the reference reduction of SCVI to Assay5 to match the query dataset's data structure? If so, how is this done? 'seurat.ss[['scvi']] <- as(object = seurat.ss[["scvi"]], Class = "Assay5")' results in error: Error in as(object = seurat.ref[["scvi"]], Class = "Assay5") :
no method or default for coercing “DimReduc” to “Assay5”
Any guidance or suggestions would be greatly appreciated! Thank you in advance for your time and help.
The text was updated successfully, but these errors were encountered:
Hi Seurat team,
I am attempting to map a query scRNA-seq dataset (GSE12) with 12 donors onto an existing UMAP generated from a reference dataset (seurat) that has already been integrated using SCVI. However, I encounter the following error when running FindTransferAnchors:
Both datasets have been processed to include only the common genes between them. Below is the code I used:
Could you please help me identify the root cause of this issue and approaches to solving this? Specifically:
1. Is there an issue with how I am setting up the FindTransferAnchors function, particularly the reference.reduction?
2. Are there additional preprocessing steps required to ensure compatibility between the SCVI-integrated reference and the query dataset?
3. Is it required to convert the reference reduction of SCVI to Assay5 to match the query dataset's data structure? If so, how is this done? 'seurat.ss[['scvi']] <- as(object = seurat.ss[["scvi"]], Class = "Assay5")' results in error: Error in as(object = seurat.ref[["scvi"]], Class = "Assay5") :
no method or default for coercing “DimReduc” to “Assay5”
Any guidance or suggestions would be greatly appreciated! Thank you in advance for your time and help.
The text was updated successfully, but these errors were encountered: