assay %in% SeuratObject::Assays(x) is not TRUE
628511miao opened this issue · 2 comments
628511miao commented
I am performing SPOTlight and I am getting this error:
#res <- SPOTlight(
- x = sce1,
- y = stRNA,
- groups = sce$t_group,
- mgs = mgs_df,
- hvg = hvg,
- weight_id = "mean.AUC",
- group_id = "cluster",
- gene_id = "gene")
Error in .extract_counts(y, assay, slot) :
assay %in% SeuratObject::Assays(x) is not TRUE
axiba053 commented
+1
axiba053 commented
This is the software version, data structure, running code and error message. What is the cause? How to solve it? Thank you very much!
> packageVersion('SPOTlight')
[1] ‘1.7.2’
> packageVersion('Seurat')
[1] ‘4.3.0’
> sce
class: SingleCellExperiment
dim: 18975 40
metadata(0):
assays(2): counts logcounts
rownames(18975): A1BG A1BG-AS1 ... ZYG11A bP-21264C1.2
rowData names(0):
colnames(40): SMC01-T_SMC01.T_CTGTGCTTCAGATAAG
SMC01-T_SMC01.T_TAGCCGGCACGTCAGC ... SMC01-N_SMC01.N_CCATGTCTCACCTCGT
SMC01-N_SMC01.N_TCATTACCATCTCCCA
colData names(10): orig.ident nCount_RNA ... sizeFactor label
reducedDimNames(0):
mainExpName: RNA
altExpNames(1): integrated
> spdata
An object of class Seurat
36122 features across 7347 samples within 2 assays
Active assay: SCT (18037 features, 3000 variable features)
1 other assay present: Spatial
2 dimensional reductions calculated: pca, umap
1 image present: slice1
> res <- SPOTlight(
x = sce,
y = spdata,
groups = colLabels(sce),
mgs = mgs_df,
hvg = hvg,
weight_id = "mean.AUC",
group_id = "cluster",
gene_id = "gene",assay="SCT")
Error in .extract_counts(y, assay, slot) :
assay %in% SeuratObject::Assays(x) is not TRUE