faff
This commit is contained in:
parent
dd2752050b
commit
64cda2d5be
1 changed files with 32 additions and 6 deletions
|
@ -23,6 +23,8 @@ library(feather)
|
||||||
load_dir="~/git/"
|
load_dir="~/git/"
|
||||||
#load_dir="/srv/shiny-server/git/"
|
#load_dir="/srv/shiny-server/git/"
|
||||||
|
|
||||||
|
set_null_device("cairo") # makes Unicode errors go away
|
||||||
|
|
||||||
source(paste0(load_dir, "LSHTM_analysis/scripts/Header_TT.R"))
|
source(paste0(load_dir, "LSHTM_analysis/scripts/Header_TT.R"))
|
||||||
|
|
||||||
load_target_globals=function(target){
|
load_target_globals=function(target){
|
||||||
|
@ -301,7 +303,7 @@ consurf_colours = c(
|
||||||
)
|
)
|
||||||
|
|
||||||
# if (true()){
|
# if (true()){
|
||||||
if (interactive()){
|
if (interactive()){
|
||||||
options(shiny.launch.browser = FALSE) # i am a big girl and can tie my own laces
|
options(shiny.launch.browser = FALSE) # i am a big girl and can tie my own laces
|
||||||
options(shiny.port = 8000) # don't change the port every time
|
options(shiny.port = 8000) # don't change the port every time
|
||||||
options(shiny.host = '0.0.0.0') # This means "listen to all addresses on all interfaces"
|
options(shiny.host = '0.0.0.0') # This means "listen to all addresses on all interfaces"
|
||||||
|
@ -593,7 +595,7 @@ consurf_colours = c(
|
||||||
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")
|
||||||
|
@ -768,9 +770,18 @@ consurf_colours = c(
|
||||||
|
|
||||||
|
|
||||||
# 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"]
|
||||||
|
@ -906,6 +917,8 @@ consurf_colours = c(
|
||||||
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,
|
||||||
|
@ -916,7 +929,14 @@ consurf_colours = c(
|
||||||
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',
|
||||||
|
@ -925,8 +945,14 @@ consurf_colours = c(
|
||||||
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:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue