Spaces:
Sleeping
Sleeping
Update PFCdevApp.qmd
Browse files- PFCdevApp.qmd +288 -53
PFCdevApp.qmd
CHANGED
|
@@ -12,11 +12,11 @@ format:
|
|
| 12 |
---
|
| 13 |
# Home
|
| 14 |
|
| 15 |
-
<p style="font-size: 50px; font-weight: bold; text-align: center;">
|
| 16 |
|
| 17 |
<br>
|
| 18 |
|
| 19 |
-
<img src="https://ZhengTiger.github.io/picx-images-hosting/PFCdev/
|
| 20 |
|
| 21 |
<br>
|
| 22 |
<br>
|
|
@@ -26,7 +26,7 @@ Summary
|
|
| 26 |
</p>
|
| 27 |
|
| 28 |
<p style="font-size: 20px; text-align: justify;">
|
| 29 |
-
|
| 30 |
</p>
|
| 31 |
|
| 32 |
|
|
@@ -45,9 +45,8 @@ Our scRNAseq data sequenced the PFC of mice at four different stages (P1, P4, P1
|
|
| 45 |
</p>
|
| 46 |
|
| 47 |
- Select dataset: Select datasets containing different cell types
|
| 48 |
-
- Select time: Select datasets containing different developmental stages
|
| 49 |
- Select celltype: Select different resolutions to view cell clusters on UMAP
|
| 50 |
-
- Select gene: Select different genes to view their expression
|
| 51 |
|
| 52 |
|
| 53 |
|
|
@@ -56,14 +55,13 @@ Spatial data
|
|
| 56 |
</p>
|
| 57 |
|
| 58 |
<p style="font-size: 20px; text-align: justify;">
|
| 59 |
-
We collected the whole brain stereo-seq datasets of
|
| 60 |
</p>
|
| 61 |
|
| 62 |
-
- Spatial Clustering: Select different
|
| 63 |
- Spatial Gene Expression: Select different genes to view their spatial expression
|
| 64 |
|
| 65 |
|
| 66 |
-
|
| 67 |
<p style="font-size: 20px; font-weight: bold; text-align: left;">
|
| 68 |
Download
|
| 69 |
</p>
|
|
@@ -88,11 +86,33 @@ library(dplyr)
|
|
| 88 |
|
| 89 |
source("R/Palettes.R")
|
| 90 |
|
| 91 |
-
|
| 92 |
-
seu.downsample <- seu.
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
```
|
| 97 |
|
| 98 |
|
|
@@ -104,15 +124,11 @@ seu.downsample <- seu.downsample[,
|
|
| 104 |
## {.sidebar}
|
| 105 |
|
| 106 |
```{r}
|
| 107 |
-
selectInput('dataset', 'Select dataset', c("All cells","Neurons"))
|
| 108 |
-
```
|
| 109 |
-
|
| 110 |
-
```{r}
|
| 111 |
-
selectInput('time', 'Select time', c("All","P0","P4","P10","Adult"), selected = "All")
|
| 112 |
```
|
| 113 |
|
| 114 |
```{r}
|
| 115 |
-
selectInput('celltype', 'Select celltype', c("MainType","
|
| 116 |
```
|
| 117 |
|
| 118 |
```{r}
|
|
@@ -131,12 +147,16 @@ selectInput('gene', 'Select gene', rownames(seu.downsample), selected = "Cux2")
|
|
| 131 |
plotOutput('cluster_plot')
|
| 132 |
```
|
| 133 |
|
|
|
|
|
|
|
|
|
|
| 134 |
#### Column
|
| 135 |
|
| 136 |
```{r}
|
| 137 |
plotOutput('gene_plot')
|
| 138 |
```
|
| 139 |
|
|
|
|
| 140 |
### Row
|
| 141 |
|
| 142 |
#### Column
|
|
@@ -146,68 +166,67 @@ plotOutput('vln_plot')
|
|
| 146 |
```
|
| 147 |
|
| 148 |
|
| 149 |
-
|
| 150 |
```{r}
|
| 151 |
#| context: server
|
| 152 |
|
| 153 |
output$cluster_plot <- renderPlot({
|
| 154 |
-
if (input$time == "All"){
|
| 155 |
-
seu <- seu.downsample
|
| 156 |
-
}else{
|
| 157 |
-
seu <- subset(seu.downsample, cells = colnames(seu.downsample)[seu.downsample$orig.ident==input$time])
|
| 158 |
-
}
|
| 159 |
if (input$dataset=="Neurons"){
|
| 160 |
seu <- subset(seu.downsample, cells = colnames(seu.downsample)[seu.downsample$MainType==c("Excitatory", "Inhibitory")])
|
|
|
|
|
|
|
| 161 |
}
|
| 162 |
seu@meta.data[,input$celltype] <- factor(
|
| 163 |
seu@meta.data[,input$celltype],
|
| 164 |
levels = names(col_cluster[[input$celltype]])
|
| 165 |
)
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
})
|
| 179 |
|
| 180 |
|
| 181 |
output$gene_plot <- renderPlot({
|
| 182 |
-
if (input$time == "All"){
|
| 183 |
-
seu <- seu.downsample
|
| 184 |
-
}else{
|
| 185 |
-
seu <- subset(seu.downsample, cells = colnames(seu.downsample)[seu.downsample$orig.ident==input$time])
|
| 186 |
-
}
|
| 187 |
if (input$dataset=="Neurons"){
|
| 188 |
seu <- subset(seu.downsample, cells = colnames(seu.downsample)[seu.downsample$MainType==c("Excitatory", "Inhibitory")])
|
|
|
|
|
|
|
| 189 |
}
|
| 190 |
FeaturePlot(
|
| 191 |
seu,
|
| 192 |
features = input$gene,
|
| 193 |
reduction = 'umap',
|
|
|
|
|
|
|
| 194 |
order = T,
|
| 195 |
-
pt.size =
|
| 196 |
-
)
|
| 197 |
-
theme_bw(base_size = 15)
|
| 198 |
-
theme(panel.grid = element_blank(), plot.title = element_text(hjust = 0.5)
|
| 199 |
-
|
|
|
|
|
|
|
|
|
|
| 200 |
})
|
| 201 |
|
| 202 |
|
| 203 |
output$vln_plot <- renderPlot({
|
| 204 |
-
if (input$time == "All"){
|
| 205 |
-
seu <- seu.downsample
|
| 206 |
-
}else{
|
| 207 |
-
seu <- subset(seu.downsample, cells = colnames(seu.downsample)[seu.downsample$orig.ident==input$time])
|
| 208 |
-
}
|
| 209 |
if (input$dataset=="Neurons"){
|
| 210 |
seu <- subset(seu.downsample, cells = colnames(seu.downsample)[seu.downsample$MainType==c("Excitatory", "Inhibitory")])
|
|
|
|
|
|
|
| 211 |
}
|
| 212 |
seu@meta.data[,input$celltype] <- factor(
|
| 213 |
seu@meta.data[,input$celltype],
|
|
@@ -215,7 +234,223 @@ output$vln_plot <- renderPlot({
|
|
| 215 |
)
|
| 216 |
VlnPlot(seu, features = input$gene, group.by = input$celltype,
|
| 217 |
cols = col_cluster[[input$celltype]]) +
|
| 218 |
-
NoLegend()
|
|
|
|
| 219 |
})
|
| 220 |
```
|
| 221 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
# Home
|
| 14 |
|
| 15 |
+
<p style="font-size: 50px; font-weight: bold; text-align: center;">Single-cell spatiotemporal transcriptome dynamics of mouse prefrontal cortex intratelencephalic neurons during postnatal development</p>
|
| 16 |
|
| 17 |
<br>
|
| 18 |
|
| 19 |
+
<img src="https://ZhengTiger.github.io/picx-images-hosting/PFCdev/Figure_1A.2h8jm97w9c.webp" style="width: 100%;">
|
| 20 |
|
| 21 |
<br>
|
| 22 |
<br>
|
|
|
|
| 26 |
</p>
|
| 27 |
|
| 28 |
<p style="font-size: 20px; text-align: justify;">
|
| 29 |
+
The prefrontal cortex (PFC) is a core regulatory center for higher cognitive functions in the mammalian brain. In early postnatal mice, the PFC remains incompletely mature, particularly the intratelencephalic (IT) neurons located in superficial layers. However, the molecular developmental trajectories and regulatory mechanisms of IT neurons during the critical postnatal period (1-2 weeks) for circuit establishment, remain poorly characterized at single-cell resolution. Here, we performed single-cell RNA sequencing analysis on mouse PFC isolated at different developmental time points, and integrated with spatial transcriptomic data. Our study systematically deciphered the spatiotemporal transcriptome dynamics of mouse PFC during postnatal development, with particular emphasis on the heterogeneity of IT neurons. We identified dynamically expressed genes during postnatal development, including cadherin and axon guidance molecule genes, as well as specific transcriptional regulators that control the maturation of IT neurons in different layers. Furthermore, we also revealed that glial cells play crucial regulatory roles in IT neuron development through specific signaling pathways. Our study provides a comprehensive single-cell atlas of postnatal mouse PFC development, offering important insights into the mechanisms of neural development and circuit assembly in PFC.
|
| 30 |
</p>
|
| 31 |
|
| 32 |
|
|
|
|
| 45 |
</p>
|
| 46 |
|
| 47 |
- Select dataset: Select datasets containing different cell types
|
|
|
|
| 48 |
- Select celltype: Select different resolutions to view cell clusters on UMAP
|
| 49 |
+
- Select gene: Select different genes to view their expression
|
| 50 |
|
| 51 |
|
| 52 |
|
|
|
|
| 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
|
| 62 |
- Spatial Gene Expression: Select different genes to view their spatial expression
|
| 63 |
|
| 64 |
|
|
|
|
| 65 |
<p style="font-size: 20px; font-weight: bold; text-align: left;">
|
| 66 |
Download
|
| 67 |
</p>
|
|
|
|
| 86 |
|
| 87 |
source("R/Palettes.R")
|
| 88 |
|
| 89 |
+
# scrnaseq
|
| 90 |
+
seu.downsample <- readRDS('data/seu.all.HVGs.rds')
|
| 91 |
+
seu.downsample$orig.ident <- factor(seu.downsample$orig.ident,
|
| 92 |
+
levels = c("P0","P4","P10","Adult"))
|
| 93 |
+
seu.downsample$SubType <- seu.downsample$SubType_v4
|
| 94 |
+
|
| 95 |
+
# spatial
|
| 96 |
+
column <- c("x_rotated","y_rotated","Im.L2.3.IT","Im.L4.5.IT","Im.L5.IT","Im.L6.IT","L2.3.IT","L4.5.IT","L5.IT","L6.IT","L5.PT","L5.NP","L6.CT","Lamp5","Pvalb","Sst","Vip","NPC","Astro","Endo","Microglia","Oligo","OPC")
|
| 97 |
+
P1_cell2loc <- read.csv("data/P1_cell2location.csv", row.names = 1)
|
| 98 |
+
P1_cell2loc <- P1_cell2loc[,column]
|
| 99 |
+
P1_cell2loc$Endo <- 0
|
| 100 |
+
P1_cell2loc$Oligo <- 0
|
| 101 |
+
colnames(P1_cell2loc) <- c("x_rotated","y_rotated",names(col_cluster[["SubType"]]))
|
| 102 |
+
P1_cell2loc$SubType <- as.character(apply(P1_cell2loc[,names(col_cluster[["SubType"]])[-18]], 1, function(x){
|
| 103 |
+
names(which.max(x))
|
| 104 |
+
}))
|
| 105 |
+
|
| 106 |
+
P77_cell2loc <- read.csv("data/P77_cell2location.csv", row.names = 1)
|
| 107 |
+
P77_cell2loc <- P77_cell2loc[,column]
|
| 108 |
+
P77_cell2loc$Endo <- 0
|
| 109 |
+
colnames(P77_cell2loc) <- c("x_rotated","y_rotated",names(col_cluster[["SubType"]]))
|
| 110 |
+
P77_cell2loc$SubType <- as.character(apply(P77_cell2loc[,names(col_cluster[["SubType"]])[-18]], 1, function(x){
|
| 111 |
+
names(which.max(x))
|
| 112 |
+
}))
|
| 113 |
+
|
| 114 |
+
sp_p1 <- readRDS("data/P1_bin50_PFC.rds")
|
| 115 |
+
sp_p77 <- readRDS("data/P77_bin50_PFC.rds")
|
| 116 |
```
|
| 117 |
|
| 118 |
|
|
|
|
| 124 |
## {.sidebar}
|
| 125 |
|
| 126 |
```{r}
|
| 127 |
+
selectInput('dataset', 'Select dataset', c("All cells","Neurons"), selected = "Neurons")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
```
|
| 129 |
|
| 130 |
```{r}
|
| 131 |
+
selectInput('celltype', 'Select celltype', c("MainType","SubType"), selected = "SubType")
|
| 132 |
```
|
| 133 |
|
| 134 |
```{r}
|
|
|
|
| 147 |
plotOutput('cluster_plot')
|
| 148 |
```
|
| 149 |
|
| 150 |
+
|
| 151 |
+
### Row
|
| 152 |
+
|
| 153 |
#### Column
|
| 154 |
|
| 155 |
```{r}
|
| 156 |
plotOutput('gene_plot')
|
| 157 |
```
|
| 158 |
|
| 159 |
+
|
| 160 |
### Row
|
| 161 |
|
| 162 |
#### Column
|
|
|
|
| 166 |
```
|
| 167 |
|
| 168 |
|
|
|
|
| 169 |
```{r}
|
| 170 |
#| context: server
|
| 171 |
|
| 172 |
output$cluster_plot <- renderPlot({
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
if (input$dataset=="Neurons"){
|
| 174 |
seu <- subset(seu.downsample, cells = colnames(seu.downsample)[seu.downsample$MainType==c("Excitatory", "Inhibitory")])
|
| 175 |
+
}else{
|
| 176 |
+
seu <- seu.downsample
|
| 177 |
}
|
| 178 |
seu@meta.data[,input$celltype] <- factor(
|
| 179 |
seu@meta.data[,input$celltype],
|
| 180 |
levels = names(col_cluster[[input$celltype]])
|
| 181 |
)
|
| 182 |
+
DimPlot(
|
| 183 |
+
seu,
|
| 184 |
+
reduction = 'umap',
|
| 185 |
+
group.by = input$celltype,
|
| 186 |
+
split.by = "orig.ident",
|
| 187 |
+
ncol = 4,
|
| 188 |
+
cols = col_cluster[[input$celltype]],
|
| 189 |
+
pt.size = 0.5,
|
| 190 |
+
label = F) +
|
| 191 |
+
theme_bw(base_size = 15) +
|
| 192 |
+
theme(panel.grid = element_blank(), legend.position = "right",
|
| 193 |
+
strip.text = element_text(size = 20),
|
| 194 |
+
strip.background = element_rect(color="white", fill="white",)) +
|
| 195 |
+
coord_fixed() +
|
| 196 |
+
labs(title = "") +
|
| 197 |
+
guides(color = guide_legend(ncol = 1, override.aes = list(size = 3)))
|
| 198 |
})
|
| 199 |
|
| 200 |
|
| 201 |
output$gene_plot <- renderPlot({
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
if (input$dataset=="Neurons"){
|
| 203 |
seu <- subset(seu.downsample, cells = colnames(seu.downsample)[seu.downsample$MainType==c("Excitatory", "Inhibitory")])
|
| 204 |
+
}else{
|
| 205 |
+
seu <- seu.downsample
|
| 206 |
}
|
| 207 |
FeaturePlot(
|
| 208 |
seu,
|
| 209 |
features = input$gene,
|
| 210 |
reduction = 'umap',
|
| 211 |
+
split.by = "orig.ident",
|
| 212 |
+
ncol=4,
|
| 213 |
order = T,
|
| 214 |
+
pt.size = 0.5
|
| 215 |
+
) &
|
| 216 |
+
theme_bw(base_size = 15) &
|
| 217 |
+
theme(panel.grid = element_blank(), plot.title = element_text(hjust = 0.5),
|
| 218 |
+
strip.text = element_text(size = 20, face = "bold"),
|
| 219 |
+
legend.position = c(0.1,0.25)) &
|
| 220 |
+
coord_fixed() &
|
| 221 |
+
scale_color_gradientn(colours = c("lightblue3", "lightblue", "white", "red", "red4"), limits=c(0,2), breaks=c(0,2), na.value = "red4")
|
| 222 |
})
|
| 223 |
|
| 224 |
|
| 225 |
output$vln_plot <- renderPlot({
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 226 |
if (input$dataset=="Neurons"){
|
| 227 |
seu <- subset(seu.downsample, cells = colnames(seu.downsample)[seu.downsample$MainType==c("Excitatory", "Inhibitory")])
|
| 228 |
+
}else{
|
| 229 |
+
seu <- seu.downsample
|
| 230 |
}
|
| 231 |
seu@meta.data[,input$celltype] <- factor(
|
| 232 |
seu@meta.data[,input$celltype],
|
|
|
|
| 234 |
)
|
| 235 |
VlnPlot(seu, features = input$gene, group.by = input$celltype,
|
| 236 |
cols = col_cluster[[input$celltype]]) +
|
| 237 |
+
NoLegend() +
|
| 238 |
+
labs(x="")
|
| 239 |
})
|
| 240 |
```
|
| 241 |
|
| 242 |
+
|
| 243 |
+
|
| 244 |
+
|
| 245 |
+
|
| 246 |
+
|
| 247 |
+
# Spatial {scrolling="true"}
|
| 248 |
+
|
| 249 |
+
## {.sidebar}
|
| 250 |
+
|
| 251 |
+
```{r}
|
| 252 |
+
selectInput('sp_celltype', 'Select celltype', names(col_cluster[["SubType"]])[-18], selected = "Im L2/3 IT")
|
| 253 |
+
```
|
| 254 |
+
|
| 255 |
+
```{r}
|
| 256 |
+
selectInput('sp_gene', 'Select gene', rownames(seu.downsample), selected = "Cux2")
|
| 257 |
+
```
|
| 258 |
+
|
| 259 |
+
|
| 260 |
+
|
| 261 |
+
## Column
|
| 262 |
+
|
| 263 |
+
### Row
|
| 264 |
+
|
| 265 |
+
#### Column
|
| 266 |
+
|
| 267 |
+
```{r}
|
| 268 |
+
plotOutput('p1_cluster_plot')
|
| 269 |
+
```
|
| 270 |
+
|
| 271 |
+
#### Column
|
| 272 |
+
|
| 273 |
+
```{r}
|
| 274 |
+
plotOutput('p77_cluster_plot')
|
| 275 |
+
```
|
| 276 |
+
|
| 277 |
+
|
| 278 |
+
### Row
|
| 279 |
+
|
| 280 |
+
#### Column
|
| 281 |
+
|
| 282 |
+
```{r}
|
| 283 |
+
plotOutput('p1_subtype_plot')
|
| 284 |
+
```
|
| 285 |
+
|
| 286 |
+
#### Column
|
| 287 |
+
|
| 288 |
+
```{r}
|
| 289 |
+
plotOutput('p1_gene_plot')
|
| 290 |
+
```
|
| 291 |
+
|
| 292 |
+
#### Column
|
| 293 |
+
|
| 294 |
+
```{r}
|
| 295 |
+
plotOutput('p77_subtype_plot')
|
| 296 |
+
```
|
| 297 |
+
|
| 298 |
+
#### Column
|
| 299 |
+
|
| 300 |
+
```{r}
|
| 301 |
+
plotOutput('p77_gene_plot')
|
| 302 |
+
```
|
| 303 |
+
|
| 304 |
+
|
| 305 |
+
|
| 306 |
+
|
| 307 |
+
```{r}
|
| 308 |
+
#| context: server
|
| 309 |
+
|
| 310 |
+
output$p1_cluster_plot <- renderPlot({
|
| 311 |
+
data <- P1_cell2loc
|
| 312 |
+
ggplot(data, mapping = aes(x_rotated, y_rotated, color=SubType)) +
|
| 313 |
+
geom_point(size = 2) +
|
| 314 |
+
scale_color_manual(values = col_cluster[["SubType"]]) +
|
| 315 |
+
coord_fixed() +
|
| 316 |
+
#ggdark::dark_theme_void() +
|
| 317 |
+
theme_void() +
|
| 318 |
+
theme(legend.position = "right", plot.title = element_text(hjust = 0.5)) +
|
| 319 |
+
guides(color = guide_legend(title="", ncol = 1, override.aes = list(size = 3))) +
|
| 320 |
+
labs(title="P1 SubType")
|
| 321 |
+
})
|
| 322 |
+
|
| 323 |
+
output$p77_cluster_plot <- renderPlot({
|
| 324 |
+
data <- P77_cell2loc
|
| 325 |
+
ggplot(data, mapping = aes(x_rotated, y_rotated, color=SubType)) +
|
| 326 |
+
geom_point(size = 0.8) +
|
| 327 |
+
scale_color_manual(values = col_cluster[["SubType"]]) +
|
| 328 |
+
coord_fixed() +
|
| 329 |
+
#ggdark::dark_theme_void() +
|
| 330 |
+
theme_void() +
|
| 331 |
+
theme(legend.position = "right", plot.title = element_text(hjust = 0.5)) +
|
| 332 |
+
guides(color = guide_legend(title="", ncol = 1, override.aes = list(size = 3))) +
|
| 333 |
+
labs(title="P77 SubType")
|
| 334 |
+
})
|
| 335 |
+
|
| 336 |
+
output$p1_subtype_plot <- renderPlot({
|
| 337 |
+
data <- P1_cell2loc
|
| 338 |
+
subtype_i <- input$sp_celltype
|
| 339 |
+
df_i <- data.frame(
|
| 340 |
+
x = data$x_rotated,
|
| 341 |
+
y = data$y_rotated,
|
| 342 |
+
col = data[,subtype_i]
|
| 343 |
+
)
|
| 344 |
+
if (subtype_i %in% names(col_cluster[["SubType"]])[c(16,17,18,19,21)]){
|
| 345 |
+
df_i$col[!data$SubType==subtype_i] <- 0
|
| 346 |
+
}
|
| 347 |
+
df_i$col[df_i$col>1] <- 1
|
| 348 |
+
df_i$col[df_i$col<0.05] <- 0
|
| 349 |
+
low = "#f7f7f7"
|
| 350 |
+
if (length(which(df_i$col>0))==0){
|
| 351 |
+
high = "#f7f7f7"
|
| 352 |
+
}else{
|
| 353 |
+
high = col_cluster[["SubType"]][subtype_i]
|
| 354 |
+
}
|
| 355 |
+
ggplot(df_i, aes(x=x, y=y, color=col)) +
|
| 356 |
+
geom_point(size=2) +
|
| 357 |
+
scale_color_gradient(low = low, high=high,
|
| 358 |
+
na.value = "#f7f7f7", limits = c(0,max(df_i$col)),
|
| 359 |
+
breaks = c(0,max(df_i$col))) +
|
| 360 |
+
coord_fixed() +
|
| 361 |
+
theme_void() +
|
| 362 |
+
theme(legend.position = "none",
|
| 363 |
+
plot.title = element_text(hjust = 0.5)) +
|
| 364 |
+
labs(title=paste("P1", subtype_i))
|
| 365 |
+
})
|
| 366 |
+
|
| 367 |
+
|
| 368 |
+
output$p1_gene_plot <- renderPlot({
|
| 369 |
+
data <- data.frame(
|
| 370 |
+
x = sp_p1$x_rotated, y = sp_p1$y_rotated,
|
| 371 |
+
gene = scale(sp_p1@assays$RNA$counts[input$sp_gene,])
|
| 372 |
+
)
|
| 373 |
+
data$gene[data$gene<0] <- 0
|
| 374 |
+
data$gene[data$gene>3] <- 3
|
| 375 |
+
color <- col_cluster[["gene"]]
|
| 376 |
+
ggplot(data, aes(x=x, y=y, color=gene)) +
|
| 377 |
+
geom_point(size=2) +
|
| 378 |
+
scale_color_gradientn(colours = color, na.value = "lightgray",
|
| 379 |
+
limits = c(0,3),
|
| 380 |
+
breaks = c(0,3)) +
|
| 381 |
+
coord_fixed() +
|
| 382 |
+
#ggdark::dark_theme_void() +
|
| 383 |
+
theme_void()+
|
| 384 |
+
theme(legend.position = c(0.9,0.2), legend.title = element_blank(),
|
| 385 |
+
plot.title = element_text(hjust = 0.5)) +
|
| 386 |
+
labs(title=paste("P1", input$sp_gene))
|
| 387 |
+
})
|
| 388 |
+
|
| 389 |
+
|
| 390 |
+
|
| 391 |
+
output$p77_subtype_plot <- renderPlot({
|
| 392 |
+
data <- P77_cell2loc
|
| 393 |
+
data$`L5 IT`[data$`L5 IT`<0.25] <- 0
|
| 394 |
+
subtype_i <- input$sp_celltype
|
| 395 |
+
df_i <- data.frame(
|
| 396 |
+
x = data$x_rotated,
|
| 397 |
+
y = data$y_rotated,
|
| 398 |
+
col = data[,subtype_i]
|
| 399 |
+
)
|
| 400 |
+
if (subtype_i %in% names(col_cluster[["SubType"]])[c(16,17,18,20,21)]){
|
| 401 |
+
df_i$col[!data$SubType==subtype_i] <- 0
|
| 402 |
+
}
|
| 403 |
+
df_i$col[df_i$col>1] <- 1
|
| 404 |
+
df_i$col[df_i$col<0.05] <- 0
|
| 405 |
+
ggplot(df_i, aes(x=x, y=y, color=col)) +
|
| 406 |
+
geom_point(size=0.8) +
|
| 407 |
+
scale_color_gradient(low = "#f7f7f7", high=col_cluster[["SubType"]][subtype_i],
|
| 408 |
+
na.value = "#f7f7f7", limits = c(0,max(df_i$col)),
|
| 409 |
+
breaks = c(0,max(df_i$col))) +
|
| 410 |
+
coord_fixed() +
|
| 411 |
+
theme_void() +
|
| 412 |
+
theme(legend.position = "none",
|
| 413 |
+
plot.title = element_text(hjust = 0.5)) +
|
| 414 |
+
labs(title=paste("P77",subtype_i))
|
| 415 |
+
})
|
| 416 |
+
|
| 417 |
+
|
| 418 |
+
output$p77_gene_plot <- renderPlot({
|
| 419 |
+
data <- data.frame(
|
| 420 |
+
x = sp_p77$x_rotated, y = sp_p77$y_rotated,
|
| 421 |
+
gene = scale(sp_p77@assays$RNA$counts[input$sp_gene,])
|
| 422 |
+
)
|
| 423 |
+
data$gene[data$gene<0] <- 0
|
| 424 |
+
data$gene[data$gene>3] <- 3
|
| 425 |
+
color <- col_cluster[["gene"]]
|
| 426 |
+
ggplot(data, aes(x=x, y=y, color=gene)) +
|
| 427 |
+
geom_point(size=0.8) +
|
| 428 |
+
scale_color_gradientn(colours = color, na.value = "lightgray",
|
| 429 |
+
limits = c(0,3),
|
| 430 |
+
breaks = c(0,3)) +
|
| 431 |
+
coord_fixed() +
|
| 432 |
+
#ggdark::dark_theme_void() +
|
| 433 |
+
theme_void() +
|
| 434 |
+
theme(legend.position = c(0.9,0.2), legend.title = element_blank(),
|
| 435 |
+
plot.title = element_text(hjust = 0.5)) +
|
| 436 |
+
labs(title=paste("P77", input$sp_gene))
|
| 437 |
+
})
|
| 438 |
+
```
|
| 439 |
+
|
| 440 |
+
|
| 441 |
+
|
| 442 |
+
|
| 443 |
+
|
| 444 |
+
# Download
|
| 445 |
+
|
| 446 |
+
<p style="font-size: 20px; text-align: justify;">
|
| 447 |
+
The raw single cell RNA-seq data are available from GEO (<a href="https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE298260">GSE298260</a>). The raw stereo-seq data are available from GEO
|
| 448 |
+
</p>
|
| 449 |
+
|
| 450 |
+
<p style="font-size: 20px; text-align: justify;">
|
| 451 |
+
The processed data can be downloaded here:</p>
|
| 452 |
+
|
| 453 |
+
- All cells data: <a href="https://huggingface.co/TigerZheng/PFCdev-data/resolve/main/seu.harmony.rds?download=true">sc_seu.rds</a>
|
| 454 |
+
- Spatial data: <a href="https://huggingface.co/TigerZheng/PFCdev-data/resolve/main/P1_bin50_PFC.rds?download=true">p1_seu.rds</a>, <a href="https://huggingface.co/TigerZheng/PFCdev-data/resolve/main/P77_bin50_PFC.rds?download=true">p77_seu.rds</a>
|
| 455 |
+
|
| 456 |
+
|