In the line 10 of SPOTlight:::.extract_counts(), you called function
x <- as.matrix(SeuratObject::GetAssayData(x, slot, assay))
However the v5.0.1 version of SeuratObject::GetAssayData() has deprecated the selection of specific slot. Instead, they had the syntax below, layer replaces slot:
## S3 method for class 'Seurat'
GetAssayData(object, assay = NULL, layer = NULL, slot = deprecated(), ...)
This will break the function call of SPOTlight::SPOTlight() with the following error.
Error in SeuratObject::GetAssayData(x, slot, assay) :
`assay` must be one of "RNA" or "SCT", not "scale.data".
In addition, SeuratObject uses LayerData() to supercede GetAssayData(). Thus the best replacement would be:
Check version of SeuratObject.
If >5.0.1, call x <- as.matrix(SeuratObject::LayerData(x, layer = slot, assay = assay)); otherwise, call x <- as.matrix(SeuratObject::GetAssayData(x, slot = slot, assay = assay))
Dear @MarcElosua.
In the line 10 of
SPOTlight:::.extract_counts()
, you called functionHowever the v5.0.1 version of
SeuratObject::GetAssayData()
has deprecated the selection of specific slot. Instead, they had the syntax below,layer
replacesslot
:This will break the function call of
SPOTlight::SPOTlight()
with the following error.In addition, SeuratObject uses
LayerData()
to supercedeGetAssayData()
. Thus the best replacement would be:x <- as.matrix(SeuratObject::LayerData(x, layer = slot, assay = assay))
; otherwise, callx <- as.matrix(SeuratObject::GetAssayData(x, slot = slot, assay = assay))
Can you help me to fix this issue? Thanks!