Commit b16f0541 authored by Midoux Cedric's avatar Midoux Cedric

select 'none'

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