From 117605b035640d18ba1ec9e05e3cd314a5d1736c Mon Sep 17 00:00:00 2001 From: csiu Date: Sun, 16 Oct 2016 22:11:45 -0700 Subject: [PATCH] - Make it so that color options are in same order as in scatter plot - Make it so that midpoint uses a percent #21 --- global.R | 3 +++ ui.R | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/global.R b/global.R index 9dfec11..5a191ed 100644 --- a/global.R +++ b/global.R @@ -53,6 +53,9 @@ plot_geneExpr <- function(gene_of_interest, gene_name, input_midplot=1, barcode = barcodes$Barcode, expr = expression[gene_of_interest,]) %>% tbl_df() + + input_midplot <- max(gene_expr$expr)*input_midplot + ## Join with tSNE tsne1 <- left_join(tsne, gene_expr, by="barcode") diff --git a/ui.R b/ui.R index 3781214..1f03c80 100644 --- a/ui.R +++ b/ui.R @@ -51,9 +51,9 @@ shinyUI( condition = "input.checkVisualization == 1", sliderInput("MinMax", label= h5("Range of expression:"), min = 0, max = 1, value = c(0,1), step= 0.02), sliderInput("Midpoint", label= h5("Midpoint:"), min = 0, max = 1, value = 0.5, step= 0.02), - colourInput("colmin", "Select minimum colour", value = "grey"), + colourInput("colmax", "Select maximum colour", value = "red"), colourInput("colmid", "Select midpoint colour", value = "white"), - colourInput("colmax", "Select maximum colour", value = "red") + colourInput("colmin", "Select minimum colour", value = "grey") ) )