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

SpatialFeaturePlot returning error #6312

Closed
cz0316 opened this issue Aug 16, 2022 · 1 comment
Closed

SpatialFeaturePlot returning error #6312

cz0316 opened this issue Aug 16, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@cz0316
Copy link

cz0316 commented Aug 16, 2022

Recently, I got a new error when I was using the 'SpatialPlot' function.
However, the same code worked fine a few days ago.

SpatialPlot(st.colon1,features=c('B2M'))

Error in vapply(X = keyed.objects, FUN = function(x) { :
values must be length 1,
but FUN(X[[2]]) result is length 0

@cz0316 cz0316 added the bug Something isn't working label Aug 16, 2022
@AustinHartman
Copy link
Contributor

Thanks for reporting this! It looks like one of the keys in st.colon1 is unexpectedly missing. The fix for this required an update to SeuratObject which Seurat depends on. You can install the fix using devtools::install_github("mojaveazure/seurat-object", "develop") and then run st.colon1 <- UpdateSeuratObject(st.colon1). After that, SpatialPlot should work. Alternatively, if you prefer not to install SeuratObject while it's still in development you can manually add the missing key to the object like this: slot(slot(st.colon1, "assays")$RNA, "key") <- "rna_"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants