Commit b16f0541 authored by Midoux Cedric's avatar Midoux Cedric

select 'none'

parent cfd6e78d
...@@ -281,8 +281,9 @@ transformSample <- function() { ...@@ -281,8 +281,9 @@ transformSample <- function() {
radioButtons( radioButtons(
inputId = "transformFun", inputId = "transformFun",
label = "Transform function : ", label = "Transform function : ",
selected = character(0), selected = "none",
choices = c("Proportional Transformation" = "prop", choices = c("None" = "none",
"Proportional Transformation" = "prop",
"Square Root Transformation" = "sqrt", "Square Root Transformation" = "sqrt",
"Centered Log-Ratio (CLR) Transformation" = "clr") "Centered Log-Ratio (CLR) Transformation" = "clr")
), ),
...@@ -299,6 +300,7 @@ transformSample <- function() { ...@@ -299,6 +300,7 @@ transformSample <- function() {
output$transformFun <- renderText({ output$transformFun <- renderText({
validate(need(input$transformFun, "")) validate(need(input$transformFun, ""))
switch (input$transformFun, switch (input$transformFun,
"none" = "",
"prop" = paste("count_to_prop <- function(x) {return( x / sum(x) )}", "prop" = paste("count_to_prop <- function(x) {return( x / sum(x) )}",
"data_prop <- transform_sample_counts(data, count_to_prop)", "data_prop <- transform_sample_counts(data, count_to_prop)",
sep = "\n"), sep = "\n"),
...@@ -323,6 +325,7 @@ observeEvent(input$transformData, { ...@@ -323,6 +325,7 @@ observeEvent(input$transformData, {
} else { } else {
try( try(
switch (input$transformFun, switch (input$transformFun,
"none" = {return(physeq())},
"prop" = { "prop" = {
count_to_prop <- function(x) {return( x / sum(x) )} count_to_prop <- function(x) {return( x / sum(x) )}
physeq(transform_sample_counts(physeq(), count_to_prop)) physeq(transform_sample_counts(physeq(), count_to_prop))
......
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