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

AzimuthReference error: refAssay (SCT) should contain a single SCT model #207

Open
erzakiev opened this issue Feb 5, 2024 · 0 comments
Open

Comments

@erzakiev
Copy link

erzakiev commented Feb 5, 2024

Reprex:

obj <- LoadData("pbmcsca")
obj[["RNA"]] <- split(obj[["RNA"]], f = obj$orig.ident)
options(future.globals.maxSize = 3e+09)
obj <- SCTransform(obj)
obj <- RunPCA(obj, npcs = 30, verbose = F)
obj <- IntegrateLayers(
  object = obj,
  method = RPCAIntegration,
  normalization.method = "SCT",
  verbose = F
)
obj <- FindNeighbors(obj, dims = 1:30, reduction = "integrated.dr")
obj <- RunUMAP(obj, dims = 1:30, return.model = T)

If we check the obj structure, we will see that the IntegrateLayers function didn't add the 'integrated' assay to obj, which is already alarming:

> obj
An object of class Seurat 
56793 features across 31021 samples within 2 assays 
Active assay: SCT (23099 features, 3000 variable features)
 3 layers present: counts, data, scale.data
 1 other assay present: RNA
 3 dimensional reductions calculated: pca, integrated.dr, umap

Instead, the SCT slot contains two SCTmodel(s), and I don't know how to join them, to be honest.

> obj@assays$SCT
SCTAssay data with 23099 features for 31021 cells, and 2 SCTModel(s) 
Top 10 variable features:
 LYZ, S100A8, S100A9, IGKC, RP11-1143G9.4, CH507-513H4.3, IGLC2, PPBP, GNLY, IGLC3 

The problem arises when we want to generate Azimuth reference from this integrated object:

obj_Azimuth <- AzimuthReference(
+   object = obj,
+   refUMAP = "umap",
+   refDR = "pca",
+   refAssay = "SCT",
+   metadata = 'CellType',
+   dims = 1:50,
+   k.param = 31,
+   reference.version = "1.0.0"
+ )
Error in AzimuthReference(object = obj, refUMAP = "umap", refDR = "pca",  : 
  refAssay (SCT) should contain a single SCT model.
In addition: Warning message:
CellType is not a factor. Converting to factor with alphabetical levels. 
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

1 participant