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.
Reprex:
If we check the
obj
structure, we will see that theIntegrateLayers
function didn't add the 'integrated' assay toobj
, which is already alarming:Instead, the SCT slot contains two SCTmodel(s), and I don't know how to join them, to be honest.
The problem arises when we want to generate Azimuth reference from this integrated object: