-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathserver.R
More file actions
106 lines (80 loc) · 2.66 KB
/
Copy pathserver.R
File metadata and controls
106 lines (80 loc) · 2.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
options(shiny.sanitize.errors = F)
source("./global.R")
server<-function(input,output,session){
updateSelectizeInput(session=session, 'var', choices = c(Choose = '', gene.names), server = TRUE,selected="TBXT")
updateSelectizeInput(session=session, 'var2', choices = c(Choose = '', gene.names), server = TRUE,selected="MESP1")
output$umap_plot <- renderPlot({
validate(
need(input$var, "Please select another gene")
)
df_scatter<-data.table(x=umap$X0,
y=umap$X1,
z=unlist(express_vals[[input$var]]))
plot.std.col(df_scatter, xname="", yname="", title=paste0(input$var))
})
output$iso <- renderPlotly({
validate(
need(input$var, "Please select another gene")
)
#is_df$cluster <-is_df$cluster
plot_iso(input$var)
})
output$umap_cluster3<-output$umap_cluster2<-output$umap_cluster <- renderPlot({
plot_cluster()
})
output$boxplot_cluster<-renderPlot({
df_boxplot<-data.table(z=unlist(express_vals[[input$var]]),
cluster=umap$cluster_id)
boxplot_cluster(df_boxplot,input$var)
})
output$umap_2gene<-renderPlot({
plot_2gene(input$var,input$var2)
})
output$umap_2genecolor<-renderPlot({
plot_2genecolor(input$var,input$var2)
})
output$diffmap<-renderPlotly({
plot_3d()
})
output$downloadData <- downloadHandler(
filename <- function() {
paste("expression_values", "rds", sep=".")
},
content <- function(file) {
file.copy(paste0(base,'express_vals.rds'), file)
}
)
output$downloadUmap <- downloadHandler(
filename <- function() {
paste("annot_umap", "rds", sep=".")
},
content <- function(file) {
file.copy(paste0(base,'umap.rds'), file)
}
)
output$Fig1e_2<-output$Fig1e <- renderImage({
filename <- 'www/spat.png'
list(src = filename,
width = 600,height = 350)
}, deleteFile = FALSE)
output$Fig1a <- renderImage({
filename <- 'www/Figure_1_DissectionRegions.png'
list(src = filename,
width = 600,height = 350)
}, deleteFile = FALSE)
output$Fig1b <- renderImage({
filename <- 'www/Figure_1_WholeEmbryo.png'
list(src = filename,
width = 600,height = 350)
}, deleteFile = FALSE)
output$Fig1c <- renderImage({
filename <- 'www/Figure_1_DorsalView.png'
list(src = filename,
width = 600,height = 350)
}, deleteFile = FALSE)
output$Fig1d <- renderImage({
filename <- 'www/Figure_1_VentralView.png'
list(src = filename,
width = 600,height = 350,align='center')
}, deleteFile = FALSE)
}