dash
This commit is contained in:
parent
f9db5cbc33
commit
27f70afb2c
2 changed files with 350 additions and 325 deletions
|
@ -124,9 +124,18 @@ function(input, output, session) {
|
||||||
|
|
||||||
|
|
||||||
# different data ranges required for SNP distances
|
# different data ranges required for SNP distances
|
||||||
snp_ligand_dist_df3 = merged_df3[merged_df3$ligand_distance<input$snp_ligand_dist,]
|
snp_ligand_dist_df3 = merged_df3[merged_df3[['ligand_distance']]<input$snp_ligand_dist,]
|
||||||
snp_interface_dist_df3 = merged_df3[merged_df3$interface_dist<input$snp_interface_dist,]
|
if ("interface_dist" %in% colnames(merged_df3)){
|
||||||
snp_nca_dist_df3 = merged_df3[merged_df3$nca_distance<input$snp_nca_dist,]
|
snp_interface_dist_df3 = merged_df3[merged_df3[['interface_dist']]<input$snp_interface_dist,]
|
||||||
|
} else {
|
||||||
|
snp_interface_dist_df3 = NULL
|
||||||
|
}
|
||||||
|
|
||||||
|
if ("nca_distance" %in% colnames(merged_df3)){
|
||||||
|
snp_nca_dist_df3 = merged_df3[merged_df3[['nca_distance']]<input$snp_nca_dist,]
|
||||||
|
} else {
|
||||||
|
snp_nca_dist_df3 = NULL
|
||||||
|
}
|
||||||
|
|
||||||
stability_colname = stability_boxes_df[stability_boxes_df$stability_type==input$stability_snp_param,"stability_colname"]
|
stability_colname = stability_boxes_df[stability_boxes_df$stability_type==input$stability_snp_param,"stability_colname"]
|
||||||
outcome_colname = stability_boxes_df[stability_boxes_df$stability_type==input$stability_snp_param,"outcome_colname"]
|
outcome_colname = stability_boxes_df[stability_boxes_df$stability_type==input$stability_snp_param,"outcome_colname"]
|
||||||
|
@ -162,7 +171,8 @@ function(input, output, session) {
|
||||||
### NGLViewer ####
|
### NGLViewer ####
|
||||||
# Structure Viewer WebGL/NGLViewR window
|
# Structure Viewer WebGL/NGLViewR window
|
||||||
output$structure <- renderNGLVieweR({
|
output$structure <- renderNGLVieweR({
|
||||||
ngl_gene=isolate(input$switch_target)
|
#ngl_gene=isolate(input$switch_target)
|
||||||
|
ngl_gene=input$switch_target
|
||||||
ngl_drug=target_map[[ngl_gene]]
|
ngl_drug=target_map[[ngl_gene]]
|
||||||
ngl_pdb_file=paste0(load_dir, "Data/", ngl_drug, '/output/depth/', ngl_gene, '_complex.pdb')
|
ngl_pdb_file=paste0(load_dir, "Data/", ngl_drug, '/output/depth/', ngl_gene, '_complex.pdb')
|
||||||
print(ngl_pdb_file)
|
print(ngl_pdb_file)
|
||||||
|
@ -262,6 +272,8 @@ function(input, output, session) {
|
||||||
geom_ls = 4
|
geom_ls = 4
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# if ("interface_dist" %in% colnames(input$switch_target)) {
|
||||||
output$site_snp_count_interface = renderPlot(
|
output$site_snp_count_interface = renderPlot(
|
||||||
site_snp_count_bp(
|
site_snp_count_bp(
|
||||||
snp_interface_dist_df3,
|
snp_interface_dist_df3,
|
||||||
|
@ -272,7 +284,14 @@ function(input, output, session) {
|
||||||
geom_ls = 4
|
geom_ls = 4
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
output$site_snp_count_nca = renderPlot(
|
# } #else {
|
||||||
|
# output$site_snp_count_interface = renderPlot(
|
||||||
|
# ggplot() + annotate(x=1,y=1,"text", label="No interface data for this target")+theme_void()
|
||||||
|
# )
|
||||||
|
# }
|
||||||
|
|
||||||
|
output$site_snp_count_nca = renderPlot( #{
|
||||||
|
#if ("nca_distance" %in% colnames(input$switch_target)) {
|
||||||
site_snp_count_bp(
|
site_snp_count_bp(
|
||||||
snp_nca_dist_df3,
|
snp_nca_dist_df3,
|
||||||
title_colour = 'black',
|
title_colour = 'black',
|
||||||
|
@ -281,8 +300,14 @@ function(input, output, session) {
|
||||||
axis_label_size = 12,
|
axis_label_size = 12,
|
||||||
geom_ls = 4
|
geom_ls = 4
|
||||||
)
|
)
|
||||||
|
# } else {
|
||||||
|
# ggplot() + annotate(x=1,y=1,"text", label="No RNA data for this target")+theme_void()
|
||||||
|
# }
|
||||||
|
# }
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### DM OM Plots ####
|
#### DM OM Plots ####
|
||||||
#dm_om_param
|
#dm_om_param
|
||||||
# order needs to be:
|
# order needs to be:
|
||||||
|
|
|
@ -292,7 +292,7 @@ dashboardPage(skin="purple",
|
||||||
column(conditionalPanel(
|
column(conditionalPanel(
|
||||||
condition="input.sidebar == 'Site SNP count'",
|
condition="input.sidebar == 'Site SNP count'",
|
||||||
box(
|
box(
|
||||||
title="NCA Distance"
|
title="RNA Distance"
|
||||||
, status = "info"
|
, status = "info"
|
||||||
, width=NULL
|
, width=NULL
|
||||||
, plotOutput("site_snp_count_nca") %>% withSpinner(color="#0dc5c1")
|
, plotOutput("site_snp_count_nca") %>% withSpinner(color="#0dc5c1")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue