TigerZheng commited on
Commit
ec5fe32
·
verified ·
1 Parent(s): 58f568d

Upload PFCapp.qmd

Browse files
Files changed (1) hide show
  1. PFCapp.qmd +173 -0
PFCapp.qmd ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: "PFC Dashboards"
3
+ author: "Cao Lab"
4
+ server: shiny
5
+ format:
6
+ dashboard:
7
+ logo: https://zhenghu159.github.io/picx-images-hosting/PFCapp/Logo.1756dx3zx7.webp
8
+ nav-buttons:
9
+ - icon: github
10
+ href: https://github.com/GangCaoLab/mPFC-web
11
+ ---
12
+
13
+
14
+
15
+ # Home
16
+
17
+ <p style="font-size: 50px; font-weight: bold; text-align: center;">A single-cell resolution spatial-transcriptome-connectome integrated multi-omic atlas of prefrontal cortex</p>
18
+
19
+ <br>
20
+
21
+ <img src="https://zhenghu159.github.io/picx-images-hosting/PFCapp/main.77dcin4jph.webp" style="width: 100%;">
22
+
23
+ <br>
24
+ <br>
25
+
26
+ <p style="font-size: 30px; font-weight: bold; text-align: left;">
27
+ Abstract
28
+ </p>
29
+
30
+ <p style="font-size: 20px; text-align: justify;">
31
+ Medial prefrontal cortex (mPFC) is the high-level center of brain cognitive function, which regulates emotion, memory, decision-making, behavior, neuroendocrine and other brain functions. mPFC has a wide range of projections in the cerebral cortex, thalamus, hypothalamus, basal ganglia, midbrain and other brain regions, forms extremely complex projection circuits. Analyzing these numerous projection circuits structures is an urgent problem in neuroscience. The conventional method is using neurotropic viruses to express fluorescent proteins for nucleus labeling. However, due to the limitation of fluorescent protein types and spectral crossover, it is time-consuming and labor-intensive to realize multiple nucleus labeling and tracing. The ideal circuits analysis solution is to break through the limit of fluorescent protein types and can label multiple brain regions. On the basis of multi-brain circuits labeling, it can also analyze the expression of neuron-related genes in the circuits, so as to better interpret the mechanism by which specific circuits perform their functions.
32
+ </p>
33
+
34
+
35
+ <br>
36
+
37
+ <p style="font-size: 30px; font-weight: bold; text-align: left;">
38
+ Interactively exploring the data
39
+ </p>
40
+
41
+ <a style="font-size: 20px; font-weight: bold; text-align: left;">
42
+ scRNAseq
43
+ </a>
44
+
45
+ - Cell cluster UMAP
46
+ - Feature plot in UMAP
47
+
48
+ <a style="font-size: 20px; font-weight: bold; text-align: left;">
49
+ Spatial data
50
+ </a>
51
+
52
+
53
+
54
+
55
+
56
+ ```{r}
57
+ #| context: setup
58
+ #| warning: false
59
+ #| message: false
60
+
61
+ library(ggplot2)
62
+ library(scCustomize)
63
+ library(shiny)
64
+ library(rgl)
65
+ #library(wholebrain)
66
+ #attach(loadNamespace('wholebrain'), warn.conflicts = FALSE)
67
+ source("R/Palettes.R")
68
+ source('R/includes.R')
69
+ Adult.Ex <- readRDS('data/Adult.Ex.rds')
70
+ sp.PFC <- readRDS('data/sp.PFC.rds')
71
+ options(rgl.useNULL = TRUE)
72
+ ```
73
+
74
+
75
+
76
+ # scRNAseq
77
+
78
+ ## Row
79
+
80
+ ### Column
81
+
82
+ ```{r}
83
+ selectInput('cluster', 'Select Cluster', c("SubType_Layer","SubType"))
84
+ plotOutput('cluster_plot')
85
+ ```
86
+
87
+ ### Column
88
+
89
+ ```{r}
90
+ selectInput('gene', 'Select Gene', rownames(Adult.Ex))
91
+ plotOutput('gene_plot')
92
+ ```
93
+
94
+
95
+ ```{r}
96
+ #| context: server
97
+
98
+ output$cluster_plot <- renderPlot({
99
+ DimPlot_scCustom(
100
+ seurat_object = Adult.Ex,
101
+ reduction = 'umap',
102
+ group.by = input$cluster,
103
+ colors_use = col_cluster[[input$cluster]],
104
+ label = T
105
+ ) +
106
+ coord_fixed()
107
+ })
108
+
109
+ output$gene_plot <- renderPlot({
110
+ FeaturePlot_scCustom(
111
+ seurat_object = Adult.Ex,
112
+ features = input$gene) +
113
+ coord_fixed()
114
+ })
115
+ ```
116
+
117
+
118
+
119
+
120
+
121
+
122
+ # Spatial
123
+
124
+ TO DO ...
125
+
126
+
127
+
128
+
129
+ # 3D
130
+
131
+ ## Row
132
+
133
+ ### Column
134
+
135
+ ```{r}
136
+ selectInput('subtype', 'Select SubType', sort(unique(sp.PFC$SubType)))
137
+ rglwidgetOutput('spatial_subtype', width = "100%")
138
+ ```
139
+
140
+
141
+ ```{r}
142
+ #| context: server
143
+
144
+ output$spatial_subtype <- renderRglwidget({
145
+ open3d()
146
+ bg3d(color = "black")
147
+ par3d(userMatrix = rotationMatrix(-pi/6, -1, 1, 0), zoom = 0.6)
148
+ acr.list <- c("MOs","PL","ORBm","ACAd","ILA","DP","ACAv")
149
+ for(acr in acr.list){
150
+ mesh <- mesh3d.allen.annot.from.id(get.id.from.acronym(acr))
151
+ #to.del <- which(mesh$vb[1,] < 0)
152
+ #to.del <- NA
153
+ #mesh$it <- mesh$it[,!is.element(mesh$it[1,], to.del) & !is.element(mesh$it[2,], to.del) & !is.element(mesh$it[3,], to.del)]
154
+ #col <- color.from.acronym(acr)
155
+ col <- "lightgray"
156
+ #col <- col_Region[acr]
157
+ shade3d(mesh, col = col, material = list(lit=FALSE), alpha = 0.1)
158
+ }
159
+
160
+ df_plot <- [email protected][which(sp.PFC$SubType == input$subtype),]
161
+
162
+ spheres3d(x = df_plot$ML_new,
163
+ y = df_plot$DV_new,
164
+ z = df_plot$AP_new,
165
+ col = col_cluster[["SubType"]][input$subtype], radius=0.01, alpha=1)
166
+ rglwidget()
167
+ })
168
+ ```
169
+
170
+
171
+
172
+
173
+