Commit eebd8a44 authored by dmattek's avatar dmattek

Remove dependency on TCA package

parent 89559932
This diff is collapsed.
......@@ -58,7 +58,7 @@ modBoxPlotUI = function(id, label = "Plot Box-plots") {
),
radioButtons(ns("rBAxisLabelsRotate"), "X-axis labels:",
c("horizontal" = 0,
"45deg" = 45,
"45 deg" = 45,
"90 deg" = 90))
)
),
......@@ -239,10 +239,9 @@ modBoxPlot = function(input, output, session,
scale_fill_discrete(name = '') +
xlab('') +
ylab('') +
ggplotTheme() +
#myGgplotTheme +
LOCggplotTheme() +
theme(legend.position = input$selPlotBoxLegendPos,
axis.text.x = element_text(size = 12, angle = as.numeric(input$rBAxisLabelsRotate), hjust = ifelse(input$rBAxisLabelsRotate == 0, 0, 1)))
axis.text.x = LOCrotatedAxisElementText(as.numeric(input$rBAxisLabelsRotate)))
return(p.out)
......
......@@ -4,7 +4,7 @@ modClDistPlotUI = function(id, label = "Plot Fractions WIthin Clusters") {
tagList(
radioButtons(ns("rBAxisLabelsRotate"), "X-axis labels:",
c("horizontal" = 0,
"45deg" = 45,
"45 deg" = 45,
"90 deg" = 90)),
actionButton(ns('butPlotClDist'), 'Plot!'),
plotOutput(ns('outPlotClDist'), height = '800px', width = 'auto'),
......@@ -57,12 +57,11 @@ modClDistPlot = function(input, output, session, in.data, in.cols = NULL, in.fna
scale_y_continuous(labels = percent) +
ylab("percentage of cells\n") +
xlab("") +
ggplotTheme() +
LOCggplotTheme() +
theme(
axis.text.x = rotatedAxisElementText(as.numeric(input$rBAxisLabelsRotate))
axis.text.x = LOCrotatedAxisElementText(as.numeric(input$rBAxisLabelsRotate))
)
#myGgplotTheme
return(p.out)
}
......
......@@ -430,7 +430,7 @@ clustHier <- function(input, output, session, in.data4clust, in.data4trajPlot, i
loc.col.bounds = NULL
loc.p = myPlotHeatmap(loc.dm,
loc.p = LOCplotHeatmap(loc.dm,
loc.dend,
palette.arg = input$selectPlotHierPalette,
palette.rev.arg = input$inPlotHierRevPalette,
......
......@@ -488,7 +488,7 @@ clustHierSpar <- function(input, output, session, in.data4clust, in.data4trajPlo
loc.col.bounds = NULL
loc.p = myPlotHeatmap(loc.dm,
loc.p = LOCplotHeatmap(loc.dm,
loc.dend,
palette.arg = input$selectPlotHierSparPalette,
palette.rev.arg = input$inPlotHierSparRevPalette,
......
......@@ -196,7 +196,7 @@ plotScatter <- function() {
# loc.fit.rsq = ifelse(input$inRobustFit, loc.fit$r.squared, )
p.out = myGgplotScat(
p.out = LOCggplotScat(
dt.arg = loc.dt,
band.arg = NULL, #list(a = loc.fit$coeff.a, b = loc.fit$coeff.b, width = input$inBandWidth),
group.col.arg = NULL,
......
require(DT)
require(tca)
modTrajRibbonPlotUI = function(id, label = "Plot Individual Time Series") {
ns <- NS(id)
......@@ -194,7 +193,7 @@ modTrajRibbonPlot = function(input, output, session,
loc.facet.col = loc.facet.col[loc.groups]
}
loc.dt.aggr = tca::calcTrajCI(in.dt = loc.dt,
loc.dt.aggr = LOCcalcTrajCI(in.dt = loc.dt,
in.col.meas = 'y',
in.col.by = c(in.facet, 'realtime'),
in.type = 'normal')
......@@ -211,8 +210,7 @@ modTrajRibbonPlot = function(input, output, session,
y.stim.arg = c('ystart', 'yend'),
xlab.arg = 'Time (min)',
ylab.arg = '') +
ggplotTheme() +
#myGgplotTheme +
LOCggplotTheme() +
theme(legend.position = input$rBlegendPos)
return(p.out)
......
......@@ -15,12 +15,10 @@ library(d3heatmap) # for interactive heatmap
library(dendextend) # for color_branches
library(colorspace) # for palettes (used to colour dendrogram)
library(RColorBrewer)
# sparcl temporarily unavailable on CRAN
library(sparcl) # sparse hierarchical and k-means
library(scales) # for percentages on y scale
library(dtw) # for dynamic time warping
library(imputeTS) # for interpolating NAs
library(tca) # for time series manipulatiom, e.g. normTraj, genTraj, plotTrajRibbon
# change to increase the limit of the upload file size
options(shiny.maxRequestSize = 200 * 1024 ^ 2)
......@@ -46,7 +44,7 @@ shinyServer(function(input, output, session) {
dataGen1 <- eventReactive(input$inDataGen1, {
cat("dataGen1\n")
return(tca::genTraj(in.nwells = 3))
return(LOCgenTraj(in.nwells = 3))
})
# Load main data file
......@@ -670,9 +668,9 @@ shinyServer(function(input, output, session) {
}
## Normalization
# F-n tca::normTraj adds additional column with .norm suffix
# F-n normTraj adds additional column with .norm suffix
if (input$chBnorm) {
loc.out = tca::normTraj(
loc.out = LOCnormTraj(
in.dt = loc.out,
in.meas.col = 'y',
in.rt.col = 'realtime',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment