Spaces:
Sleeping
Sleeping
Update PFCdevApp.qmd
Browse files- PFCdevApp.qmd +11 -19
PFCdevApp.qmd
CHANGED
|
@@ -55,7 +55,7 @@ Spatial data
|
|
| 55 |
</p>
|
| 56 |
|
| 57 |
<p style="font-size: 20px; text-align: justify;">
|
| 58 |
-
We collected the whole brain stereo-seq datasets of P1 and Adult mice from [(Han et al., Neuron, 2025)](https://doi.org/10.1016/j.neuron.2025.02.015, extracted and analyzed the PFC brain region. Users can browse the following content through the spatial page:
|
| 59 |
</p>
|
| 60 |
|
| 61 |
- Spatial Clustering: Select different cell subtypes to view their spatial distribution
|
|
@@ -88,9 +88,9 @@ source("R/Palettes.R")
|
|
| 88 |
|
| 89 |
# scrnaseq
|
| 90 |
seu.downsample <- readRDS('data/seu.all.HVGs.rds')
|
| 91 |
-
|
| 92 |
seu.downsample$orig.ident <- factor(seu.downsample$orig.ident,
|
| 93 |
-
levels = c("
|
| 94 |
seu.downsample$SubType <- seu.downsample$SubType_v4
|
| 95 |
|
| 96 |
# spatial
|
|
@@ -225,26 +225,18 @@ output$gene_plot <- renderPlot({
|
|
| 225 |
|
| 226 |
output$vln_plot <- renderPlot({
|
| 227 |
if (input$dataset=="Neurons"){
|
| 228 |
-
|
| 229 |
}else{
|
| 230 |
-
|
| 231 |
}
|
| 232 |
-
|
| 233 |
-
|
| 234 |
levels = names(col_cluster[[input$celltype]])
|
| 235 |
)
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
ggplot(data, aes(x=Cluster, y=Gene, fill=Cluster)) +
|
| 241 |
-
geom_violin(scale="width", trim = T, adjust=1) +
|
| 242 |
-
geom_jitter(size=0.1, alpha=0.5) +
|
| 243 |
-
theme_classic(base_size = 15) +
|
| 244 |
-
theme(legend.position = "none",
|
| 245 |
-
plot.title = element_text(face="bold.italic", size = 20, hjust = 0.5)) +
|
| 246 |
-
scale_fill_manual(values = col_cluster[[input$celltype]]) +
|
| 247 |
-
labs(x="", y="Expression Level", title = input$gene)
|
| 248 |
})
|
| 249 |
```
|
| 250 |
|
|
|
|
| 55 |
</p>
|
| 56 |
|
| 57 |
<p style="font-size: 20px; text-align: justify;">
|
| 58 |
+
We collected the whole brain stereo-seq datasets of P1 and Adult mice from [(Han et al., Neuron, 2025)](https://doi.org/10.1016/j.neuron.2025.02.015 , extracted and analyzed the PFC brain region. Users can browse the following content through the spatial page:
|
| 59 |
</p>
|
| 60 |
|
| 61 |
- Spatial Clustering: Select different cell subtypes to view their spatial distribution
|
|
|
|
| 88 |
|
| 89 |
# scrnaseq
|
| 90 |
seu.downsample <- readRDS('data/seu.all.HVGs.rds')
|
| 91 |
+
seu.downsample$orig.ident[seu.downsample$orig.ident == "P0"] <- "P1"
|
| 92 |
seu.downsample$orig.ident <- factor(seu.downsample$orig.ident,
|
| 93 |
+
levels = c("P1","P4","P10","Adult"))
|
| 94 |
seu.downsample$SubType <- seu.downsample$SubType_v4
|
| 95 |
|
| 96 |
# spatial
|
|
|
|
| 225 |
|
| 226 |
output$vln_plot <- renderPlot({
|
| 227 |
if (input$dataset=="Neurons"){
|
| 228 |
+
seu3 <- subset(seu.downsample, cells = colnames(seu.downsample)[seu.downsample$MainType %in% c("Excitatory", "Inhibitory")])
|
| 229 |
}else{
|
| 230 |
+
seu3 <- seu.downsample
|
| 231 |
}
|
| 232 |
+
seu3@meta.data[,input$celltype] <- factor(
|
| 233 |
+
seu3@meta.data[,input$celltype],
|
| 234 |
levels = names(col_cluster[[input$celltype]])
|
| 235 |
)
|
| 236 |
+
VlnPlot(seu3, features = input$gene, group.by = input$celltype,
|
| 237 |
+
col = col_cluster[[input$celltype]]) +
|
| 238 |
+
NoLegend() +
|
| 239 |
+
labs(x="")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 240 |
})
|
| 241 |
```
|
| 242 |
|