Spaces:
Sleeping
Sleeping
Update PFCdevApp.qmd
Browse files- PFCdevApp.qmd +52 -47
PFCdevApp.qmd
CHANGED
|
@@ -286,9 +286,35 @@ plotOutput('p1_subtype_plot')
|
|
| 286 |
#### Column
|
| 287 |
|
| 288 |
```{r}
|
| 289 |
-
plotOutput('
|
| 290 |
```
|
| 291 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 292 |
#### Column
|
| 293 |
|
| 294 |
```{r}
|
|
@@ -298,9 +324,33 @@ plotOutput('p77_subtype_plot')
|
|
| 298 |
#### Column
|
| 299 |
|
| 300 |
```{r}
|
| 301 |
-
plotOutput('
|
| 302 |
```
|
| 303 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 304 |
|
| 305 |
|
| 306 |
|
|
@@ -365,29 +415,6 @@ output$p1_subtype_plot <- renderPlot({
|
|
| 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
|
|
@@ -413,28 +440,6 @@ output$p77_subtype_plot <- renderPlot({
|
|
| 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 |
|
|
|
|
| 286 |
#### Column
|
| 287 |
|
| 288 |
```{r}
|
| 289 |
+
plotOutput('p1_geneplot')
|
| 290 |
```
|
| 291 |
|
| 292 |
+
```{r}
|
| 293 |
+
#| context: server
|
| 294 |
+
|
| 295 |
+
output$p1_geneplot <- renderPlot({
|
| 296 |
+
gene_i <- input$sp_gene
|
| 297 |
+
data <- data.frame(
|
| 298 |
+
x = sp_p1$x_rotated, y = sp_p1$y_rotated,
|
| 299 |
+
gene = scale(sp_p1@assays$RNA$counts[gene_i,])
|
| 300 |
+
)
|
| 301 |
+
data$gene[data$gene<0] <- 0
|
| 302 |
+
data$gene[data$gene>3] <- 3
|
| 303 |
+
color <- col_cluster[["gene"]]
|
| 304 |
+
ggplot(data, aes(x=x, y=y, color=gene)) +
|
| 305 |
+
geom_point(size=2) +
|
| 306 |
+
scale_color_gradientn(colours = color, na.value = "lightgray",
|
| 307 |
+
limits = c(0,3),
|
| 308 |
+
breaks = c(0,3)) +
|
| 309 |
+
coord_fixed() +
|
| 310 |
+
theme_void()+
|
| 311 |
+
theme(legend.position = c(0.9,0.2), legend.title = element_blank(),
|
| 312 |
+
plot.title = element_text(hjust = 0.5)) +
|
| 313 |
+
labs(title=paste("P1", gene_i))
|
| 314 |
+
})
|
| 315 |
+
```
|
| 316 |
+
|
| 317 |
+
|
| 318 |
#### Column
|
| 319 |
|
| 320 |
```{r}
|
|
|
|
| 324 |
#### Column
|
| 325 |
|
| 326 |
```{r}
|
| 327 |
+
plotOutput('p77_geneplot')
|
| 328 |
```
|
| 329 |
|
| 330 |
+
```{r}
|
| 331 |
+
#| context: server
|
| 332 |
+
|
| 333 |
+
output$p77_geneplot <- renderPlot({
|
| 334 |
+
gene_i <- input$sp_gene
|
| 335 |
+
data <- data.frame(
|
| 336 |
+
x = sp_p77$x_rotated, y = sp_p77$y_rotated,
|
| 337 |
+
gene = scale(sp_p77@assays$RNA$counts[gene_i,])
|
| 338 |
+
)
|
| 339 |
+
data$gene[data$gene<0] <- 0
|
| 340 |
+
data$gene[data$gene>3] <- 3
|
| 341 |
+
color <- col_cluster[["gene"]]
|
| 342 |
+
ggplot(data, aes(x=x, y=y, color=gene)) +
|
| 343 |
+
geom_point(size=0.8) +
|
| 344 |
+
scale_color_gradientn(colours = color, na.value = "lightgray",
|
| 345 |
+
limits = c(0,3),
|
| 346 |
+
breaks = c(0,3)) +
|
| 347 |
+
coord_fixed() +
|
| 348 |
+
theme_void() +
|
| 349 |
+
theme(legend.position = c(0.9,0.2), legend.title = element_blank(),
|
| 350 |
+
plot.title = element_text(hjust = 0.5)) +
|
| 351 |
+
labs(title=paste("P77", gene_i))
|
| 352 |
+
})
|
| 353 |
+
```
|
| 354 |
|
| 355 |
|
| 356 |
|
|
|
|
| 415 |
})
|
| 416 |
|
| 417 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 418 |
output$p77_subtype_plot <- renderPlot({
|
| 419 |
data <- P77_cell2loc
|
| 420 |
data$`L5 IT`[data$`L5 IT`<0.25] <- 0
|
|
|
|
| 440 |
plot.title = element_text(hjust = 0.5)) +
|
| 441 |
labs(title=paste("P77",subtype_i))
|
| 442 |
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 443 |
```
|
| 444 |
|
| 445 |
|