-
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
Question: Visium Data and pulling out cells with high GO enrichment for a given pathway #127
Comments
I will consider the code from our vignette for analysis of spatial datasets (https://bioconductor.org/packages/release/bioc/vignettes/fgsea/inst/doc/geseca-tutorial.html#analysis-of-spatial-rna-seq). topPathways <- gesecaRes[, pathway] |> head(4)
for (ppn in topPathways) {
pp <- pathways[[ppn]]
pp <- intersect(pp, rownames(E))
score <- colSums(brain@assays$SCT@scale.data[pp, ])/sqrt(length(pp))
brain@meta.data[[ppn]] <- score
}
SpatialFeaturePlot(brain, features = topPathways, ) it measures the pathway expression per each spot. After that, the values can be found in the metadata of object ( brain@meta.data[, "KEGG_RIBOSOME", drop = FALSE] Coordinates for each spot could be found in the following attribute - |
Hi @vdsukhov |
@Pedramto89 I've pushed some updates to the plotting code and the vignette. Please, check it out (you need to install the package from github with |
Thank you @assaron library(fgsea) data <- RunPCA(data, assay = "SCT", verbose = FALSE, set.seed(1) gesecaRes <- geseca(pathways, E, minSize = 15, maxSize = 500, center = FALSE) for (ppn in topPathways) { score <- colSums(data@assays$SCT@scale.data[pp, ])/sqrt(length(pp)) |
@Pedramto89 try to use the new The titles can be shortened for convenience, and you can use
An individual pathway can be plotted as this:
|
Thanks so much for the prompt response @assaron It worked! |
Hi gesecaRes <- geseca(pathways, E, minSize = 15, maxSize = 500, center = FALSE) topPathways <- gesecaRes[, pathway] |> head(10) plotCoregulationProfileSpatial(pathways$HALLMARK_OXIDATIVE_PHOSPHORYLATION, |
@Pedramto89 the images look OK on the first glance. What exactly are you missing? |
Hi, I am using your package on Visium data as described in your recent manual, it works very fine! Related to that, I am wondering if there is a way to pull out identities of spots that have a particularly high GO enrichment (for a particular pathway or process)? In other words, where are the results of "fgsea" stored in Seurat object?
The text was updated successfully, but these errors were encountered: