Due to a scheduled upgrade to version 14.10, GitLab will be unavailabe on Monday 30.05., from 19:00 until 20:00.

Commit 7cabe42f authored by dmattek's avatar dmattek
Browse files

Changes in help text

parent 595c7f27
...@@ -177,8 +177,18 @@ helpPopup <- function(title, content, ...@@ -177,8 +177,18 @@ helpPopup <- function(title, content,
} }
helpText.server = c( helpText.server = c(
'Load main data as a CSV or compressed CSV file (gz or bz2).', #1 alDataFormat = paste0("<p>Switch between long and wide formats of input data. ",
'Long format: a row is a single data point. Wide format: a row is a time series with columns as time points.', #2 "TCI accepts CSV or compressed CSV files (gz or bz2).</p>",
"<p><b>Long format</b> - a row is a single data point and consecutive time series are arranged vertically. ",
"Data file should contain at least 3 columns separated with a comma:</p>",
"<li>Identifier of a time series</li>",
"<li>Time points</li>",
"<li>A time-varying variable</li>",
"<br>",
"<p><b>Wide format</b> - a row is a time series with columns as time points.",
"At least 3 columns shuold be present:</p>",
"<li>First two columns in wide format should contain grouping and track IDs</li>",
"<li>A column with a time point. Headers of columns with time points need to be numeric</li>"), #2
'Generate 60 random synthetic time series distributed evenly among 6 groups. Every time series has 60 time points.', #3 'Generate 60 random synthetic time series distributed evenly among 6 groups. Every time series has 60 time points.', #3
'Load CSV file with a column of track IDs for removal. IDs should correspond to those used for plotting.', #4 'Load CSV file with a column of track IDs for removal. IDs should correspond to those used for plotting.', #4
'Load CSV file with 5 columns: grouping, start and end tpts of stimulation, start and end of y-position, dummy column with ID.', #5 'Load CSV file with 5 columns: grouping, start and end tpts of stimulation, start and end of y-position, dummy column with ID.', #5
...@@ -193,7 +203,9 @@ helpText.server = c( ...@@ -193,7 +203,9 @@ helpText.server = c(
'Calculate fold-change and z-score using the median and Median Absolute Deviation, instead of the mean and sd.', #14 'Calculate fold-change and z-score using the median and Median Absolute Deviation, instead of the mean and sd.', #14
'Normalise to mean/median of selected time calculated globally, per group, or for individual time series.', #15 'Normalise to mean/median of selected time calculated globally, per group, or for individual time series.', #15
'Download time series after modification in this section.', #16 'Download time series after modification in this section.', #16
alertNAsPresent = "NAs present in the measurement column. Consider interpolation." alertNAsPresent = "NAs present in the measurement column. Consider interpolation.",
alertWideMissesNumericTime = "Non-numeric headers of time columns. Data in wide format should have numeric column headers corresponding to time points.",
alertWideTooFewColumns = "Insufficient columns. Data in wide format should contain at least 3 columns: grouping, track ID, and a single time point."
) )
# Functions for data processing ---- # Functions for data processing ----
......
...@@ -22,6 +22,11 @@ clustHierUI <- function(id, label = "Hierarchical CLustering") { ...@@ -22,6 +22,11 @@ clustHierUI <- function(id, label = "Hierarchical CLustering") {
tagList( tagList(
h4('Hierarchical clustering'), h4('Hierarchical clustering'),
p("Standard approach using R's ",
a("dist", href = "https://stat.ethz.ch/R-manual/R-devel/library/stats/html/dist.html"),
" and ",
a("hclust", href = "https://stat.ethz.ch/R-manual/R-devel/library/stats/html/hclust.html"),
" functions."),
br(), br(),
fluidRow( fluidRow(
column(4, column(4,
......
...@@ -5,6 +5,17 @@ ...@@ -5,6 +5,17 @@
# This module is for sparse hierarchical clustering using sparcl package # This module is for sparse hierarchical clustering using sparcl package
# #
helpText.clHierSpar = c(alImportance = paste0("<p>Weight factors (WF) calculated during clustering ",
"reflect the importance of time points in the clustering. ",
"The following labels are used to indicate the importance:",
"<li>Black - time point not taken into account</li>",
"<li><p, style=\"color:DodgerBlue;\">* - low, WF∈(0, 0.1]</p></li>",
"<li><p, style=\"color:MediumSeaGreen;\">** - medium, WF∈(0.1, 0.5]</p></li>",
"<li><p, style=\"color:Tomato;\">*** - high, WF∈(0.5, 1.0]</p></li>",
"</p><p>Witten and Tibshirani (2010): ",
"<i>A framework for feature selection in clustering</i>; ",
"Journal of the American Statistical Association 105(490): 713-726.</p>"))
# UI ---- # UI ----
clustHierSparUI <- function(id, label = "Sparse Hierarchical CLustering") { clustHierSparUI <- function(id, label = "Sparse Hierarchical CLustering") {
ns <- NS(id) ns <- NS(id)
...@@ -14,6 +25,8 @@ clustHierSparUI <- function(id, label = "Sparse Hierarchical CLustering") { ...@@ -14,6 +25,8 @@ clustHierSparUI <- function(id, label = "Sparse Hierarchical CLustering") {
"Sparse hierarchical clustering using ", "Sparse hierarchical clustering using ",
a("sparcl", href = "https://cran.r-project.org/web/packages/sparcl/") a("sparcl", href = "https://cran.r-project.org/web/packages/sparcl/")
), ),
p("Columns in the heatmap labeled according to their ",
actionLink(ns("alImportance"), "importance.")),
br(), br(),
fluidRow( fluidRow(
column( column(
...@@ -158,9 +171,6 @@ clustHierSparUI <- function(id, label = "Sparse Hierarchical CLustering") { ...@@ -158,9 +171,6 @@ clustHierSparUI <- function(id, label = "Sparse Hierarchical CLustering") {
br(), br(),
downPlotUI(ns('downPlotHierSparHM'), "Download PNG"), downPlotUI(ns('downPlotHierSparHM'), "Download PNG"),
actionButton(ns('butPlotHierSparHeatMap'), 'Plot!'), actionButton(ns('butPlotHierSparHeatMap'), 'Plot!'),
br(),
"Columns in the heatmap labeled according to their ",
actionLink(ns("alImportance"), "importance"),
withSpinner(plotOutput(ns('outPlotHierSpar'))) withSpinner(plotOutput(ns('outPlotHierSpar')))
), ),
...@@ -627,16 +637,7 @@ clustHierSpar <- function(input, output, session, ...@@ -627,16 +637,7 @@ clustHierSpar <- function(input, output, session,
addPopover(session, addPopover(session,
ns("alImportance"), ns("alImportance"),
title = "Variable importance", title = "Variable importance",
content = paste0("<p>Weight factors (WF) calculated during clustering ", content = helpText.clHierSpar[["alImportance"]],
"reflect the importance of time points in the clustering. ",
"The following labels are used to indicate the importance:",
"<li>Black - time point not taken into account</li>",
"<li><p, style=\"color:DodgerBlue;\">* - low, WF∈(0, 0.1]</p></li>",
"<li><p, style=\"color:MediumSeaGreen;\">** - medium, WF∈(0.1, 0.5]</p></li>",
"<li><p, style=\"color:Tomato;\">*** - high, WF∈(0.5, 1.0]</p></li>",
"</p><p>Witten and Tibshirani (2010): ",
"<i>A framework for feature selection in clustering</i>; ",
"Journal of the American Statistical Association 105(490): 713-726.</p>"),
trigger = "click") trigger = "click")
} }
......
...@@ -26,10 +26,9 @@ shinyUI(fluidPage( ...@@ -26,10 +26,9 @@ shinyUI(fluidPage(
'Select data file and click "Load Data"', 'Select data file and click "Load Data"',
accept = c('text/csv', 'text/comma-separated-values,text/plain') accept = c('text/csv', 'text/comma-separated-values,text/plain')
), ),
bsTooltip('inFileLoadNuc', helpText.server[1], placement = "top", trigger = "hover", options = NULL),
radioButtons("inRbutLongWide", "Data format:", c("Long" = 0, "Wide" = 1), inline = T), radioButtons("inRbutLongWide", actionLink("alDataFormat", "Data Format:"), c("Long" = 0, "Wide" = 1), inline = T),
bsTooltip('inRbutLongWide', helpText.server[2], placement = "top", trigger = "hover", options = NULL), bsAlert("alertAnchorSidePanelDataFormat"),
actionButton("inButLoadNuc", "Load Data"), actionButton("inButLoadNuc", "Load Data"),
actionButton("butReset", "Reset file input"), actionButton("butReset", "Reset file input"),
......
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