-
Notifications
You must be signed in to change notification settings - Fork 69
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
plotCoregulationProfileSpatial for Seurat5 object with layers #163
Comments
Hey @csmoreno, Could you please share the Seurat object you're working with (you can send it to me via email in case you don't want to make it publicly available: [email protected]) and some minimal code snippet example which causes an error so I can try to reproduce the error on my end? It would also be great if you could include the output of |
Hi Vladimir, Here is the code: library(tidyverse) CM01.object = readRDS('./rds_objects/CM01.object.16um.rds') fGSEA analysisHallmark_pathwaysDF <- msigdbr("human", category="H") run spatial fgseaset.seed(1) ###plot top four Hallmark pathways ps <- plotCoregulationProfileSpatial(Hallmark_pathways[topPathways], CM01.object, title=titles) cowplot::plot_grid(plotlist=ps, ncol=2) sessionInfo() And here is the sessionInfo: R version 4.4.1 (2024-06-14) Matrix products: default locale: time zone: America/New_York attached base packages: other attached packages: loaded via a namespace (and not attached): |
@csmoreno yep it would be great if you could provide a link to the object. You can send the link to one of these email addresses: [email protected] or [email protected] (in case if it's google drive) |
I found a workaround by converting from an Assay5 to an Assay class. convert a v5 assay to a v3 assayCM01.object[["Spatial"]] <- as(object = CM01.object[["Spatial.016um"]], Class = "Assay") ps <- plotCoregulationProfileSpatial(Hallmark_pathways[topPathways], CM01.object, assay = "Spatial", cowplot::plot_grid(plotlist=ps, ncol=2) |
When I run this code
ps <- plotCoregulationProfileSpatial(pathways[topPathways], CM01.object, title=titles)
or this code
ps <- plotCoregulationProfileSpatial(pathways[topPathways], CM01.object, title=titles, assay = "Spatial.016um")
on a Seurat5 Object that has scaled data in it under
CM01.object@assays$Spatial.016um$scale.data
I get this error:
Error in addGesecaScores(list(pathway = pathway), object, assay = assay, :
no slot of name "scale.data" for this object of class "Assay5"
I think it might have to do with the use of layers in Seurat5. Any idea how to fix this?
Thanks
The text was updated successfully, but these errors were encountered: