From a8f6e87c003b1e010eee9ddbaa735ce2a0e20dc4 Mon Sep 17 00:00:00 2001 From: Maciej Dobrzynski Date: Mon, 27 May 2019 18:16:45 +0200 Subject: [PATCH] Bug fixes --- modules/auxfunc.R | 39 +++++++++++++++++++++++---------------- server.R | 6 +++--- ui.R | 2 +- 3 files changed, 27 insertions(+), 20 deletions(-) diff --git a/modules/auxfunc.R b/modules/auxfunc.R index 8ceb1f2..3a80d81 100644 --- a/modules/auxfunc.R +++ b/modules/auxfunc.R @@ -19,14 +19,21 @@ require(Hmisc) # for CI calculation DEB = T # font sizes in pts for plots -PLOTFONTBASE = 8 -PLOTFONTAXISTEXT = 8 -PLOTFONTAXISTITLE = 8 -PLOTFONTFACETSTRIP = 10 -PLOTFONTLEGEND = 8 +# PLOTFONTBASE = 8 +# PLOTFONTAXISTEXT = 8 +# PLOTFONTAXISTITLE = 8 +# PLOTFONTFACETSTRIP = 10 +# PLOTFONTLEGEND = 8 + +PLOTFONTBASE = 12 +PLOTFONTAXISTEXT = 12 +PLOTFONTAXISTITLE = 12 +PLOTFONTFACETSTRIP = 16 +PLOTFONTLEGEND = 12 + # default number of facets in plots -PLOTNFACETDEFAULT = 3 +PLOTNFACETDEFAULT = 2 # internal column names COLRT = 'realtime' @@ -229,20 +236,20 @@ LOCgenTraj <- function(in.ntpts = 60, in.ntracks = 10, in.nfov = 6, in.nwells = # add outliers for testing if (!is.null(in.addout)) { locTabLen = length(x.rand.1) - x.rand.1[round(runif(in.addout) * locTabLen)] = 10 - x.rand.2[round(runif(in.addout) * locTabLen)] = 10 + x.rand.1[round(runif(in.addout) * locTabLen)] = 5 + x.rand.2[round(runif(in.addout) * locTabLen)] = 5 } x.arg = rep(seq(1, in.ntpts), in.ntracks * in.nfov) - dt.nuc = data.table(Metadata_Well = rep(LETTERS[1:in.nwells], each = in.ntpts * in.nfov * in.ntracks / in.nwells), - Metadata_Site = rep(1:in.nfov, each = in.ntpts * in.ntracks), - Metadata_RealTime = x.arg, - objCyto_Intensity_MeanIntensity_imErkCor = x.rand.1, - objNuc_Intensity_MeanIntensity_imErkCor = x.rand.2, - objNuc_Location_X = runif(in.ntpts * in.ntracks * in.nfov, min = 0, max = 1), - objNuc_Location_Y = runif(in.ntpts * in.ntracks * in.nfov, min = 0, max = 1), - TrackLabel = rep(1:(in.ntracks*in.nfov), each = in.ntpts)) + dt.nuc = data.table(well = rep(LETTERS[1:in.nwells], each = in.ntpts * in.nfov * in.ntracks / in.nwells), + group = rep(1:in.nfov, each = in.ntpts * in.ntracks), + time = x.arg, + y1 = x.rand.1, + y2 = x.rand.2, + posx = runif(in.ntpts * in.ntracks * in.nfov, min = 0, max = 1), + posy = runif(in.ntpts * in.ntracks * in.nfov, min = 0, max = 1), + id = rep(1:(in.ntracks*in.nfov), each = in.ntpts)) return(dt.nuc) } diff --git a/server.R b/server.R index ae78d82..c31e0f6 100644 --- a/server.R +++ b/server.R @@ -241,7 +241,7 @@ shinyServer(function(input, output, session) { if (input$chBtrackUni) { locCols = getDataNucCols() - locColSel = locCols[grep('(S|s)ite|(S|s)eries|(F|f)ov', locCols)[1]] # index 1 at the end in case more matches; select 1st + locColSel = locCols[grep('(S|s)ite|(S|s)eries|(F|f)ov|(G|g)roup', locCols)[1]] # index 1 at the end in case more matches; select 1st selectInput( 'inSelSite', @@ -261,7 +261,7 @@ shinyServer(function(input, output, session) { locCols = getDataNucCols() if (!is.null(locCols)) { - locColSel = locCols[grep('(R|r)atio|(I|i)ntensity|y|Meas', locCols)[1]] # index 1 at the end in case more matches; select 1st + locColSel = locCols[grep('(R|r)atio|(I|i)ntensity|(Y|y)|(M|m)eas', locCols)[1]] # index 1 at the end in case more matches; select 1st selectInput( 'inSelMeas1', @@ -282,7 +282,7 @@ shinyServer(function(input, output, session) { if (!is.null(locCols) && !(input$inSelMath %in% c('', '1 / '))) { - locColSel = locCols[grep('(R|r)atio|(I|i)ntensity|y|Meas', locCols)[1]] # index 1 at the end in case more matches; select 1st + locColSel = locCols[grep('(R|r)atio|(I|i)ntensity|(Y|y)|(M|m)eas', locCols)[1]] # index 1 at the end in case more matches; select 1st selectInput( 'inSelMeas2', diff --git a/ui.R b/ui.R index 1cabee9..7f801d4 100644 --- a/ui.R +++ b/ui.R @@ -64,7 +64,7 @@ shinyUI(fluidPage( uiOutput('varSelTime'), uiOutput('varSelMeas1'), radioButtons( - 'inSelMath', width = '25%', + 'inSelMath', width = '50%', 'Math on 1st and 2nd meas.:', c( 'None' = '', -- GitLab