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
|
||||
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,]
|
||||
snp_nca_dist_df3 = merged_df3[merged_df3$nca_distance<input$snp_nca_dist,]
|
||||
snp_ligand_dist_df3 = merged_df3[merged_df3[['ligand_distance']]<input$snp_ligand_dist,]
|
||||
if ("interface_dist" %in% colnames(merged_df3)){
|
||||
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"]
|
||||
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 ####
|
||||
# Structure Viewer WebGL/NGLViewR window
|
||||
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_pdb_file=paste0(load_dir, "Data/", ngl_drug, '/output/depth/', ngl_gene, '_complex.pdb')
|
||||
print(ngl_pdb_file)
|
||||
|
@ -262,6 +272,8 @@ function(input, output, session) {
|
|||
geom_ls = 4
|
||||
)
|
||||
)
|
||||
|
||||
# if ("interface_dist" %in% colnames(input$switch_target)) {
|
||||
output$site_snp_count_interface = renderPlot(
|
||||
site_snp_count_bp(
|
||||
snp_interface_dist_df3,
|
||||
|
@ -272,7 +284,14 @@ function(input, output, session) {
|
|||
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(
|
||||
snp_nca_dist_df3,
|
||||
title_colour = 'black',
|
||||
|
@ -281,8 +300,14 @@ function(input, output, session) {
|
|||
axis_label_size = 12,
|
||||
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_param
|
||||
# order needs to be:
|
||||
|
|
|
@ -292,7 +292,7 @@ dashboardPage(skin="purple",
|
|||
column(conditionalPanel(
|
||||
condition="input.sidebar == 'Site SNP count'",
|
||||
box(
|
||||
title="NCA Distance"
|
||||
title="RNA Distance"
|
||||
, status = "info"
|
||||
, width=NULL
|
||||
, plotOutput("site_snp_count_nca") %>% withSpinner(color="#0dc5c1")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue