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

FeaturePlot for spatial transcriptomics data does not work #9481

Open
Yijia-Jiang opened this issue Nov 14, 2024 · 0 comments
Open

FeaturePlot for spatial transcriptomics data does not work #9481

Yijia-Jiang opened this issue Nov 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Yijia-Jiang
Copy link

Hello, I am trying Seurat for the latest visium HD data and trying to use SpatialFeaturePlot function. I used the exact same script shown in vignette for preprocessing, but the feature plot is just H&E image and there is no gene expression level displayed. Could you help with this? Thank you very much.

object <- Load10X_Spatial(data.dir = localdir)

# Setting default assay changes between 8um and 16um binning
Assays(object)
DefaultAssay(object) <- "Spatial"

head(object@meta.data)
vln.plot <- VlnPlot(object, features = "nCount_Spatial", pt.size = 0) + theme(axis.text = element_text(size = 4)) + NoLegend()
count.plot <- SpatialFeaturePlot(object, features = "nCount_Spatial") + theme(legend.position = "right")

# note that many spots have very few counts, in-part
# due to low cellular density in certain tissue regions
vln.plot | count.plot

length(rownames((object@assays$Spatial@features@.Data)))
# normalize both 8um and 16um bins
object <- NormalizeData(object)
object@assays$Spatial$data

p1 <- SpatialFeaturePlot(object, features = "CD3D") + ggtitle("CD3D expression (16um)")
p2 <- SpatialFeaturePlot(object, features = "CD4") + ggtitle("CD4 expression (16um)")
print(p1)
print(p2)
Screenshot 2024-11-14 at 10 23 05 AM
@Yijia-Jiang Yijia-Jiang added the bug Something isn't working label Nov 14, 2024
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

1 participant