Commit ab6113a2 authored by mahendra-mariadassou's avatar mahendra-mariadassou
Browse files

started refactoring code, eliminate unnecessary if-else statements in data16S

No related merge requests found
Showing with 1086 additions and 1083 deletions
+1086 -1083
library(shinydashboard) library(shinydashboard)
shinyServer shinyServer
(function(input, output, session) (function(input, output, session)
{ {
checkNull <- function(x) { checkNull <- function(x) {
if (!exists(as.character(substitute(x)))) { if (!exists(as.character(substitute(x)))) {
return(NULL) return(NULL)
} else if (is.null(x)) { } else if (is.null(x)) {
return(NULL) return(NULL)
} else if (length(x) > 1) { } else if (length(x) > 1) {
return(x) return(x)
} }
else if (x %in% c(0, "", NA, "NULL")) { else if (x %in% c(0, "", NA, "NULL")) {
return(NULL) return(NULL)
} else { } else {
return(x) return(x)
} }
} }
beautifulTable <- function(data) { beautifulTable <- function(data) {
DT::datatable( DT::datatable(
data = data, data = data,
rownames = FALSE, rownames = FALSE,
filter = "top", filter = "top",
extensions = c("Buttons", "ColReorder", "FixedColumns"), extensions = c("Buttons", "ColReorder", "FixedColumns"),
options = list( options = list(
dom = "lBtip", dom = "lBtip",
pageLength = 10, pageLength = 10,
lengthMenu = list(c(10, 25, 50, 100, -1), list('10', '25', '50', '100', 'All')), lengthMenu = list(c(10, 25, 50, 100, -1), list('10', '25', '50', '100', 'All')),
buttons = list( buttons = list(
'colvis', 'colvis',
list( list(
extend = 'collection', extend = 'collection',
buttons = c('copy', 'csv', 'excel', 'pdf'), buttons = c('copy', 'csv', 'excel', 'pdf'),
text = 'Download' text = 'Download'
) )
), ),
colReorder = TRUE, colReorder = TRUE,
scrollX = TRUE, scrollX = TRUE,
fixedColumns = list(leftColumns = 1, rightColumns = 0) fixedColumns = list(leftColumns = 1, rightColumns = 0)
), ),
width = "auto", width = "auto",
height = "auto" height = "auto"
) )
} }
source({ source({
"https://raw.githubusercontent.com/mahendra-mariadassou/phyloseq-extended/master/R/load-extra-functions.R" "https://raw.githubusercontent.com/mahendra-mariadassou/phyloseq-extended/master/R/load-extra-functions.R"
}) })
data16S <- reactive({ data16S <- reactive({
if (input$dataset == "input") if (input$dataset == "input")
{ {
if (is.null(input$fileBiom)) if (is.null(input$fileBiom))
{ {
return() return()
} }
if (input$biomFormat == "std") if (input$biomFormat == "std")
{ {
d <- import_biom( d <- import_biom(
BIOMfilename = input$fileBiom$datapath, BIOMfilename = input$fileBiom$datapath,
treefilename = input$fileTree$datapath# , treefilename = input$fileTree$datapath# ,
# refseqfilename = input$fileSeq$datapath # refseqfilename = input$fileSeq$datapath
) )
} else if (input$biomFormat == "frogs") { } else if (input$biomFormat == "frogs") {
d <- import_frogs( d <- import_frogs(
biom = input$fileBiom$datapath, biom = input$fileBiom$datapath,
treefilename = input$fileTree$datapath# , treefilename = input$fileTree$datapath# ,
# refseqfilename = input$fileSeq$datapath # refseqfilename = input$fileSeq$datapath
) )
} }
colnames(tax_table(d)) <- colnames(tax_table(d)) <-
c("Kingdom", c("Kingdom",
"Phylum", "Phylum",
"Class", "Class",
"Order", "Order",
"Family", "Family",
"Genus", "Genus",
"Species", "Species",
"Strain")[1:length(rank_names(d))] "Strain")[1:length(rank_names(d))]
tax_table(d)[grep("unknown ", tax_table(d))] <- NA tax_table(d)[grep("unknown ", tax_table(d))] <- NA
#tax_table(d)[grep("Unclassified", tax_table(d))] <- NA #tax_table(d)[grep("Unclassified", tax_table(d))] <- NA
if (!is.null(input$fileMeta)) { if (!is.null(input$fileMeta)) {
if (input$CSVsep == "excel") { if (input$CSVsep == "excel") {
sample_data(d) <- sample_data(d) <-
RcmdrMisc::readXL(input$fileMeta$datapath, RcmdrMisc::readXL(input$fileMeta$datapath,
rownames = TRUE, rownames = TRUE,
header = TRUE) header = TRUE)
} else { } else {
sample_data(d) <- read.csv( sample_data(d) <- read.csv(
input$fileMeta$datapath, input$fileMeta$datapath,
header = TRUE, header = TRUE,
sep = input$CSVsep, sep = input$CSVsep,
row.names = 1, row.names = 1,
na.strings = NA na.strings = NA
) )
sample_data(d)$SampleID <- rownames(sample_data(d)) sample_data(d)$SampleID <- rownames(sample_data(d))
} }
} else { } else {
n <- data.frame(sample_names(d) , row.names = sample_names(d)) n <- data.frame(sample_names(d) , row.names = sample_names(d))
names(n) <- "SampleID" names(n) <- "SampleID"
sample_data(d) <- n sample_data(d) <- n
} }
if (input$rareData) { if (input$rareData) {
d <- rarefy_even_depth( d <- rarefy_even_depth(
d, d,
replace = FALSE, replace = FALSE,
rngseed = as.integer(Sys.time()), rngseed = as.integer(Sys.time()),
verbose = FALSE verbose = FALSE
) )
} }
return(d) return(d)
} else if (input$dataset == "rdata") }
{
if (is.null(input$fileRData)) if (input$dataset == "rdata")
{ {
return() if (is.null(input$fileRData))
} {
load(input$fileRData$datapath) return()
if (exists("data")) }
{ load(input$fileRData$datapath)
return(data) if (exists("data"))
} else { {
return() return(data)
} } else {
} else { return()
load("demo/demo.RData") }
return(get(input$dataset)) }
}
}) load("demo/demo.RData")
return(get(input$dataset))
data <- reactiveValues()
{ })
observe({
if (!is.null(data16S())) data <- reactiveValues()
isolate(data <<- data16S()) {
}) observe({
} if (!is.null(data16S()))
isolate(data <<- data16S())
output$downloadData <- { })
downloadHandler( }
filename = function() {
paste("Easy16S-data", Sys.Date(), "RData", sep = ".") output$downloadData <- {
}, downloadHandler(
content = function(file) { filename = function() {
save(data, file = file) paste("Easy16S-data", Sys.Date(), "RData", sep = ".")
} },
) content = function(file) {
} save(data, file = file)
}
output$downloadUI <- renderUI({ )
validate(need(data16S(), "")) }
tags$div(
style = "text-align:center", output$downloadUI <- renderUI({
title = "Download as RData", validate(need(data16S(), ""))
downloadButton("downloadData", "Download", style = "color: black; background-color: gray90") tags$div(
) style = "text-align:center",
}) title = "Download as RData",
downloadButton("downloadData", "Download", style = "color: black; background-color: gray90")
output$rarefactionMin <- renderText({ )
validate(need(input$fileBiom, ""), })
need(input$dataset == "input", ""))
paste("(min sample =", format(min(sample_sums(data16S( output$rarefactionMin <- renderText({
validate(need(input$fileBiom, ""),
))), big.mark = " "), "reads)") need(input$dataset == "input", ""))
}) paste("(min sample =", format(min(sample_sums(data16S(
output$phyloseqPrint <- renderPrint({ ))), big.mark = " "), "reads)")
validate( })
need(
data16S(), output$phyloseqPrint <- renderPrint({
"Firstly, you should select a demo dataset or upload an abundance BIOM file.\nFor example, with Galaxy, a BIOM file can be obtained at the end of FROGS workflow with the 'FROGS BIOM to std BIOM' tool" validate(
) need(
) data16S(),
data16S() "Firstly, you should select a demo dataset or upload an abundance BIOM file.\nFor example, with Galaxy, a BIOM file can be obtained at the end of FROGS workflow with the 'FROGS BIOM to std BIOM' tool"
}) )
)
output$summaryTable <- renderUI({ data16S()
validate(need(data16S(), "")) })
box(
title = "Tables", output$summaryTable <- renderUI({
width = NULL, validate(need(data16S(), ""))
status = "primary", box(
tabsetPanel( title = "Tables",
tabPanel("otu_table", width = NULL,
beautifulTable( status = "primary",
data.frame(OTU = taxa_names(data16S()), otu_table(data16S())) tabsetPanel(
)), tabPanel("otu_table",
tabPanel("tax_table", beautifulTable(
beautifulTable( data.frame(OTU = taxa_names(data16S()), otu_table(data16S()))
data.frame(OTU = taxa_names(data16S()), tax_table(data16S())) )),
)), tabPanel("tax_table",
tabPanel("sample_data", beautifulTable(
#as.data.frame(sapply(sample_data(data16S()), class)), data.frame(OTU = taxa_names(data16S()), tax_table(data16S()))
beautifulTable( )),
data.frame(SAMPLE = sample_names(data16S()), sample_data(data16S())) tabPanel("sample_data",
)) #as.data.frame(sapply(sample_data(data16S()), class)),
) beautifulTable(
) data.frame(SAMPLE = sample_names(data16S()), sample_data(data16S()))
}) ))
)
output$histUI <- renderUI({ )
validate(need(data16S(), "")) })
box(
title = "Setting : ", output$histUI <- renderUI({
width = NULL, validate(need(data16S(), ""))
status = "primary", box(
radioButtons( title = "Setting : ",
"barFill", width = NULL,
label = "Taxonomic rank : ", status = "primary",
choices = rank_names(data16S()), radioButtons(
inline = TRUE "barFill",
), label = "Taxonomic rank : ",
textInput("barTitle", choices = rank_names(data16S()),
label = "Title : ", inline = TRUE
value = "OTU abundance barplot"), ),
selectInput( textInput("barTitle",
"barGrid", label = "Title : ",
label = "Subplot : ", value = "OTU abundance barplot"),
choices = c("..." = 0, sample_variables(data16S())) selectInput(
) "barGrid",
, label = "Subplot : ",
selectInput( choices = c("..." = 0, sample_variables(data16S()))
"barX", )
label = "X : ", ,
choices = c("..." = 0, sample_variables(data16S())) selectInput(
) "barX",
) label = "X : ",
}) choices = c("..." = 0, sample_variables(data16S()))
)
output$histo <- renderPlot({ )
validate(need(data16S(), })
"Requires an abundance dataset"))
p <- plot_bar( output$histo <- renderPlot({
physeq = data16S(), validate(need(data16S(),
fill = input$barFill, "Requires an abundance dataset"))
x = ifelse(is.null(checkNull(input$barX)), "Sample", input$barX), p <- plot_bar(
title = checkNull(input$barTitle) physeq = data16S(),
) fill = input$barFill,
if (!is.null(checkNull(input$barGrid))) { x = ifelse(is.null(checkNull(input$barX)), "Sample", input$barX),
p <- title = checkNull(input$barTitle)
p + facet_grid(paste(".", "~", input$barGrid), scales = "free_x") )
} if (!is.null(checkNull(input$barGrid))) {
return(p) p <-
}) p + facet_grid(paste(".", "~", input$barGrid), scales = "free_x")
}
output$histFocusUIfocusRank <- renderUI({ return(p)
validate(need(data16S(), "")) })
radioButtons(
"focusRank", output$histFocusUIfocusRank <- renderUI({
label = "Taxonomic rank : ", validate(need(data16S(), ""))
choices = rank_names(data16S())[-length(rank_names(data16S()))], radioButtons(
inline = TRUE "focusRank",
) label = "Taxonomic rank : ",
}) choices = rank_names(data16S())[-length(rank_names(data16S()))],
inline = TRUE
output$histFocusUIfocusTaxa <- renderUI({ )
validate(need(data16S(), "")) })
selectInput(
"focusTaxa", output$histFocusUIfocusTaxa <- renderUI({
label = "Selected taxa : ", validate(need(data16S(), ""))
choices = unique(as.vector(tax_table(data16S( selectInput(
"focusTaxa",
))[, input$focusRank])), label = "Selected taxa : ",
selected = TRUE choices = unique(as.vector(tax_table(data16S(
)
}) ))[, input$focusRank])),
selected = TRUE
output$histFocusUIfocusNbTaxa <- renderUI({ )
validate(need(data16S(), "")) })
sliderInput(
"focusNbTaxa", output$histFocusUIfocusNbTaxa <- renderUI({
label = "Number of sub-taxa : ", validate(need(data16S(), ""))
min = 0, sliderInput(
#max = sum(tax_table(tax_glom(data16S(), rank_names(data16S())[1+as.integer(input$focusRank)]))[, as.integer(input$focusRank)]==input$focusTaxa) "focusNbTaxa",
max = 30, label = "Number of sub-taxa : ",
value = 10 min = 0,
) #max = sum(tax_table(tax_glom(data16S(), rank_names(data16S())[1+as.integer(input$focusRank)]))[, as.integer(input$focusRank)]==input$focusTaxa)
}) max = 30,
value = 10
output$histFocusUIfocusGrid <- renderUI({ )
validate(need(data16S(), "")) })
selectInput("focusGrid",
label = "Subplot : ", output$histFocusUIfocusGrid <- renderUI({
choices = c("..." = 0, sample_variables(data16S()))) validate(need(data16S(), ""))
}) selectInput("focusGrid",
label = "Subplot : ",
output$histFocusUIfocusX <- renderUI({ choices = c("..." = 0, sample_variables(data16S())))
validate(need(data16S(), "")) })
selectInput("focusX",
label = "X : ", output$histFocusUIfocusX <- renderUI({
choices = c("..." = 0, sample_variables(data16S()))) validate(need(data16S(), ""))
}) selectInput("focusX",
label = "X : ",
output$histoFocus <- renderPlot({ choices = c("..." = 0, sample_variables(data16S())))
validate(need(data16S(), })
"Requires an abundance dataset"))
p <- plot_composition( output$histoFocus <- renderPlot({
physeq = data16S(), validate(need(data16S(),
taxaRank1 = input$focusRank, "Requires an abundance dataset"))
taxaSet1 = input$focusTaxa, p <- plot_composition(
taxaRank2 = rank_names(data16S())[which(rank_names(data16S()) == input$focusRank) + 1], physeq = data16S(),
numberOfTaxa = input$focusNbTaxa, taxaRank1 = input$focusRank,
fill = rank_names(data16S())[which(rank_names(data16S()) == input$focusRank) + 1], taxaSet1 = input$focusTaxa,
x = ifelse(is.null(checkNull(input$focusX)), "Sample", input$focusX) taxaRank2 = rank_names(data16S())[which(rank_names(data16S()) == input$focusRank) + 1],
) numberOfTaxa = input$focusNbTaxa,
if (!is.null(checkNull(input$focusGrid))) { fill = rank_names(data16S())[which(rank_names(data16S()) == input$focusRank) + 1],
p <- x = ifelse(is.null(checkNull(input$focusX)), "Sample", input$focusX)
p + facet_grid(paste(".", "~", input$focusGrid), scales = "free_x") )
} if (!is.null(checkNull(input$focusGrid))) {
return(p) p <-
}) p + facet_grid(paste(".", "~", input$focusGrid), scales = "free_x")
}
output$clustUI <- renderUI({ return(p)
validate(need(data16S(), "")) })
box(
title = "Setting : " , output$clustUI <- renderUI({
width = NULL, validate(need(data16S(), ""))
status = "primary", box(
selectInput( title = "Setting : " ,
"clustDist", width = NULL,
label = "Distance : ", status = "primary",
choices = list( selectInput(
"bray", "clustDist",
"jaccard", label = "Distance : ",
"unifrac", choices = list(
"wunifrac", "bray",
"dpcoa", "jaccard",
"jsd", "unifrac",
"euclidean" "wunifrac",
) "dpcoa",
), "jsd",
selectInput( "euclidean"
"clustMethod", )
label = "Method : ", ),
choices = list( selectInput(
"ward.D2", "clustMethod",
"ward.D", label = "Method : ",
"single", choices = list(
"complete", "ward.D2",
"average", "ward.D",
"mcquitty", "single",
"median", "complete",
"centroid" "average",
) "mcquitty",
), "median",
selectInput( "centroid"
"clustCol", )
label = "Color : ", ),
choices = c("..." = 0, sample_variables(data16S())) selectInput(
) "clustCol",
) label = "Color : ",
}) choices = c("..." = 0, sample_variables(data16S()))
)
output$clust <- renderPlot({ )
validate(need(data16S(), })
"Requires an abundance dataset"))
plot_clust( output$clust <- renderPlot({
physeq = data16S(), validate(need(data16S(),
dist = input$clustDist, "Requires an abundance dataset"))
method = input$clustMethod, plot_clust(
color = checkNull(input$clustCol) physeq = data16S(),
) dist = input$clustDist,
}) method = input$clustMethod,
color = checkNull(input$clustCol)
output$richnessAUI <- renderUI({ )
validate(need(data16S(), "")) })
box(
title = "Setting : " , output$richnessAUI <- renderUI({
width = NULL, validate(need(data16S(), ""))
status = "primary", box(
checkboxGroupInput( title = "Setting : " ,
"richnessMeasures", width = NULL,
label = "Measures : ", status = "primary",
choices = c( checkboxGroupInput(
"Observed", "richnessMeasures",
"Chao1", label = "Measures : ",
"ACE", choices = c(
"Shannon", "Observed",
"Simpson", "Chao1",
"InvSimpson", "ACE",
"Fisher" "Shannon",
), "Simpson",
selected = c( "InvSimpson",
"Observed", "Fisher"
"Chao1", ),
"ACE", selected = c(
"Shannon", "Observed",
"Simpson", "Chao1",
"InvSimpson", "ACE",
"Fisher" "Shannon",
), "Simpson",
inline = TRUE "InvSimpson",
), "Fisher"
radioButtons( ),
"richnessBoxplot", inline = TRUE
label = "Representation : ", ),
choices = list( radioButtons(
"Dots only" = 1, "richnessBoxplot",
"Dots and boxplot" = 2, label = "Representation : ",
"Boxplot only" = 3 choices = list(
), "Dots only" = 1,
selected = 2, "Dots and boxplot" = 2,
inline = TRUE "Boxplot only" = 3
), ),
textInput("richnessTitle", selected = 2,
label = "Title : ", inline = TRUE
value = "Alpha diversity graphics"), ),
selectInput( textInput("richnessTitle",
"richnessX", label = "Title : ",
label = "X : ", value = "Alpha diversity graphics"),
choices = c("..." = 0, sample_variables(data16S())) selectInput(
), "richnessX",
selectInput( label = "X : ",
"richnessColor", choices = c("..." = 0, sample_variables(data16S()))
label = "Color : ", ),
choices = c("..." = 0, sample_variables(data16S())) selectInput(
), "richnessColor",
selectInput( label = "Color : ",
"richnessShape", choices = c("..." = 0, sample_variables(data16S()))
label = "Shape : ", ),
choices = c("..." = 0, sample_variables(data16S())) selectInput(
) "richnessShape",
) label = "Shape : ",
}) choices = c("..." = 0, sample_variables(data16S()))
)
output$richnessA <- renderPlot({ )
validate(need(data16S(), })
"Requires an abundance dataset"))
p <- plot_richness( output$richnessA <- renderPlot({
physeq = data16S(), validate(need(data16S(),
x = ifelse(is.null(checkNull( "Requires an abundance dataset"))
input$richnessX p <- plot_richness(
)), "samples", input$richnessX), physeq = data16S(),
color = checkNull(input$richnessColor), x = ifelse(is.null(checkNull(
shape = checkNull(input$richnessShape), input$richnessX
title = checkNull(input$richnessTitle), )), "samples", input$richnessX),
measures = checkNull(input$richnessMeasures) color = checkNull(input$richnessColor),
) shape = checkNull(input$richnessShape),
if (input$richnessBoxplot >= 2) { title = checkNull(input$richnessTitle),
p <- p + geom_boxplot() measures = checkNull(input$richnessMeasures)
} )
if (input$richnessBoxplot <= 2) { if (input$richnessBoxplot >= 2) {
p <- p + geom_point() p <- p + geom_boxplot()
} }
return(p) if (input$richnessBoxplot <= 2) {
}) p <- p + geom_point()
}
output$richnessATable <- renderUI({ return(p)
validate(need(data16S(), })
"Requires an abundance dataset"))
p(beautifulTable(data.frame( output$richnessATable <- renderUI({
SAMPLE = sample_names(data16S()), round(estimate_richness(data16S()), digits = 2) validate(need(data16S(),
))) "Requires an abundance dataset"))
}) p(beautifulTable(data.frame(
SAMPLE = sample_names(data16S()), round(estimate_richness(data16S()), digits = 2)
output$richnessBUI <- renderUI({ )))
box( })
title = "Setting : " ,
width = NULL, output$richnessBUI <- renderUI({
status = "primary", box(
selectInput( title = "Setting : " ,
"richnessBOrder", width = NULL,
label = "Sorting sample : ", status = "primary",
choices = c("..." = 0, sample_variables(data16S())) selectInput(
), "richnessBOrder",
textInput("richnessBTitle", label = "Sorting sample : ",
label = "Title : ", choices = c("..." = 0, sample_variables(data16S()))
value = "Beta diversity heatmap") ),
) textInput("richnessBTitle",
}) label = "Title : ",
value = "Beta diversity heatmap")
output$richnessB <- renderPlot({ )
validate(need(data16S(), })
"Requires an abundance dataset"))
beta <- output$richnessB <- renderPlot({
melt(as(distance(data16S(), method = input$richnessBDist), "matrix")) validate(need(data16S(),
colnames(beta) <- c("x", "y", "distance") "Requires an abundance dataset"))
if (!is.null(checkNull(input$richnessBOrder))) beta <-
{ melt(as(distance(data16S(), method = input$richnessBDist), "matrix"))
new_factor = as.factor(get_variable(data16S(), input$richnessBOrder)) colnames(beta) <- c("x", "y", "distance")
variable_sort <- if (!is.null(checkNull(input$richnessBOrder)))
as.factor(get_variable(data16S(), input$richnessBOrder)[order(new_factor)]) {
L = levels(reorder(sample_names(data16S()), as.numeric(new_factor))) new_factor = as.factor(get_variable(data16S(), input$richnessBOrder))
beta$x <- factor(beta$x, levels = L) variable_sort <-
beta$y <- factor(beta$y, levels = L) as.factor(get_variable(data16S(), input$richnessBOrder)[order(new_factor)])
palette <- hue_pal()(length(levels(new_factor))) L = levels(reorder(sample_names(data16S()), as.numeric(new_factor)))
tipColor <- beta$x <- factor(beta$x, levels = L)
col_factor(palette, levels = levels(new_factor))(variable_sort) beta$y <- factor(beta$y, levels = L)
} palette <- hue_pal()(length(levels(new_factor)))
p <- tipColor <-
ggplot(beta, aes(x = x, y = y, fill = distance)) + geom_tile() col_factor(palette, levels = levels(new_factor))(variable_sort)
p <- p + ggtitle(input$richnessBTitle) + theme( }
axis.text.x = element_text( p <-
angle = 90, ggplot(beta, aes(x = x, y = y, fill = distance)) + geom_tile()
hjust = 1, p <- p + ggtitle(input$richnessBTitle) + theme(
color = checkNull(tipColor) axis.text.x = element_text(
), angle = 90,
axis.text.y = element_text(color = checkNull(tipColor)), hjust = 1,
axis.title.x = element_blank(), color = checkNull(tipColor)
axis.title.y = element_blank() ),
) axis.text.y = element_text(color = checkNull(tipColor)),
return(p + scale_fill_gradient2()) axis.title.x = element_blank(),
}) axis.title.y = element_blank()
)
output$networkBUI <- renderUI({ return(p + scale_fill_gradient2())
validate(need(data16S(), "")) })
box(
title = "Setting : " , output$networkBUI <- renderUI({
width = NULL, validate(need(data16S(), ""))
status = "primary", box(
sliderInput( title = "Setting : " ,
"netwMax", width = NULL,
label = "Threshold : ", status = "primary",
min = 0, sliderInput(
max = 1, "netwMax",
value = 0.7 label = "Threshold : ",
), min = 0,
checkboxInput("netwOrphan", max = 1,
label = "Keep orphans", value = 0.7
value = TRUE), ),
textInput("netwTitle", checkboxInput("netwOrphan",
label = "Title : ", label = "Keep orphans",
value = "Beta diversity network"), value = TRUE),
selectInput( textInput("netwTitle",
"netwCol", label = "Title : ",
label = "Color : ", value = "Beta diversity network"),
choices = c("..." = 0, sample_variables(data16S())) selectInput(
), "netwCol",
selectInput( label = "Color : ",
"netwShape", choices = c("..." = 0, sample_variables(data16S()))
label = "Shape : ", ),
choices = c("..." = 0, sample_variables(data16S())) selectInput(
), "netwShape",
selectInput( label = "Shape : ",
"netwLabel", choices = c("..." = 0, sample_variables(data16S()))
label = "Label : ", ),
choices = c( selectInput(
"..." = 0, "netwLabel",
"Sample name" = "value", label = "Label : ",
sample_variables(data16S()) choices = c(
) "..." = 0,
) "Sample name" = "value",
) sample_variables(data16S())
}) )
)
output$networkB <- renderPlot({ )
validate(need(data16S(), })
"Requires an abundance dataset"))
g <- make_network( output$networkB <- renderPlot({
data16S(), validate(need(data16S(),
distance = input$richnessBDist, "Requires an abundance dataset"))
max.dist = input$netwMax, g <- make_network(
keep.isolates = input$netwOrphan data16S(),
) distance = input$richnessBDist,
p <- plot_network( max.dist = input$netwMax,
g, keep.isolates = input$netwOrphan
physeq = data16S(), )
color = checkNull(input$netwCol), p <- plot_network(
shape = checkNull(input$netwShape), g,
label = checkNull(input$netwLabel), physeq = data16S(),
hjust = 2, color = checkNull(input$netwCol),
title = checkNull(input$netwTitle) shape = checkNull(input$netwShape),
) label = checkNull(input$netwLabel),
return(p) hjust = 2,
}) title = checkNull(input$netwTitle)
)
output$richnessBTable <- renderUI({ return(p)
validate(need(data16S(), })
"Requires an abundance dataset"))
p(beautifulTable(data.frame( output$richnessBTable <- renderUI({
SAMPLE = sample_names(data16S()), round(as.matrix( validate(need(data16S(),
distance(data16S(), method = input$richnessBDist) "Requires an abundance dataset"))
), digits = 2) p(beautifulTable(data.frame(
))) SAMPLE = sample_names(data16S()), round(as.matrix(
}) distance(data16S(), method = input$richnessBDist)
), digits = 2)
output$rarefactionCurve <- renderPlot({ )))
validate(need(data16S(), })
"Requires an abundance dataset"))
p <- ggrare( output$rarefactionCurve <- renderPlot({
physeq = data16S(), validate(need(data16S(),
step = 100, "Requires an abundance dataset"))
#step = input$rarefactionStep, p <- ggrare(
color = checkNull(input$rarefactionColor), physeq = data16S(),
label = checkNull(input$rarefactionLabel), step = 100,
se = FALSE #step = input$rarefactionStep,
) color = checkNull(input$rarefactionColor),
if (!is.null(checkNull(input$rarefactionGrid))) { label = checkNull(input$rarefactionLabel),
p <- p + facet_grid(paste(".", "~", input$rarefactionGrid)) se = FALSE
} )
if (!is.null(checkNull(input$rarefactionGrid))) {
if (input$rarefactionMin) { p <- p + facet_grid(paste(".", "~", input$rarefactionGrid))
p <- }
p + geom_vline(xintercept = min(sample_sums(data16S())),
color = "gray60") if (input$rarefactionMin) {
} p <-
return(p + ggtitle(input$rarefactionTitle)) p + geom_vline(xintercept = min(sample_sums(data16S())),
color = "gray60")
}) }
return(p + ggtitle(input$rarefactionTitle))
output$rarefactionCurveUI <- renderUI({
validate(need(data16S(), "")) })
box(
title = "Setting : " , output$rarefactionCurveUI <- renderUI({
width = NULL, validate(need(data16S(), ""))
status = "primary", box(
# sliderInput( title = "Setting : " ,
# "rarefactionStep", width = NULL,
# label = "Etapes de calcul : ", status = "primary",
# min = 1, # sliderInput(
# max = 1000, # "rarefactionStep",
# value = 100 # label = "Etapes de calcul : ",
# ), # min = 1,
checkboxInput("rarefactionMin", label = "Show min sample threshold", value = FALSE), # max = 1000,
textInput("rarefactionTitle", # value = 100
label = "Title : ", # ),
value = "Rarefaction curves"), checkboxInput("rarefactionMin", label = "Show min sample threshold", value = FALSE),
selectInput( textInput("rarefactionTitle",
"rarefactionColor", label = "Title : ",
label = "Color : ", value = "Rarefaction curves"),
choices = c("..." = 0, sample_variables(data16S())) selectInput(
), "rarefactionColor",
selectInput( label = "Color : ",
"rarefactionLabel", choices = c("..." = 0, sample_variables(data16S()))
label = "Label : ", ),
choices = c("..." = 0, sample_variables(data16S())) selectInput(
), "rarefactionLabel",
selectInput( label = "Label : ",
"rarefactionGrid", choices = c("..." = 0, sample_variables(data16S()))
label = "Subplot : ", ),
choices = c("..." = 0, sample_variables(data16S())) selectInput(
) "rarefactionGrid",
) label = "Subplot : ",
}) choices = c("..." = 0, sample_variables(data16S()))
)
output$HeatmapUI <- renderUI({ )
validate(need(data16S(), "")) })
box(
title = "Setting : " , output$HeatmapUI <- renderUI({
width = NULL, validate(need(data16S(), ""))
status = "primary", box(
textInput("heatmapTitle", title = "Setting : " ,
label = "Title : ", width = NULL,
value = "Taxa heatmap by samples"), status = "primary",
selectInput( textInput("heatmapTitle",
"heatmapGrid", label = "Title : ",
label = "Subplot : ", value = "Taxa heatmap by samples"),
choices = c("..." = 0, sample_variables(data16S())) selectInput(
), "heatmapGrid",
selectInput( label = "Subplot : ",
"heatmapX", choices = c("..." = 0, sample_variables(data16S()))
label = "X : ", ),
choices = c("..." = 0, sample_variables(data16S())) selectInput(
), "heatmapX",
sliderInput( label = "X : ",
"heatmapTopOtu", choices = c("..." = 0, sample_variables(data16S()))
label = "Show the n most abundant OTU : ", ),
min = 1, sliderInput(
max = ntaxa(data16S()), "heatmapTopOtu",
value = 250 label = "Show the n most abundant OTU : ",
), min = 1,
selectInput( max = ntaxa(data16S()),
"heatmapDist", value = 250
label = "Distance : ", ),
selected = "bray", selectInput(
choices = list( "heatmapDist",
"bray", label = "Distance : ",
"jaccard", selected = "bray",
"unifrac", choices = list(
"wunifrac", "bray",
"dpcoa", "jaccard",
"jsd", "unifrac",
"euclidean" "wunifrac",
) "dpcoa",
), "jsd",
selectInput( "euclidean"
"heatmapMethod", )
label = "Method : ", ),
selected = "NMDS", selectInput(
choices = list( "heatmapMethod",
"NMDS", label = "Method : ",
"ward.D2", selected = "NMDS",
"ward.D", choices = list(
"single", "NMDS",
"complete", "ward.D2",
"average", "ward.D",
"mcquitty", "single",
"median", "complete",
"centroid" "average",
) "mcquitty",
) "median",
) "centroid"
}) )
)
output$Heatmap <- renderPlot({ )
validate(need(data16S(), })
"Requires an abundance dataset"))
p <- plot_heatmap( output$Heatmap <- renderPlot({
physeq = prune_taxa(names(sort( validate(need(data16S(),
taxa_sums(data16S()), decreasing = TRUE "Requires an abundance dataset"))
)[1:input$heatmapTopOtu]), data16S()), p <- plot_heatmap(
distance = input$heatmapDist, physeq = prune_taxa(names(sort(
method = input$heatmapMethod, taxa_sums(data16S()), decreasing = TRUE
title = checkNull(input$heatmapTitle), )[1:input$heatmapTopOtu]), data16S()),
sample.order = checkNull(input$heatmapX), distance = input$heatmapDist,
low = "yellow", method = input$heatmapMethod,
high = "red", title = checkNull(input$heatmapTitle),
na.value = "white" sample.order = checkNull(input$heatmapX),
) low = "yellow",
if (!is.null(checkNull(input$heatmapGrid))) { high = "red",
p <- na.value = "white"
p + facet_grid(paste(".", "~", input$heatmapGrid), scales = "free_x") )
} if (!is.null(checkNull(input$heatmapGrid))) {
return(p) p <-
}) p + facet_grid(paste(".", "~", input$heatmapGrid), scales = "free_x")
}
output$treeUI <- renderUI({ return(p)
validate(need(data16S(), "")) })
box(
title = "Setting : " , output$treeUI <- renderUI({
width = NULL, validate(need(data16S(), ""))
status = "primary", box(
radioButtons( title = "Setting : " ,
"treeRank", width = NULL,
label = "Taxonomic rank captioned : ", status = "primary",
choices = c(aucun = "", radioButtons(
rank_names(data16S()), "treeRank",
OTU = "taxa_names"), label = "Taxonomic rank captioned : ",
inline = TRUE choices = c(aucun = "",
), rank_names(data16S()),
sliderInput( OTU = "taxa_names"),
"treeTopOtu", inline = TRUE
label = "Show the n most abundant OTU : ", ),
min = 1, sliderInput(
max = ntaxa(data16S()), "treeTopOtu",
value = 20 label = "Show the n most abundant OTU : ",
), min = 1,
checkboxInput("treeRadial", label = "Radial tree", value = FALSE), max = ntaxa(data16S()),
checkboxInput("treeSample", label = "Show samples", value = TRUE), value = 20
textInput("treeTitle", ),
label = "Title : ", checkboxInput("treeRadial", label = "Radial tree", value = FALSE),
value = "Phylogenetic tree"), checkboxInput("treeSample", label = "Show samples", value = TRUE),
selectInput( textInput("treeTitle",
"treeCol", label = "Title : ",
label = "Color : ", value = "Phylogenetic tree"),
choices = c("..." = 0, sample_variables(data16S())) selectInput(
), "treeCol",
selectInput( label = "Color : ",
"treeShape", choices = c("..." = 0, sample_variables(data16S()))
label = "Shape : ", ),
choices = c("..." = 0, sample_variables(data16S())) selectInput(
) "treeShape",
) label = "Shape : ",
}) choices = c("..." = 0, sample_variables(data16S()))
)
output$tree <- renderPlot({ )
validate( })
need(data16S(), "Requires an abundance dataset"),
need( output$tree <- renderPlot({
phy_tree(data16S(), errorIfNULL = FALSE), validate(
"Requires a phylogenetic tree" need(data16S(), "Requires an abundance dataset"),
) need(
) phy_tree(data16S(), errorIfNULL = FALSE),
p <- plot_tree( "Requires a phylogenetic tree"
physeq = prune_taxa(names(sort( )
taxa_sums(data16S()), decreasing = TRUE )
)[1:input$treeTopOtu]), data16S()), p <- plot_tree(
method = ifelse(input$treeSample, "sampledodge", "treeonly"), physeq = prune_taxa(names(sort(
color = checkNull(input$treeCol), taxa_sums(data16S()), decreasing = TRUE
shape = checkNull(input$treeShape), )[1:input$treeTopOtu]), data16S()),
size = "abundance", method = ifelse(input$treeSample, "sampledodge", "treeonly"),
label.tips = checkNull(input$treeRank), color = checkNull(input$treeCol),
sizebase = 5, shape = checkNull(input$treeShape),
ladderize = "left", size = "abundance",
plot.margin = 0, label.tips = checkNull(input$treeRank),
title = checkNull(input$treeTitle) sizebase = 5,
) ladderize = "left",
if (checkNull(input$treeRadial)) { plot.margin = 0,
return(p + coord_polar(theta = "y")) title = checkNull(input$treeTitle)
} else { )
return(p) if (checkNull(input$treeRadial)) {
} return(p + coord_polar(theta = "y"))
}) } else {
return(p)
output$acpUI <- renderUI({ }
validate(need(data16S(), "")) })
box(
title = "Setting : " , output$acpUI <- renderUI({
width = NULL, validate(need(data16S(), ""))
status = "primary", box(
checkboxGroupInput( title = "Setting : " ,
"acpAxes", width = NULL,
label = "Axes : ", status = "primary",
choices = seq(10), checkboxGroupInput(
selected = c(1, 2), "acpAxes",
inline = TRUE label = "Axes : ",
), choices = seq(10),
selectInput( selected = c(1, 2),
"acpDist", inline = TRUE
label = "Distance : ", ),
selected = "bray", selectInput(
choices = list( "acpDist",
"bray", label = "Distance : ",
"jaccard", selected = "bray",
"unifrac", choices = list(
"wunifrac", "bray",
"dpcoa", "jaccard",
"jsd", "unifrac",
"euclidean" "wunifrac",
) "dpcoa",
), "jsd",
selectInput( "euclidean"
"acpMethod", )
label = "Method : ", ),
selected = "MDS", selectInput(
choices = list("DCA", "CCA", "RDA", "CAP", "DPCoA", "NMDS", "MDS", "PCoA") "acpMethod",
), label = "Method : ",
textInput("acpTitle", selected = "MDS",
label = "Title : ", choices = list("DCA", "CCA", "RDA", "CAP", "DPCoA", "NMDS", "MDS", "PCoA")
value = "Samples ordination graphic"), ),
selectInput( textInput("acpTitle",
"acpLabel", label = "Title : ",
label = "Label : ", value = "Samples ordination graphic"),
choices = c("..." = 0, sample_variables(data16S())) selectInput(
), "acpLabel",
selectInput( label = "Label : ",
"acpCol", choices = c("..." = 0, sample_variables(data16S()))
label = "Color : ", ),
choices = c("..." = 0, sample_variables(data16S())) selectInput(
), "acpCol",
selectInput( label = "Color : ",
"acpShape", choices = c("..." = 0, sample_variables(data16S()))
label = "Shape : ", ),
choices = c("..." = 0, sample_variables(data16S())) selectInput(
), "acpShape",
selectInput( label = "Shape : ",
"acpEllipse", choices = c("..." = 0, sample_variables(data16S()))
label = "Ellipses : ", ),
choices = c("..." = 0, sample_variables(data16S())) selectInput(
), "acpEllipse",
selectInput( label = "Ellipses : ",
"acpRep", choices = c("..." = 0, sample_variables(data16S()))
label = "Barycenters : ", ),
choices = c("..." = 0, sample_variables(data16S())) selectInput(
) "acpRep",
) label = "Barycenters : ",
}) choices = c("..." = 0, sample_variables(data16S()))
)
output$acp <- renderPlot({ )
validate( })
need(data16S(), "Requires an abundance dataset"),
need(length(input$acpAxes) == 2, "Requires two projections axes") output$acp <- renderPlot({
) validate(
p <- plot_samples( need(data16S(), "Requires an abundance dataset"),
data16S(), need(length(input$acpAxes) == 2, "Requires two projections axes")
ordination = ordinate( )
data16S(), p <- plot_samples(
method = input$acpMethod, data16S(),
distance = input$acpDist ordination = ordinate(
), data16S(),
axes = as.numeric(input$acpAxes), method = input$acpMethod,
title = checkNull(input$acpTitle), distance = input$acpDist
color = checkNull(input$acpCol), ),
replicate = checkNull(input$acpRep), axes = as.numeric(input$acpAxes),
shape = checkNull(input$acpShape), title = checkNull(input$acpTitle),
label = checkNull(input$acpLabel) color = checkNull(input$acpCol),
) replicate = checkNull(input$acpRep),
if (!is.null(checkNull(input$acpEllipse))) { shape = checkNull(input$acpShape),
p <- p + stat_ellipse(aes_string(group = input$acpEllipse)) label = checkNull(input$acpLabel)
} )
return(p + theme_bw()) if (!is.null(checkNull(input$acpEllipse))) {
}) p <- p + stat_ellipse(aes_string(group = input$acpEllipse))
}
return(p + theme_bw())
})
}) })
\ No newline at end of file
library(shinydashboard) library(shinydashboard)
library(shinycustomloader) library(shinycustomloader)
shinyUI(dashboardPage( shinyUI(dashboardPage(
dashboardHeader(title = "Easy16S"), dashboardHeader(title = "Easy16S"),
dashboardSidebar( dashboardSidebar(
tags$div( tags$div(
title = "Select dataset for demonstration", title = "Select a dataset for demonstration purpose",
selectInput( selectInput(
"dataset", "dataset",
label = "Select dataset : ", label = "Select dataset : ",
choices = list( choices = list(
"Input data" = "input", "Input data" = "input",
"Rdata" = "rdata", "Rdata" = "rdata",
"Demo : Chaillou et al., 2015" = "food" "Demo : Chaillou et al., 2015" = "food"
), ),
# "Mach et al., 2015" = "kinetic", "Morton et al., 2017" = "soil", "Ravel et al., 2011" = "ravel", "biorare" = "biorare", "GlobalPatterns" = "GlobalPatterns" # "Mach et al., 2015" = "kinetic", "Morton et al., 2017" = "soil", "Ravel et al., 2011" = "ravel", "biorare" = "biorare", "GlobalPatterns" = "GlobalPatterns"
selected = 1 selected = 1
) )
), ),
hr(), hr(),
tags$div( tags$div(
title = "RData where 'data' is a phyloseq object.", title = "RData where 'data' is a phyloseq object.",
fileInput("fileRData", fileInput("fileRData",
label = "RData : ", label = "RData : ",
placeholder = "data.RData") placeholder = "data.RData")
), ),
hr(), hr(),
tags$div( tags$div(
title = "Abundance BIOM file come from FROGS with 'FROGS BIOM to std BIOM', Qiime or another metagenomic tool.", title = "Abundance BIOM file come from FROGS with 'FROGS BIOM to std BIOM', Qiime or another metagenomic tool.",
fileInput("fileBiom", fileInput("fileBiom",
label = "Abundance BIOM file : ", label = "Abundance BIOM file : ",
placeholder = "data.biom"), placeholder = "data.biom"),
radioButtons( radioButtons(
"biomFormat", "biomFormat",
label = NULL, label = NULL,
inline = TRUE, inline = TRUE,
choices = list(`STD BIOM` = "std", choices = list(`STD BIOM` = "std",
`FROGS BIOM` = "frogs"), `FROGS BIOM` = "frogs"),
selected = "std" selected = "std"
) )
), ),
tags$div( tags$div(
style = "text-align:center", style = "text-align:center",
title = "Resample dataset such that all samples have the same library size. \nIt's using an random sampling without replacement.", title = "Resample dataset such that all samples have the same library size. \nIt's using an random sampling without replacement.",
checkboxInput("rareData", label = "Rarefy dataset", value = TRUE), checkboxInput("rareData", label = "Rarefy dataset", value = TRUE),
textOutput("rarefactionMin") textOutput("rarefactionMin")
), ),
tags$div( tags$div(
title = "Metadata table with variables (in columns) and samples (in rows). \nMake sure you follow the exact spelling of the sample names (1st column). \nThe import of an excel table is possible but not recommended.", title = "Metadata table with variables (in columns) and samples (in rows). \nMake sure you follow the exact spelling of the sample names (1st column). \nThe import of an excel table is possible but not recommended.",
fileInput("fileMeta", fileInput("fileMeta",
label = "Metadata table : ", label = "Metadata table : ",
placeholder = "data.csv") placeholder = "data.csv")
), ),
radioButtons( radioButtons(
"CSVsep", "CSVsep",
label = "CSV separator : ", label = "CSV separator : ",
inline = TRUE, inline = TRUE,
choices = list( choices = list(
`<tab>` = "\t", `<tab>` = "\t",
`,` = ",", `,` = ",",
`;` = ";", `;` = ";",
excel = "excel" excel = "excel"
) )
), ),
tags$div( tags$div(
title = "Phylogenetic tree", title = "Phylogenetic tree",
fileInput("fileTree", fileInput("fileTree",
label = "Phylogenetic tree : ", label = "Phylogenetic tree : ",
placeholder = "data.nwk") placeholder = "data.nwk")
), ),
# tags$div( # tags$div(
# title = "Representative FASTA sequences of OTU", # title = "Representative FASTA sequences of OTU",
# fileInput( # fileInput(
# "fileSeq", # "fileSeq",
# label = "FASTA sequences : "), # label = "FASTA sequences : "),
# placeholder = "data.fasta" # placeholder = "data.fasta"
# ) # )
# ), # ),
uiOutput("downloadUI") uiOutput("downloadUI")
), ),
dashboardBody( dashboardBody(
tabsetPanel( tabsetPanel(
tabPanel( tabPanel(
"Summary", "Summary",
verbatimTextOutput("phyloseqPrint"), verbatimTextOutput("phyloseqPrint"),
withLoader(uiOutput("summaryTable")), withLoader(uiOutput("summaryTable")),
tags$footer( tags$footer(
"Questions, problems or comments regarding this application should be sent to ", "Questions, problems or comments regarding this application should be sent to ",
a(href = "mailto:cedric.midoux@irstea.fr?subject=[Easy16S]", "cedric.midoux@irstea.fr"), a(href = "mailto:cedric.midoux@irstea.fr?subject=[Easy16S]", "cedric.midoux@irstea.fr"),
align = "center", align = "center",
style = "position:absolute; style = "position:absolute;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
color: grey; color: grey;
padding: 10px; padding: 10px;
# background-color: white; # background-color: white;
z-index: 1000; z-index: 1000;
" "
) )
), ),
tabPanel("Global barplot", tabPanel("Global barplot",
withLoader(plotOutput("histo", height = 700)), withLoader(plotOutput("histo", height = 700)),
uiOutput("histUI")), uiOutput("histUI")),
tabPanel( tabPanel(
"Filtered barplot", "Filtered barplot",
withLoader(plotOutput("histoFocus", height = 700)), withLoader(plotOutput("histoFocus", height = 700)),
box( box(
title = "Paramètres", title = "Paramètres",
width = NULL, width = NULL,
status = "primary", status = "primary",
uiOutput("histFocusUIfocusRank"), uiOutput("histFocusUIfocusRank"),
uiOutput("histFocusUIfocusTaxa"), uiOutput("histFocusUIfocusTaxa"),
uiOutput("histFocusUIfocusNbTaxa"), uiOutput("histFocusUIfocusNbTaxa"),
uiOutput("histFocusUIfocusGrid"), uiOutput("histFocusUIfocusGrid"),
uiOutput("histFocusUIfocusX") uiOutput("histFocusUIfocusX")
) )
), ),
tabPanel("Heatmap", tabPanel("Heatmap",
withLoader(plotOutput("Heatmap", height = 700)), withLoader(plotOutput("Heatmap", height = 700)),
uiOutput("HeatmapUI")), uiOutput("HeatmapUI")),
tabPanel( tabPanel(
"Rarefaction curves", "Rarefaction curves",
withLoader(plotOutput("rarefactionCurve", height = 700)), withLoader(plotOutput("rarefactionCurve", height = 700)),
uiOutput("rarefactionCurveUI") uiOutput("rarefactionCurveUI")
), ),
tabPanel(HTML("&alpha;-diversity"), tabPanel(HTML("&alpha;-diversity"),
box( box(
width = NULL, tabsetPanel( width = NULL, tabsetPanel(
tabPanel("Plots", tabPanel("Plots",
withLoader(plotOutput( withLoader(plotOutput(
"richnessA", height = 700 "richnessA", height = 700
)), )),
uiOutput("richnessAUI")), uiOutput("richnessAUI")),
tabPanel("Tables", withLoader(uiOutput("richnessATable"))) tabPanel("Tables", withLoader(uiOutput("richnessATable")))
) )
)), )),
tabPanel( tabPanel(
HTML("&beta;-diversity"), HTML("&beta;-diversity"),
selectInput( selectInput(
"richnessBDist", "richnessBDist",
label = "Distance : ", label = "Distance : ",
choices = list( choices = list(
"bray", "bray",
"jaccard", "jaccard",
"unifrac", "unifrac",
"wunifrac", "wunifrac",
"dpcoa", "dpcoa",
"jsd", "jsd",
"euclidean" "euclidean"
) )
), ),
box(width = NULL, tabsetPanel( box(width = NULL, tabsetPanel(
tabPanel("Heatmap", tabPanel("Heatmap",
withLoader(plotOutput( withLoader(plotOutput(
"richnessB", height = 700 "richnessB", height = 700
)), )),
uiOutput("richnessBUI")), uiOutput("richnessBUI")),
tabPanel("Networks", tabPanel("Networks",
withLoader(plotOutput("networkB", height = 700)), withLoader(plotOutput("networkB", height = 700)),
uiOutput("networkBUI")), uiOutput("networkBUI")),
tabPanel("Tables", withLoader(uiOutput("richnessBTable"))) tabPanel("Tables", withLoader(uiOutput("richnessBTable")))
)) ))
), ),
tabPanel( tabPanel(
"MultiDimensional Scaling", "MultiDimensional Scaling",
withLoader(plotOutput("acp", height = 700)), withLoader(plotOutput("acp", height = 700)),
uiOutput("acpUI") uiOutput("acpUI")
), ),
tabPanel( tabPanel(
"Phylogenetic tree", "Phylogenetic tree",
withLoader(plotOutput("tree", height = 700)), withLoader(plotOutput("tree", height = 700)),
uiOutput("treeUI") uiOutput("treeUI")
), ),
tabPanel("Clustering", tabPanel("Clustering",
withLoader(plotOutput("clust", height = 700)), withLoader(plotOutput("clust", height = 700)),
uiOutput("clustUI")), uiOutput("clustUI")),
tabPanel("Help", tabPanel("Help",
div( div(
HTML( HTML(
"<p> "<p>
Questions, problems or comments regarding this application should be sent to Questions, problems or comments regarding this application should be sent to
<a href = \"mailto:cedric.midoux@irstea.fr?subject=[Easy16S]\">cedric.midoux@irstea.fr</a> <a href = \"mailto:cedric.midoux@irstea.fr?subject=[Easy16S]\">cedric.midoux@irstea.fr</a>
</p> </p>
<p> <p>
For more information about this tool, you can refer to For more information about this tool, you can refer to
<a href = \"http://migale.jouy.inra.fr/sites/migale.jouy.inra.fr.drupal7.migale.jouy.inra.fr/files/JOBIM2018_poster.pdf\">this poster</a>. <a href = \"http://migale.jouy.inra.fr/sites/migale.jouy.inra.fr.drupal7.migale.jouy.inra.fr/files/JOBIM2018_poster.pdf\">this poster</a>.
</p> </p>
<p> <p>
<u>The demo dataset :</u> Chaillou, S., et al. \" <u>The demo dataset :</u> Chaillou, S., et al. \"
<a href = \"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4409155/\"> <a href = \"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4409155/\">
Origin and ecological selection of core and food-specific bacterial communities associated with meat and seafood spoilage.</a>\" Origin and ecological selection of core and food-specific bacterial communities associated with meat and seafood spoilage.</a>\"
<i>The ISME journal</i> 9.5 (2015): 1105. <i>The ISME journal</i> 9.5 (2015): 1105.
<br> <br>
16S survey of bacterial communities from 8 different food products, distributed as 4 meat products and 4 seafoods. Used to find core microbiota of food products. 16S survey of bacterial communities from 8 different food products, distributed as 4 meat products and 4 seafoods. Used to find core microbiota of food products.
</p> </p>
<br> <br>
<p align=\"center\" position=\"absolute\" bottom\"80px\"> <p align=\"center\" position=\"absolute\" bottom\"80px\">
<img src=\"migale.png\" width=\"100\"/> <img src=\"migale.png\" width=\"100\"/>
<img src=\"Irstea.png\" width=\"100\"/> <img src=\"Irstea.png\" width=\"100\"/>
</p> </p>
" "
) )
)) ))
) )
) )
)) ))
Supports Markdown
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