diff --git a/README.md b/README.md
index 2482f1adfdd5c784f3b1211d38bf2a0c60696e85..ff8e2230e7448f96c4d9cd96bbb5652d2e89f6ab 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ MiBiOmics is be available at https://shiny-bird.univ-nantes.fr/app/Mibiomics but
 ```bash
 conda env create -f MiBiOmics.yml
 conda activate MiBiOmics
-R -e 'shiny::runUrl("https://gitlab.univ-nantes.fr/combi-ls2n/mibiomics/-/archive/master/mibiomics-master.tar.gz")'
+R -e 'shiny::runUrl("https://gitlab.univ-nantes.fr/combi-ls2n/mibiomics/repository/master/archive.tar.gz")'
 ```
 
 All the necessary packages will be installed automatically for the usage of MiBiOmics.
diff --git a/server.R b/server.R
index 8a8ac7af5abca9422130cc9e383a06fec9c9bb73..0b47be618d42f810a502ad571646cf1b59ab3889 100644
--- a/server.R
+++ b/server.R
@@ -1,7 +1,7 @@
 # Define server logic ----
 server <- function(input, output, session) {
   options(shiny.maxRequestSize=30*1024^2)
-  
+
   #### SERVER FUNCTIONS ####
   source("server_function/SERVER_Data_Upload.R", local=TRUE)
   source("server_function/SERVER_Data_Exploration.R", local=TRUE)
@@ -12,11 +12,11 @@ server <- function(input, output, session) {
 
   #### GENERAL CODE ####
 
-  #### HEADER ####  
+  #### HEADER ####
   js$disableTab("NETWORK_EXPLORATION")
   js$disableTab("MULTI-OMICS_ANALYSIS")
-  
-  
+
+
   observeEvent(input$enableTabulations, {
     # enable NETWORK_EXPLORATION when clicking the button
     js$enableTab("NETWORK_EXPLORATION")
@@ -24,39 +24,34 @@ server <- function(input, output, session) {
     # switch to NETWORK_EXPLORATION
     updateTabsetPanel(session, "navbar", "NETWORK_EXPLORATION")
   })
-  
+
   observeEvent(input$goD2, {
     updateTabsetPanel(session, "NETWORK_INFERENCE_D1_D2", "NETWORK_INFERENCE_D2")
   })
-  
+
   observeEvent(input$goD3, {
     updateTabsetPanel(session, "NETWORK_INFERENCE_D1_D2", "NETWORK_INFERENCE_D3")
   })
-  
+
   observeEvent(input$enableTabulations_D3, {
     # enable NETWORK_EXPLORATION when clicking the button
     js$enableTab("NETWORK_EXPLORATION")
 
       js$enableTab("MULTI-OMICS_ANALYSIS")
-  
+
     # switch to NETWORK_EXPLORATION
     updateTabsetPanel(session, "navbar", "NETWORK_EXPLORATION")
   })
-  
+
   observeEvent(input$enableTabulations_D2, {
     # enable NETWORK_EXPLORATION when clicking the button
     js$enableTab("NETWORK_EXPLORATION")
-    
+
     js$enableTab("MULTI-OMICS_ANALYSIS")
-    
+
     # switch to NETWORK_EXPLORATION
     updateTabsetPanel(session, "navbar", "NETWORK_EXPLORATION")
   })
-  
- 
-}
-
-
-
 
 
+}
diff --git a/server_function/SERVER_Network_Exploration.R b/server_function/SERVER_Network_Exploration.R
index 594a3199aad5f52b0e6c7924bcbfb735b54a290e..337b1d14181b6f522389b0ca2691746b5d01e2b1 100644
--- a/server_function/SERVER_Network_Exploration.R
+++ b/server_function/SERVER_Network_Exploration.R
@@ -2,8 +2,8 @@
 #### SERVER FUNCTIONS : NETWORK EXPLORATION ####
 ################################################
 # This script gathers all the functions related to the network exploration tabulation of MiBiOmics
-# The first functions use the WGCNA functionality to show you the modules associations of your 
-# network. The rest of the functions allow you to explore the specificity of your modules (the 
+# The first functions use the WGCNA functionality to show you the modules associations of your
+# network. The rest of the functions allow you to explore the specificity of your modules (the
 # relativa abundance if you are working with microbiote data, a representation of the module as a
 # hive plot). A PLS can also be realized on each module to verify their association to an
 # external trait and the content of the module can be downloaded.
@@ -27,12 +27,12 @@ module_Relative_abundance <- reactive({
       )
     }
   }
-  
-  
+
+
   if (input$selectVariable_RelAb != "unordered"){
     exprDat <- exprDat[order(sampleAnnot_2()[,input$selectVariable_RelAb]),]
   }
-  
+
   selectedExpr <- exprDat[, modGenes]
   if (input$Transformation =="Yes"){
     if (input$TypeTransformation=="CLR"){
@@ -42,7 +42,7 @@ module_Relative_abundance <- reactive({
     }
   }else{
     exprDat_rel_ab <- as.data.frame(t(apply(selectedExpr, 1, function(x) x / sum(x))))
-    
+
   }
   exprDat_rel_ab <- setDT(as.data.frame(t(exprDat_rel_ab)), keep.rownames = TRUE)
   exprDat_rel_ab <- merge(exprDat_rel_ab, taxTable1(), by = "rn")
@@ -57,14 +57,14 @@ module_Relative_abundanceSec <- reactive({
     need((input$OmicTable == "OTUs"), "This plot can only be realised with OTUs")
   )
   exprDat <- exprDatSec_WGCNA()
-  
+
   modGenes = (selectedDynamicColor2() == input$selectModuleSec)
-  
-  
+
+
   if (input$selectVariable_RelAbSec != "unordered"){
     exprDat <- exprDat[order(sampleAnnot_sec_WGCNA()[,input$selectVariable_RelAbSec]),]
   }
-  
+
   selectedExpr <- exprDat[, modGenes]
   if (input$Transformation1 =="Yes"){
     if (input$TypeTransformation1=="CLR"){
@@ -88,16 +88,16 @@ module_Relative_abundanceTer <- reactive({
   validate(
     need((input$OmicTable3 == "OTUs" && input$TaxonFile1), "This plot can only be realised with OTUs")
   )
-  
+
   exprDat <- exprDatTer_WGCNA()
-  
+
   modGenes = (selectedDynamicColor3() == input$selectModuleTer)
-  
-  
+
+
   if (input$selectVariable_RelAbTer != "unordered"){
     exprDat <- exprDat[order(sampleAnnot_ter()[,input$selectVariable_RelAbTer]),]
   }
-  
+
   selectedExpr <- exprDat[, modGenes]
   if (input$Transformation2 =="Yes"){
     if (input$TypeTransformation2=="CLR"){
@@ -116,7 +116,7 @@ module_Relative_abundanceTer <- reactive({
   df_long
 })
 
-# Order the MEs according to a variable inputed by the user 
+# Order the MEs according to a variable inputed by the user
 MEs_ordered <- reactive ({
   MEs <- data.frame(selectedMEs(), rownames(sampleAnnot_2()))
   colnames(MEs) <- c(colnames(selectedMEs()), "sampleName")
@@ -186,7 +186,7 @@ sampleAnnot_orderedTer <- reactive({
 geneModuleMembership <- reactive({
   modNames = substring(names(selectedMEs()), 3)
   geneModuleMembership = as.data.frame(cor(exprDat_WGCNA(), selectedMEs(), method= as.character(input$selectCorrelation), use="na.or.complete"));
-  
+
   names(geneModuleMembership) = paste("MM", modNames, sep="");
   geneModuleMembership
 })
@@ -194,7 +194,7 @@ geneModuleMembership <- reactive({
 geneModuleMembershipSec <- reactive({
   modNames = substring(names(selectedMEs2()), 3)
   geneModuleMembership = as.data.frame(cor(exprDatSec_WGCNA(), selectedMEs2(), method= as.character(input$selectCorrelationSec), use="na.or.complete"));
-  
+
   names(geneModuleMembership) = paste("MM", modNames, sep="");
   geneModuleMembership
 })
@@ -202,7 +202,7 @@ geneModuleMembershipSec <- reactive({
 geneModuleMembershipTer <- reactive({
   modNames = substring(names(selectedMEs3()), 3)
   geneModuleMembership = as.data.frame(cor(exprDatTer_WGCNA(), selectedMEs3(), method= as.character(input$selectCorrelationTer), use="na.or.complete"));
-  
+
   names(geneModuleMembership) = paste("MM", modNames, sep="");
   geneModuleMembership
 })
@@ -212,7 +212,7 @@ geneTraitSignificance <- reactive({
   for (i in names(sampleAnnot_2())) {
     if(length(unique(sampleAnnot_2()[,i])) > 1){
       if (is.numeric(sampleAnnot_2()[,i])){
-        env = as.data.frame(sampleAnnot_2()[,i]) 
+        env = as.data.frame(sampleAnnot_2()[,i])
       }else{
         env = as.data.frame(as.numeric(as.factor(sampleAnnot_2()[,i])))
       }
@@ -358,7 +358,7 @@ selectedCondDF <- reactive({
   pval_vector <- c()
   corr_vector <- c()
   for (condition in 1:(ncol(sampleAnnot_2()))){
-    
+
     condition_name <- colnames(sampleAnnot_2())[condition]
     if (is.numeric(sampleAnnot_2()[,condition_name])){
       moduleTraitCor = cor(selectedMEs(), sampleAnnot_2()[,condition_name], use = "p", method = input$selectCorrelation)
@@ -377,24 +377,24 @@ selectedCondDF <- reactive({
                        signif(moduleTraitPvalue, 1), ")", sep = "")
     text_matrix_vector <- c(text_matrix_vector, textMatrix)
     dim(textMatrix) = dim(moduleTraitCor)
-    
+
     # create dataframe containing the correlation and the color
     if(condition == 1){
-      
+
       Condition_df <- data.frame(moduleTraitCor)
-      
+
     }else{
-      
+
       Condition_df <- data.frame(Condition_df, moduleTraitCor)
-      
+
     }
-    
+
     melted_moduleTraitCor <- melt(moduleTraitCor)
     melted_moduleTraitCor <- data.frame(melted_moduleTraitCor, as.data.frame(substr(names(selectedMEs()), 3, 40)))
     colnames(melted_moduleTraitCor)[4] <- "color"
-    
+
   }
-  
+
   if (input$correctPval){
     pval_vector <- p.adjust(pval_vector, method = "bonferroni", n = length(pval_vector))
     text_matrix_vector <- c()
@@ -408,7 +408,7 @@ selectedCondDF <- reactive({
   melted_condition_df <- melt(Condition_df, id = 1)
   melted_condition_df$label <- as.data.frame(text_matrix_vector)
   melted_condition_df
-  
+
 })
 
 # Recalculate MEs with color labels
@@ -421,7 +421,7 @@ selectedCondDFTer <- reactive({
   pval_vector <- c()
   corr_vector <- c()
   for (condition in 1:(ncol(sampleAnnot_ter()))){
-    
+
     condition_name <- colnames(sampleAnnot_ter())[condition]
     if (is.numeric(sampleAnnot_ter()[,condition_name])){
       moduleTraitCor = cor(selectedMEs3(), sampleAnnot_ter()[,condition_name], use = "p", method = input$selectCorrelationTer)
@@ -439,18 +439,18 @@ selectedCondDFTer <- reactive({
     textMatrix = paste(signif(moduleTraitCor, 2), "\n(",
                        signif(moduleTraitPvalue, 1), ")", sep = "")
     text_matrix_vector <- c(text_matrix_vector, textMatrix)
-    
+
     dim(textMatrix) = dim(moduleTraitCor)
-    
+
     # create dataframe containing the correlation and the color
     if(condition == 1){
-      
+
       Condition_df <- data.frame(moduleTraitCor)
-      
+
     }else{
-      
+
       Condition_df <- data.frame(Condition_df, moduleTraitCor)
-      
+
     }
     if (input$correctPval3){
       pval_vector <- p.adjust(pval_vector, method = "bonferroni", n = length(pval_vector))
@@ -464,14 +464,14 @@ selectedCondDFTer <- reactive({
     melted_moduleTraitCor <- melt(moduleTraitCor)
     melted_moduleTraitCor <- data.frame(melted_moduleTraitCor, as.data.frame(substr(names(selectedMEs3()), 3, 40)))
     colnames(melted_moduleTraitCor)[4] <- "color"
-    
+
   }
-  
+
   Condition_df <- setDT(Condition_df, keep.rownames = TRUE)[]
   melted_condition_df <- melt(Condition_df, id = 1)
   melted_condition_df$label <- as.data.frame(text_matrix_vector)
   melted_condition_df
-  
+
 })
 
 # Recalculate MEs with color labels
@@ -484,7 +484,7 @@ selectedCondDFSec <- reactive({
   pval_vector <- c()
   corr_vector <- c()
   for (condition in 1:(ncol(sampleAnnot_sec_WGCNA()))){
-    
+
     condition_name <- colnames(sampleAnnot_sec_WGCNA())[condition]
     if (is.numeric(sampleAnnot_sec_WGCNA()[,condition_name])){
       moduleTraitCor = cor(selectedMEs2(), sampleAnnot_sec_WGCNA()[,condition_name], use = "p", method = input$selectCorrelationSec)
@@ -502,18 +502,18 @@ selectedCondDFSec <- reactive({
     textMatrix = paste(signif(moduleTraitCor, 2), "\n(",
                        signif(moduleTraitPvalue, 1), ")", sep = "")
     text_matrix_vector <- c(text_matrix_vector, textMatrix)
-    
+
     dim(textMatrix) = dim(moduleTraitCor)
-    
+
     # create dataframe containing the correlation and the color
     if(condition == 1){
-      
+
       Condition_df <- data.frame(moduleTraitCor)
-      
+
     }else{
-      
+
       Condition_df <- data.frame(Condition_df, moduleTraitCor)
-      
+
     }
     if (input$correctPval2){
       pval_vector <- p.adjust(pval_vector, method = "bonferroni", n = length(pval_vector))
@@ -527,14 +527,14 @@ selectedCondDFSec <- reactive({
     melted_moduleTraitCor <- melt(moduleTraitCor)
     melted_moduleTraitCor <- data.frame(melted_moduleTraitCor, as.data.frame(substr(names(selectedMEs2()), 3, 40)))
     colnames(melted_moduleTraitCor)[4] <- "color"
-    
+
   }
-  
+
   Condition_df <- setDT(Condition_df, keep.rownames = TRUE)[]
   melted_condition_df <- melt(Condition_df, id = 1)
   melted_condition_df$label <- as.data.frame(text_matrix_vector)
   melted_condition_df
-  
+
 })
 
 
@@ -543,7 +543,7 @@ selectedCondDFSec <- reactive({
 markers.data <- reactive({
   markers <- colnames(exprDat_WGCNA())[selectedDynamicColor()==input$colorModule]
   exprDat_WGCNA()[,markers]
-  
+
 })
 
 env.markers.data <- reactive({
@@ -557,7 +557,7 @@ env.markers.data <- reactive({
 })
 
 fit.object.ncomp <- reactive({
-  
+
   if (length(colnames(exprDat_WGCNA())[selectedDynamicColor()==input$colorModule]) >= 10){
     ncomp=10
   }else{
@@ -565,9 +565,9 @@ fit.object.ncomp <- reactive({
   }
   formulaChar <- paste(input$sampleAnnotSelection, "~.", sep ="")
   fit = plsr(formula(formulaChar), data=env.markers.data(), validation="LOO", method = "oscorespls", ncomp=ncomp)
-  
+
   fit
-  
+
 })
 
 fit.object <- reactive({
@@ -587,7 +587,7 @@ cvs.object <- reactive({
 })
 
 vip.df <- reactive({
-  
+
   vip = vector("numeric", ncol(markers.data())); for(j in 1:ncol(markers.data()))  vip[j] <- VIPjh(fit.object(), j, input$ncomponent)
   vip = round(vip, digits=2)
   o = order(vip, decreasing=TRUE)
@@ -606,8 +606,8 @@ vip.df <- reactive({
   pvaVn <- pvaVn[order(names(pvaVn))]
   df <- df[order(rownames(df)),]
   df$pvalue <- pvaVn
-  
-  
+
+
   df
 })
 vip.pval.df <- reactive({
@@ -627,7 +627,7 @@ vip.pval.df <- reactive({
   vip <- vip.df()
   vip <- vip[order(names(vip))]
   vip_table <- data.frame(vip = vip[,"VIP"], pvaVn = pvaVn)
-  colnames(vip_table) <- c("vip", "pvaVn") 
+  colnames(vip_table) <- c("vip", "pvaVn")
   vip_table$signi <- "NS"
   vip_table$signi[(vip_table$pvaVn<0.05 & vip_table$vip>1)] <- "S"
   vip_table
@@ -714,7 +714,7 @@ cvs.object_D2 <- reactive({
 })
 
 vip.df_D2 <- reactive({
-  
+
   vip = vector("numeric", ncol(markers.data_D2())); for(j in 1:ncol(markers.data_D2()))  vip[j] <- VIPjh(fit.object_D2(), j, input$ncomponent_D2)
   vip = round(vip, digits=2)
   o = order(vip, decreasing=TRUE)
@@ -753,7 +753,7 @@ vip.pval.df_D2 <- reactive({
   vip <- vip.df_D2()
   vip <- vip[order(names(vip))]
   vip_table <- data.frame(vip = vip[,"VIP"], pvaVn = pvaVn)
-  colnames(vip_table) <- c("vip", "pvaVn") 
+  colnames(vip_table) <- c("vip", "pvaVn")
   vip_table$signi <- "NS"
   vip_table$signi[(vip_table$pvaVn<0.05 & vip_table$vip>1)] <- "S"
   vip_table
@@ -782,7 +782,7 @@ df.hive.plot_D2 <- reactive({
   col <- paste("Temp.Cor.GS.", input$sampleAnnotSelection_D2, sep = "")
   if (input$LoadExample == "Yes"){
     Annot <- rownames(vip.df)
-    
+
   }else{
     if (input$OmicTable == "OTUs" && input$TaxonFile1){
       Annot <- taxTable1()[rownames(vip.df), input$taxAnnotSec]
@@ -846,7 +846,7 @@ cvs.object_D3 <- reactive({
 })
 
 vip.df_D3 <- reactive({
-  
+
   vip = vector("numeric", ncol(markers.data_D3())); for(j in 1:ncol(markers.data_D3()))  vip[j] <- VIPjh(fit.object_D3(), j, input$ncomponent_D3)
   vip = round(vip, digits=2)
   o = order(vip, decreasing=TRUE)
@@ -884,7 +884,7 @@ vip.pval.df_D3 <- reactive({
   vip <- vip.df_D3()
   vip <- vip[order(names(vip))]
   vip_table <- data.frame(vip = vip[,"VIP"], pvaVn = pvaVn)
-  colnames(vip_table) <- c("vip", "pvaVn") 
+  colnames(vip_table) <- c("vip", "pvaVn")
   vip_table$signi <- "NS"
   vip_table$signi[(vip_table$pvaVn<0.05 & vip_table$vip>1)] <- "S"
   vip_table
@@ -916,7 +916,7 @@ df.hive.plot_D3 <- reactive({
     }else{
       Annot <- rownames(vip.df)
     }
-  
+
   df.hive.plot <- data.frame(label = rownames(vip.df), x1 = vip.df[["VIP"]], x2 = rep(0, nrow(vip.df)), y1 = rep(0, nrow(vip.df)), y2 = vip.df[[col]], annotation = Annot)
   df.hive.plot
 })
@@ -1073,23 +1073,23 @@ observeEvent(input$vip.pval.plot_D3, {
 #### INTERFACE VARIABLES ####
 
 output$SelectVariable1 <- renderUI({
-  selectInput("selectVariable1", 
-              label = "Choose a variable: ", 
-              choices = colnames(sampleAnnot_2()), 
+  selectInput("selectVariable1",
+              label = "Choose a variable: ",
+              choices = colnames(sampleAnnot_2()),
               selected = colnames(sampleAnnot_2())[2])
 })
 
 output$SelectVariable1Sec <- renderUI({
-  selectInput("selectVariable1Sec", 
-              label = "Choose a variable: ", 
-              choices = colnames(sampleAnnot_2()), 
+  selectInput("selectVariable1Sec",
+              label = "Choose a variable: ",
+              choices = colnames(sampleAnnot_2()),
               selected = colnames(sampleAnnot_2())[2])
 })
 
 output$SelectVariable1Ter <- renderUI({
-  selectInput("selectVariable1Ter", 
-              label = "Choose a variable: ", 
-              choices = colnames(sampleAnnot_2()), 
+  selectInput("selectVariable1Ter",
+              label = "Choose a variable: ",
+              choices = colnames(sampleAnnot_2()),
               selected = colnames(sampleAnnot_2())[2])
 })
 
@@ -1134,44 +1134,44 @@ output$colorModule_D3 <-  renderUI({
 })
 
 output$SelectVariable_barplot <- renderUI({
-  selectInput("selectVariable_barplot", 
-              label = "Choose a variable: ", 
-              choices = c("unordered", colnames(sampleAnnot_2())), 
+  selectInput("selectVariable_barplot",
+              label = "Choose a variable: ",
+              choices = c("unordered", colnames(sampleAnnot_2())),
               selected = "unordered")
 })
 
 output$SelectVariable_barplotSec <- renderUI({
-  selectInput("selectVariable_barplotSec", 
-              label = "Choose a variable: ", 
-              choices = c("unordered", colnames(sampleAnnot_2())), 
+  selectInput("selectVariable_barplotSec",
+              label = "Choose a variable: ",
+              choices = c("unordered", colnames(sampleAnnot_2())),
               selected = "unordered")
 })
 
 output$SelectVariable_barplotTer <- renderUI({
-  selectInput("selectVariable_barplotTer", 
-              label = "Choose a variable: ", 
-              choices = c("unordered", colnames(sampleAnnot_2())), 
+  selectInput("selectVariable_barplotTer",
+              label = "Choose a variable: ",
+              choices = c("unordered", colnames(sampleAnnot_2())),
               selected = "unordered")
 })
 
 output$SelectVariable_RelAb <- renderUI({
-  selectInput("selectVariable_RelAb", 
-              label = "Choose a variable: ", 
-              choices = c("unordered", colnames(sampleAnnot_2())),  
+  selectInput("selectVariable_RelAb",
+              label = "Choose a variable: ",
+              choices = c("unordered", colnames(sampleAnnot_2())),
               selected = "unordered")
 })
 
 output$SelectVariable_RelAbSec <- renderUI({
-  selectInput("selectVariable_RelAbSec", 
-              label = "Choose a variable: ", 
-              choices = c("unordered", colnames(sampleAnnot_2())),  
+  selectInput("selectVariable_RelAbSec",
+              label = "Choose a variable: ",
+              choices = c("unordered", colnames(sampleAnnot_2())),
               selected = "unordered")
 })
 
 output$SelectVariable_RelAbTer <- renderUI({
-  selectInput("selectVariable_RelAbTer", 
-              label = "Choose a variable: ", 
-              choices = c("unordered", colnames(sampleAnnot_2())),  
+  selectInput("selectVariable_RelAbTer",
+              label = "Choose a variable: ",
+              choices = c("unordered", colnames(sampleAnnot_2())),
               selected = "unordered")
 })
 
@@ -1242,18 +1242,18 @@ output$SelectTaxo1Ter <- renderUI({
 output$Sample_Contribution <- renderPlot({
   moduleName <- input$selectModule
   MODS <- paste("ME", input$selectModule, sep = "")
-  
-  MEs_barplot <- 
+
+  MEs_barplot <-
     ggplot(data = MEs_ordered(), aes_string(x = "sampleName", y = MODS )) +
-    geom_bar(stat = "identity", fill = moduleName) + 
+    geom_bar(stat = "identity", fill = moduleName) +
     theme_bw() +
     theme(axis.text.x = element_text(angle = 90, hjust = 1))
   if (input$selectVariable_barplot != "unordered"){
-    sampleCurve <- 
-      ggplot(data = sampleAnnot_ordered(), aes_string(x = "sampleName", y = input$selectVariable_barplot, group = 1)) + 
-      geom_point() + 
+    sampleCurve <-
+      ggplot(data = sampleAnnot_ordered(), aes_string(x = "sampleName", y = input$selectVariable_barplot, group = 1)) +
+      geom_point() +
       theme_bw() +
-      geom_line() + 
+      geom_line() +
       theme(axis.text.x = element_text(angle = 90, hjust = 1))
     plot_grid(MEs_barplot, sampleCurve, labels = c("A", "B"), nrow = 2, align = "v")
   }else{
@@ -1265,7 +1265,7 @@ output$Sample_Contribution <- renderPlot({
 output$Sample_ContributionSec <- renderPlot({
   moduleName <- input$selectModuleSec
   MODS <- paste("ME", input$selectModuleSec, sep = "")
-  
+
   MEs_barplotSec <-
     ggplot(data = MEs_orderedSec(), aes_string(x = "sampleName", y = MODS )) +
     geom_bar(stat = "identity", fill = moduleName) +
@@ -1288,7 +1288,7 @@ output$Sample_ContributionSec <- renderPlot({
 output$Sample_ContributionTer <- renderPlot({
   moduleName <- input$selectModuleTer
   MODS <- paste("ME", input$selectModuleTer, sep = "")
-  
+
   MEs_barplotTer <-
     ggplot(data = MEs_orderedTer(), aes_string(x = "sampleName", y = MODS )) +
     geom_bar(stat = "identity", fill = moduleName) +
@@ -1336,13 +1336,13 @@ output$Relative_Abundance_ModuleTer <- renderPlot({
 # Relate Modules to External Trait
 
 output$Corr_External_Trait <- renderPlot({
-  ggplot(data = selectedCondDF(), aes(x = rn, y = variable, fill = value)) + 
+  ggplot(data = selectedCondDF(), aes(x = rn, y = variable, fill = value)) +
     geom_tile(color = "white") +
-    scale_fill_gradient2(low = "blue", high = "red", mid = "white", 
-                         midpoint = 0, limit = c(-1,1), space = "Lab", 
+    scale_fill_gradient2(low = "blue", high = "red", mid = "white",
+                         midpoint = 0, limit = c(-1,1), space = "Lab",
                          name=paste("Module\n Conditions \nCorrelation"))+
     theme_minimal() +
-    theme(axis.text.x = element_text(angle = 45, vjust = 1, 
+    theme(axis.text.x = element_text(angle = 45, vjust = 1,
                                      size = 10, hjust = 1))+
     geom_text(aes(label = label), color = "black", size = 3) +
     coord_fixed() +
@@ -1422,7 +1422,7 @@ output$Module_MembershipTer <- renderPlot({
     geom_density_2d(color = '#E69F00')
 })
 
-#### VIP and PLS 
+#### VIP and PLS
 
 output$PLS <- renderPlot({
   predplot(fit.object(), main=paste("Cor. in LOO CV:",cvs.object()), col="blue", cex=0.5)
@@ -1441,7 +1441,7 @@ output$summaryFit <- renderText({
   print(summary(fit.object()))
 })
 
-#### HIVE PLOT 
+#### HIVE PLOT
 output$edge_node <- renderPlot({
   df_hive<-df.hive.to.plot()
   if (length(unique(df_hive$annotation)) > 20){    #edge_to_node()
@@ -1449,34 +1449,34 @@ output$edge_node <- renderPlot({
       geom_point(data = df.hive.plot(), aes(x1, y1, size = 3, color = "grey")) + # x1 is the VIP
       geom_text(data = df.hive.plot(), vjust = 0.5, angle = 45, aes(x1, y1, label = annotation)) +
       geom_point(data = df.hive.plot(), aes(x2, abs(y2), size = 3, color = "grey")) + # y2 is the correlation to the pH at time of filtering
-      geom_text(data = df.hive.plot(), hjust = 0.5, angle = 45, aes(x2,abs(y2), label = annotation)) +      
+      geom_text(data = df.hive.plot(), hjust = 0.5, angle = 45, aes(x2,abs(y2), label = annotation)) +
       geom_curve(data = df.hive.to.plot(), curvature = 0.2, color = "grey ", size = 0.2,aes(x = vector_x, y = vector_y, xend = vector_xend, yend = abs(vector_yend))) +
       theme(legend.position = "none") +
       theme_gdocs() +
       labs(x = "VIP", y = paste("Spearman Correlation to", input$sampleAnnotSelection), colour = "Annotation")
-    
+
   }else{
     #edge_to_node()
     ggplot() +
       geom_point(data = df.hive.plot(), aes(x1, y1, color = annotation, size = 3)) + # x1 is the VIP
       geom_text(data = df.hive.plot(), vjust = 0.5, angle = 45, aes(x1, y1, label = annotation)) +
       geom_point(data = df.hive.plot(), aes(x2, abs(y2), color = annotation, size = 3)) + # y2 is the correlation to the pH at time of filtering
-      geom_text(data = df.hive.plot(), hjust = 0.5, angle = 45, aes(x2,abs(y2), label = annotation)) +      
+      geom_text(data = df.hive.plot(), hjust = 0.5, angle = 45, aes(x2,abs(y2), label = annotation)) +
       geom_curve(data = df.hive.to.plot(), curvature = 0.2, color = "grey ", size = 0.2,aes(x = vector_x, y = vector_y, xend = vector_xend, yend = abs(vector_yend))) +
       theme_gdocs() +
       scale_colour_tableau(palette = "Tableau 20") +
       labs(x = "VIP", y = paste("Spearman Correlation to", input$sampleAnnotSelection), colour = "Annotation")
-    
+
   }
-  
+
 })
 
 output$vip.pval <- renderPlot({
   if (input$showNames == 0){
     ggplot(vip.pval.df(), aes(x = pvaVn, y = vip)) +
       geom_point(aes(color=factor(signi)), alpha=1/2, size=1) +
-      scale_color_manual(values=c(NS="grey30", S="red2"), 
-                         labels=c(NS="NS", 
+      scale_color_manual(values=c(NS="grey30", S="red2"),
+                         labels=c(NS="NS",
                                   FC_FDR=paste("Adjust pval < 0.05 & VIP > 1", sep=""))) +
       #Add a horizontal line for VIP cutoff
       geom_vline(xintercept=0.05, linetype="longdash", colour="black", size=0.4) +
@@ -1495,8 +1495,8 @@ output$vip.pval <- renderPlot({
     }
     ggplot(vip_table, aes(x = pvaVn, y = vip)) +
       geom_point(aes(color=factor(signi)), alpha=1/2, size=1) +
-      scale_color_manual(values=c(NS="grey30", S="red2"), 
-                         labels=c(NS="NS", 
+      scale_color_manual(values=c(NS="grey30", S="red2"),
+                         labels=c(NS="NS",
                                   FC_FDR=paste("Adjust pval < 0.05 & VIP > 1", sep=""))) +
       #Add a horizontal line for VIP cutoff
       geom_vline(xintercept=0.05, linetype="longdash", colour="black", size=0.4) +
@@ -1520,8 +1520,8 @@ output$vip.pval_D2 <- renderPlot({
   if (input$showNames_D2 == 0){
     ggplot(vip.pval.df_D2(), aes(x = pvaVn, y = vip)) +
       geom_point(aes(color=factor(signi)), alpha=1/2, size=1) +
-      scale_color_manual(values=c(NS="grey30", S="red2"), 
-                         labels=c(NS="NS", 
+      scale_color_manual(values=c(NS="grey30", S="red2"),
+                         labels=c(NS="NS",
                                   FC_FDR=paste("Adjust pval < 0.05 & VIP > 1", sep=""))) +
       #Add a horizontal line for VIP cutoff
       geom_vline(xintercept=0.05, linetype="longdash", colour="black", size=0.4) +
@@ -1540,8 +1540,8 @@ output$vip.pval_D2 <- renderPlot({
     }
     ggplot(vip_table, aes(x = pvaVn, y = vip)) +
       geom_point(aes(color=factor(signi)), alpha=1/2, size=1) +
-      scale_color_manual(values=c(NS="grey30", S="red2"), 
-                         labels=c(NS="NS", 
+      scale_color_manual(values=c(NS="grey30", S="red2"),
+                         labels=c(NS="NS",
                                   FC_FDR=paste("Adjust pval < 0.05 & VIP > 1", sep=""))) +
       #Add a horizontal line for VIP cutoff
       geom_vline(xintercept=0.05, linetype="longdash", colour="black", size=0.4) +
@@ -1566,8 +1566,8 @@ output$vip.pval_D3 <- renderPlot({
   if (input$showNames_D3 == 0){
     ggplot(vip.pval.df_D3(), aes(x = pvaVn, y = vip)) +
       geom_point(aes(color=factor(signi)), alpha=1/2, size=1) +
-      scale_color_manual(values=c(NS="grey30", S="red2"), 
-                         labels=c(NS="NS", 
+      scale_color_manual(values=c(NS="grey30", S="red2"),
+                         labels=c(NS="NS",
                                   FC_FDR=paste("Adjust pval < 0.05 & VIP > 1", sep=""))) +
       #Add a horizontal line for VIP cutoff
       geom_vline(xintercept=0.05, linetype="longdash", colour="black", size=0.4) +
@@ -1586,8 +1586,8 @@ output$vip.pval_D3 <- renderPlot({
     }
     ggplot(vip_table, aes(x = pvaVn, y = vip)) +
       geom_point(aes(color=factor(signi)), alpha=1/2, size=1) +
-      scale_color_manual(values=c(NS="grey30", S="red2"), 
-                         labels=c(NS="NS", 
+      scale_color_manual(values=c(NS="grey30", S="red2"),
+                         labels=c(NS="NS",
                                   FC_FDR=paste("Adjust pval < 0.05 & VIP > 1", sep=""))) +
       #Add a horizontal line for VIP cutoff
       geom_vline(xintercept=0.05, linetype="longdash", colour="black", size=0.4) +
@@ -1606,7 +1606,7 @@ output$vip.pval_D3 <- renderPlot({
   }
 })
 
-#### VIP and PLS 
+#### VIP and PLS
 
 output$PLS_D2 <- renderPlot({
   predplot(fit.object_D2(), main=paste("Cor. in LOO CV:",cvs.object_D2()), col="blue", cex=0.5)
@@ -1625,7 +1625,7 @@ output$summaryFit_D2 <- renderText({
   print(summary(fit.object_D2()))
 })
 
-#### HIVE PLOT 
+#### HIVE PLOT
 output$edge_node_D2 <- renderPlot({
   df_hive <- df.hive.plot_D2()
   if (length(unique(df_hive$annotation)) > 20){
@@ -1638,7 +1638,7 @@ output$edge_node_D2 <- renderPlot({
       theme_gdocs() +
       theme(legend.position = "none") +
       labs(x = "VIP", y = paste("Spearman Correlation to", input$sampleAnnotSelection_D2), colour = "Annotations")
-    
+
   }else{
     ggplot() +
       geom_point(data = df.hive.plot_D2(), aes(x1, y1, color = annotation, size = 3)) + # x1 is the VIP
@@ -1650,12 +1650,12 @@ output$edge_node_D2 <- renderPlot({
       scale_colour_tableau(palette = "Tableau 20") +
       labs(x = "VIP", y = paste("Spearman Correlation to", input$sampleAnnotSelection_D2), colour = "Annotations")
 
-    
+
   }
 
 })
 
-#### VIP and PLS 
+#### VIP and PLS
 
 output$PLS_D3 <- renderPlot({
   predplot(fit.object_D3(), main=paste("Cor. in LOO CV:",cvs.object_D3()), col="blue", cex=0.5)
@@ -1674,7 +1674,7 @@ output$summaryFit_D3 <- renderText({
   print(summary(fit.object_D3()))
 })
 
-#### HIVE PLOT 
+#### HIVE PLOT
 output$edge_node_D3 <- renderPlot({
   df_hive <- df.hive.plot_D3()
   if (length(unique(df_hive$annotation)) > 20){
@@ -1687,7 +1687,7 @@ output$edge_node_D3 <- renderPlot({
       theme_gdocs() +
       theme(legend.position = "none") +
       labs(x = "VIP", y = paste("Spearman Correlation to", input$sampleAnnotSelection_D3), colour = "Annotations")
-    
+
   }else{
     ggplot() +
       geom_point(data = df.hive.plot_D3(), aes(x1, y1, color = annotation, size = 3)) + # x1 is the VIP
@@ -1698,10 +1698,10 @@ output$edge_node_D3 <- renderPlot({
       theme_gdocs() +
       scale_colour_tableau(palette = "Tableau 20") +
       labs(x = "VIP", y = paste("Spearman Correlation to", input$sampleAnnotSelection_D3), colour = "Annotations")
-    
-    
+
+
   }
-  
+
 })
 
 
@@ -1757,21 +1757,21 @@ output$Download_Network_Exploration <- downloadHandler(
               labs(x = paste("Module Membership in", input$selectModule, "module"), y = paste("OTU significance for", input$selectVariable1),
                    title = paste("Module membership vs. gene significance\n", textModuleMembership() ,sep = "")) +
               geom_density_2d(color = '#E69F00'))
-      
+
       dev.off()
       fs <- c(fs, paste("Module_", input$selectModule ,"_Corr_Vs_Membership.pdf", sep=""))
       if (input$TaxonFile || input$LoadExample == "Yes"){
         pdf(paste("Module_", input$selectModule ,"_Relative_Abundance.pdf", sep=""), width = input$widthPDF, height = input$heightPDF)
-        
+
         print(ggplot(module_Relative_abundance(), aes_string(x = "variable", y = "value", fill = input$selectTaxo2)) +
                 geom_bar(stat = "identity") +
                 labs(x = "Samples", y = "Relative Abundance", title = paste("Relative abundance at the ", input$selectTaxo2, " Taxonomic level of the ", input$selectModule, " module.", sep = "")) +
                 theme(axis.text.x = element_text(angle = 90, hjust = 1)))
-        
+
         dev.off()
         fs <- c(fs, paste("Module_", input$selectModule ,"_Relative_Abundance.pdf", sep=""))
       }
-      
+
       pdf("Module_Correlation_External_Trait.pdf", width = input$widthPDF, height = input$heightPDF)
       print(ggplot(data = selectedCondDF(), aes(x = rn, y = variable, fill = value)) +
               geom_tile(color = "white") +
@@ -1802,21 +1802,21 @@ output$Download_Network_Exploration <- downloadHandler(
               labs(x = paste("Module Membership in", input$selectModule, "module"), y = paste("OTU significance for", input$selectVariable1),
                    title = paste("Module membership vs. gene significance\n", textModuleMembership() ,sep = "")) +
               geom_density_2d(color = '#E69F00'))
-      
+
       dev.off()
       fs <- c(fs, paste("Module_", input$selectModule ,"_Corr_Vs_Membership.svg", sep=""))
       if (input$TaxonFile || input$LoadExample == "Yes"){
         svg(paste("Module_", input$selectModule ,"_Relative_Abundance.svg", sep=""), width = input$widthPDF, height = input$heightPDF)
-        
+
         print(ggplot(module_Relative_abundance(), aes_string(x = "variable", y = "value", fill = input$selectTaxo2)) +
                 geom_bar(stat = "identity") +
                 labs(x = "Samples", y = "Relative Abundance", title = paste("Relative abundance at the ", input$selectTaxo2, " Taxonomic level of the ", input$selectModule, " module.", sep = "")) +
                 theme(axis.text.x = element_text(angle = 90, hjust = 1)))
-        
+
         dev.off()
         fs <- c(fs, paste("Module_", input$selectModule ,"_Relative_Abundance.svg", sep=""))
       }
-      
+
       svg("Module_Correlation_External_Trait.svg", width = input$widthPDF, height = input$heightPDF)
       print(ggplot(data = selectedCondDF(), aes(x = rn, y = variable, fill = value)) +
               geom_tile(color = "white") +
@@ -1833,9 +1833,9 @@ output$Download_Network_Exploration <- downloadHandler(
       dev.off()
       fs <- c(fs, "Module_Correlation_External_Trait.svg")
     }
-    
+
     zip(zipfile=filename, files=fs)
-    
+
   },
   contentType = "application/zip")
 
@@ -1849,7 +1849,7 @@ output$PLS_VIP <- downloadHandler(
     if (input$LoadExample == "Yes" || input$TaxonFile || input$TaxonFile1){
       taxTable <- taxTable1()[which(rownames(taxTable1()) %in% rownames(vip)),]
       taxTable <- taxTable[match(rownames(taxTable),rownames(vip)),]
-      
+
       vip_taxAnnot <- merge(vip, taxTable, by=0, all=TRUE)
     }else{
       vip_taxAnnot <- vip
@@ -1873,7 +1873,7 @@ output$hivePlot_D1 <- downloadHandler(
                   geom_point(data = df.hive.plot(), aes(x1, y1, color = annotation, size = 3)) + # x1 is the VIP
                   geom_text(data = df.hive.plot(), vjust = 0.5, angle = 45, aes(x1, y1, label = annotation)) +
                   geom_point(data = df.hive.plot(), aes(x2, abs(y2), color = annotation, size = 3)) + # y2 is the correlation to the pH at time of filtering
-                  geom_text(data = df.hive.plot(), hjust = 0.5, angle = 45, aes(x2,abs(y2), label = annotation)) +      
+                  geom_text(data = df.hive.plot(), hjust = 0.5, angle = 45, aes(x2,abs(y2), label = annotation)) +
                   geom_curve(data = df.hive.to.plot(), curvature = 0.2, color = "grey ", size = 0.2,aes(x = vector_x, y = vector_y, xend = vector_xend, yend = abs(vector_yend))) +
                   theme_gdocs() +
                   scale_colour_tableau(palette = "Tableau 20") +
@@ -1881,12 +1881,12 @@ output$hivePlot_D1 <- downloadHandler(
         dev.off()
         fs <- c(fs, "HIVE.pdf")
         pdf("vip_pval.pdf", width = input$HIVEwidthPDF, height = input$HIVEheightPDF)
-        
+
         if (input$showNames == 0){
          print( ggplot(vip.pval.df(), aes(x = pvaVn, y = vip)) +
             geom_point(aes(color=factor(signi)), alpha=1/2, size=1) +
-            scale_color_manual(values=c(NS="grey30", S="red2"), 
-                               labels=c(NS="NS", 
+            scale_color_manual(values=c(NS="grey30", S="red2"),
+                               labels=c(NS="NS",
                                         FC_FDR=paste("Adjust pval < 0.05 & VIP > 1", sep=""))) +
             #Add a horizontal line for VIP cutoff
             geom_vline(xintercept=0.05, linetype="longdash", colour="black", size=0.4) +
@@ -1905,8 +1905,8 @@ output$hivePlot_D1 <- downloadHandler(
           }
           print(ggplot(vip_table, aes(x = pvaVn, y = vip)) +
             geom_point(aes(color=factor(signi)), alpha=1/2, size=1) +
-            scale_color_manual(values=c(NS="grey30", S="red2"), 
-                               labels=c(NS="NS", 
+            scale_color_manual(values=c(NS="grey30", S="red2"),
+                               labels=c(NS="NS",
                                         FC_FDR=paste("Adjust pval < 0.05 & VIP > 1", sep=""))) +
             #Add a horizontal line for VIP cutoff
             geom_vline(xintercept=0.05, linetype="longdash", colour="black", size=0.4) +
@@ -1925,16 +1925,16 @@ output$hivePlot_D1 <- downloadHandler(
         }
         dev.off()
         fs <- c(fs, "vip_pval.pdf")
-        
+
     }else{
 
       svg("HIVE.svg", width = input$HIVEwidthPDF, height = input$HIVEwidthPDF)
-      
+
       print(  ggplot() +
                 geom_point(data = df.hive.plot(), aes(x1, y1, color = annotation, size = 3)) + # x1 is the VIP
                 geom_text(data = df.hive.plot(), vjust = 0.5, angle = 45, aes(x1, y1, label = annotation)) +
                 geom_point(data = df.hive.plot(), aes(x2, abs(y2), color = annotation, size = 3)) + # y2 is the correlation to the pH at time of filtering
-                geom_text(data = df.hive.plot(), hjust = 0.5, angle = 45, aes(x2,abs(y2), label = annotation)) +      
+                geom_text(data = df.hive.plot(), hjust = 0.5, angle = 45, aes(x2,abs(y2), label = annotation)) +
                 geom_curve(data = df.hive.to.plot(), curvature = 0.2, color = "grey ", size = 0.2,aes(x = vector_x, y = vector_y, xend = vector_xend, yend = abs(vector_yend))) +
                 theme_gdocs() +
                 scale_colour_tableau(palette = "Tableau 20") +
@@ -1942,12 +1942,12 @@ output$hivePlot_D1 <- downloadHandler(
       dev.off()
       fs <- c(fs, "HIVE.svg")
       pdf("vip_pval.svg", width = input$HIVEwidthPDF, height = input$HIVEheightPDF)
-      
+
       if (input$showNames == 0){
         print( ggplot(vip.pval.df(), aes(x = pvaVn, y = vip)) +
                  geom_point(aes(color=factor(signi)), alpha=1/2, size=1) +
-                 scale_color_manual(values=c(NS="grey30", S="red2"), 
-                                    labels=c(NS="NS", 
+                 scale_color_manual(values=c(NS="grey30", S="red2"),
+                                    labels=c(NS="NS",
                                              FC_FDR=paste("Adjust pval < 0.05 & VIP > 1", sep=""))) +
                  #Add a horizontal line for VIP cutoff
                  geom_vline(xintercept=0.05, linetype="longdash", colour="black", size=0.4) +
@@ -1966,8 +1966,8 @@ output$hivePlot_D1 <- downloadHandler(
         }
         print(ggplot(vip_table, aes(x = pvaVn, y = vip)) +
                 geom_point(aes(color=factor(signi)), alpha=1/2, size=1) +
-                scale_color_manual(values=c(NS="grey30", S="red2"), 
-                                   labels=c(NS="NS", 
+                scale_color_manual(values=c(NS="grey30", S="red2"),
+                                   labels=c(NS="NS",
                                             FC_FDR=paste("Adjust pval < 0.05 & VIP > 1", sep=""))) +
                 #Add a horizontal line for VIP cutoff
                 geom_vline(xintercept=0.05, linetype="longdash", colour="black", size=0.4) +
@@ -1987,31 +1987,31 @@ output$hivePlot_D1 <- downloadHandler(
       dev.off()
       fs <- c(fs, "vip_pval.svg")
 
-      
+
     }
-    
+
     zip(zipfile=filename, files=fs)
-    
+
   },
   contentType = "application/zip")
 
-#### PLS 
+#### PLS
 output$PLS_VIP_D2 <- downloadHandler(
   filename = function(){
     paste(input$sampleAnnotSelection_D2, "_", input$colorModule_D2, "markers.vip_D2.csv", sep="")
   },
   content = function (filename){
-    
+
     vip <- vip.df_D2()
     if (input$TaxonFile1){
       taxTable <- taxTable1()[which(rownames(taxTable1()) %in% rownames(vip)),]
       taxTable <- taxTable[match(rownames(taxTable),rownames(vip)),]
-      
+
       vip_taxAnnot <- merge(vip, taxTable, by=0, all=TRUE)
     }else{
       vip_taxAnnot <- vip
     }
-    
+
     write.csv(vip_taxAnnot, filename)
   }
 )
@@ -2026,26 +2026,26 @@ output$hivePlot_D2 <- downloadHandler(
     setwd(tempdir())
     if (input$pdf_or_svg_hiveD2_p4 == "pdf"){
       pdf("HIVE_D2.pdf", width = input$HIVED2widthPDF, height = input$HIVED2heightPDF)
-      
+
       print(  ggplot() +
                 geom_point(data = df.hive.plot_D2(), aes(x1, y1, color = annotation, size = 3)) + # x1 is the VIP
                 geom_text(data = df.hive.plot_D2(), vjust = 0.5, angle = 45, aes(x1, y1, label = annotation)) +
                 geom_point(data = df.hive.plot_D2(), aes(x2, abs(y2), color = annotation, size = 3)) + # y2 is the correlation to the pH at time of filtering
-                geom_text(data = df.hive.plot_D2(), hjust = 0.5, angle = 45, aes(x2,abs(y2), label = annotation)) +      
+                geom_text(data = df.hive.plot_D2(), hjust = 0.5, angle = 45, aes(x2,abs(y2), label = annotation)) +
                 geom_curve(data = df.hive.to.plot_D2(), curvature = 0.2, color = "grey ", size = 0.2,aes(x = vector_x, y = vector_y, xend = vector_xend, yend = abs(vector_yend))) +
                 theme_gdocs() +
                 scale_colour_tableau(palette = "Tableau 20") +
                 labs(x = "VIP", y = paste("Spearman Correlation to", input$sampleAnnotSelection_D2), colour = "Annotation"))
       dev.off()
       fs <- c(fs, "HIVE_D2.pdf")
-      
+
       pdf("vip_pval_D2.pdf", width = input$HIVED2widthPDF, height = input$HIVED2heightPDF)
-      
+
       if (input$showNames_D2 == 0){
         print(ggplot(vip.pval.df_D2(), aes(x = pvaVn, y = vip)) +
           geom_point(aes(color=factor(signi)), alpha=1/2, size=1) +
-          scale_color_manual(values=c(NS="grey30", S="red2"), 
-                             labels=c(NS="NS", 
+          scale_color_manual(values=c(NS="grey30", S="red2"),
+                             labels=c(NS="NS",
                                       FC_FDR=paste("Adjust pval < 0.05 & VIP > 1", sep=""))) +
           #Add a horizontal line for VIP cutoff
           geom_vline(xintercept=0.05, linetype="longdash", colour="black", size=0.4) +
@@ -2064,8 +2064,8 @@ output$hivePlot_D2 <- downloadHandler(
         }
         print(ggplot(vip_table, aes(x = pvaVn, y = vip)) +
           geom_point(aes(color=factor(signi)), alpha=1/2, size=1) +
-          scale_color_manual(values=c(NS="grey30", S="red2"), 
-                             labels=c(NS="NS", 
+          scale_color_manual(values=c(NS="grey30", S="red2"),
+                             labels=c(NS="NS",
                                       FC_FDR=paste("Adjust pval < 0.05 & VIP > 1", sep=""))) +
           #Add a horizontal line for VIP cutoff
           geom_vline(xintercept=0.05, linetype="longdash", colour="black", size=0.4) +
@@ -2084,30 +2084,30 @@ output$hivePlot_D2 <- downloadHandler(
       }
       dev.off()
       fs <- c(fs, "vip_pval_D2.pdf")
-      
+
     }else{
-      
+
       svg("HIVE_D2.svg", width = input$HIVED2widthPDF, height = input$HIVED2widthPDF)
-      
+
       print(  ggplot() +
                 geom_point(data = df.hive.plot(), aes(x1, y1, color = annotation, size = 3)) + # x1 is the VIP
                 geom_text(data = df.hive.plot(), vjust = 0.5, angle = 45, aes(x1, y1, label = annotation)) +
                 geom_point(data = df.hive.plot(), aes(x2, abs(y2), color = annotation, size = 3)) + # y2 is the correlation to the pH at time of filtering
-                geom_text(data = df.hive.plot(), hjust = 0.5, angle = 45, aes(x2,abs(y2), label = annotation)) +      
+                geom_text(data = df.hive.plot(), hjust = 0.5, angle = 45, aes(x2,abs(y2), label = annotation)) +
                 geom_curve(data = df.hive.to.plot(), curvature = 0.2, color = "grey ", size = 0.2,aes(x = vector_x, y = vector_y, xend = vector_xend, yend = abs(vector_yend))) +
                 theme_gdocs() +
                 scale_colour_tableau(palette = "Tableau 20") +
                 labs(x = "VIP", y = paste("Spearman Correlation to", input$sampleAnnotSelection), colour = "Annotation"))
       dev.off()
       fs <- c(fs, "HIVE_D2.svg")
-      
+
       svg("vip_pval_D2.svg", width = input$HIVED2widthPDF, height = input$HIVED2heightPDF)
-      
+
       if (input$showNames_D2 == 0){
         print(ggplot(vip.pval.df_D2(), aes(x = pvaVn, y = vip)) +
                 geom_point(aes(color=factor(signi)), alpha=1/2, size=1) +
-                scale_color_manual(values=c(NS="grey30", S="red2"), 
-                                   labels=c(NS="NS", 
+                scale_color_manual(values=c(NS="grey30", S="red2"),
+                                   labels=c(NS="NS",
                                             FC_FDR=paste("Adjust pval < 0.05 & VIP > 1", sep=""))) +
                 #Add a horizontal line for VIP cutoff
                 geom_vline(xintercept=0.05, linetype="longdash", colour="black", size=0.4) +
@@ -2126,8 +2126,8 @@ output$hivePlot_D2 <- downloadHandler(
         }
         print(ggplot(vip_table, aes(x = pvaVn, y = vip)) +
                 geom_point(aes(color=factor(signi)), alpha=1/2, size=1) +
-                scale_color_manual(values=c(NS="grey30", S="red2"), 
-                                   labels=c(NS="NS", 
+                scale_color_manual(values=c(NS="grey30", S="red2"),
+                                   labels=c(NS="NS",
                                             FC_FDR=paste("Adjust pval < 0.05 & VIP > 1", sep=""))) +
                 #Add a horizontal line for VIP cutoff
                 geom_vline(xintercept=0.05, linetype="longdash", colour="black", size=0.4) +
@@ -2146,65 +2146,36 @@ output$hivePlot_D2 <- downloadHandler(
       }
       dev.off()
       fs <- c(fs, "vip_pval_D2.svg")
-      
-      
+
+
     }
-    
+
     zip(zipfile=filename, files=fs)
-    
+
   },
   contentType = "application/zip")
 
-#### PLS 
+#### PLS
 output$PLS_VIP_D3 <- downloadHandler(
   filename = function(){
     paste(input$sampleAnnotSelection_D3, "_", input$colorModule_D3, "markers.vip_D3.csv", sep="")
   },
   content = function (filename){
-    
+
     vip <- vip.df_D3()
     if (input$TaxonFile1){
       taxTable <- taxTable1()[which(rownames(taxTable1()) %in% rownames(vip)),]
       taxTable <- taxTable[match(rownames(taxTable),rownames(vip)),]
-      
+
       vip_taxAnnot <- merge(vip, taxTable, by=0, all=TRUE)
     }else{
       vip_taxAnnot <- vip
     }
-    
-    write.csv(vip_taxAnnot, filename)
-  }
-)
 
-output$edge_node_D1 <- downloadHandler(
-  filename = function(){
-    paste(input$colorModule, "markers.vip_D1.csv", sep="")
-  },
-  content = function (filename){
-    
-    write.csv(edge_node_D1(), filename)
-  }
-)
-
-output$edge_node_D2 <- downloadHandler(
-  filename = function(){
-    paste(input$colorModule_D2, "markers.vip_D2.csv", sep="")
-  },
-  content = function (filename){
-    
-    write.csv(edge_node_D2(), filename)
+    write.csv(vip_taxAnnot, filename)
   }
 )
 
-output$edge_node_D3 <- downloadHandler(
-  filename = function(){
-    paste(input$colorModule_D3, "markers.vip_D3.csv", sep="")
-  },
-  content = function (filename){
-    
-    write.csv(edge_node_D3(), filename)
-  }
-)
 
 
 output$hivePlot_D3 <- downloadHandler(
@@ -2217,26 +2188,26 @@ output$hivePlot_D3 <- downloadHandler(
     setwd(tempdir())
     if (input$pdf_or_svg_hiveD3_p4 == "pdf"){
       pdf("HIVE_D3.pdf", width = input$HIVED3widthPDF, height = input$HIVED3heightPDF)
-      
+
       print(  ggplot() +
                 geom_point(data = df.hive.plot_D3(), aes(x1, y1, color = annotation, size = 3)) + # x1 is the VIP
                 geom_text(data = df.hive.plot_D3(), vjust = 0.5, angle = 45, aes(x1, y1, label = annotation)) +
                 geom_point(data = df.hive.plot_D3(), aes(x2, abs(y2), color = annotation, size = 3)) + # y2 is the correlation to the pH at time of filtering
-                geom_text(data = df.hive.plot_D3(), hjust = 0.5, angle = 45, aes(x2,abs(y2), label = annotation)) +      
+                geom_text(data = df.hive.plot_D3(), hjust = 0.5, angle = 45, aes(x2,abs(y2), label = annotation)) +
                 geom_curve(data = df.hive.to.plot_D3(), curvature = 0.2, color = "grey ", size = 0.2,aes(x = vector_x, y = vector_y, xend = vector_xend, yend = abs(vector_yend))) +
                 theme_gdocs() +
                 scale_colour_tableau(palette = "Tableau 20") +
                 labs(x = "VIP", y = paste("Spearman Correlation to", input$sampleAnnotSelection_D3), colour = "Annotation"))
       dev.off()
       fs <- c(fs, "HIVE_D3.pdf")
-      
+
       pdf("vip_pval_D3.pdf", width = input$HIVED3widthPDF, height = input$HIVED3heightPDF)
-      
+
       if (input$showNames_D3 == 0){
         print(ggplot(vip.pval.df_D3(), aes(x = pvaVn, y = vip)) +
           geom_point(aes(color=factor(signi)), alpha=1/2, size=1) +
-          scale_color_manual(values=c(NS="grey30", S="red2"), 
-                             labels=c(NS="NS", 
+          scale_color_manual(values=c(NS="grey30", S="red2"),
+                             labels=c(NS="NS",
                                       FC_FDR=paste("Adjust pval < 0.05 & VIP > 1", sep=""))) +
           #Add a horizontal line for VIP cutoff
           geom_vline(xintercept=0.05, linetype="longdash", colour="black", size=0.4) +
@@ -2255,8 +2226,8 @@ output$hivePlot_D3 <- downloadHandler(
         }
         print(ggplot(vip_table, aes(x = pvaVn, y = vip)) +
           geom_point(aes(color=factor(signi)), alpha=1/2, size=1) +
-          scale_color_manual(values=c(NS="grey30", S="red2"), 
-                             labels=c(NS="NS", 
+          scale_color_manual(values=c(NS="grey30", S="red2"),
+                             labels=c(NS="NS",
                                       FC_FDR=paste("Adjust pval < 0.05 & VIP > 1", sep=""))) +
           #Add a horizontal line for VIP cutoff
           geom_vline(xintercept=0.05, linetype="longdash", colour="black", size=0.4) +
@@ -2275,30 +2246,30 @@ output$hivePlot_D3 <- downloadHandler(
       }
       dev.off()
       fs <- c(fs, "vip_pval_D3.pdf")
-      
+
     }else{
-      
+
       svg("HIVE_D3.svg", width = input$HIVED3widthPDF, height = input$HIVED3widthPDF)
-      
+
       print(  ggplot() +
                 geom_point(data = df.hive.plot_D3(), aes(x1, y1, color = annotation, size = 3)) + # x1 is the VIP
                 geom_text(data = df.hive.plot_D3(), vjust = 0.5, angle = 45, aes(x1, y1, label = annotation)) +
                 geom_point(data = df.hive.plot_D3(), aes(x2, abs(y2), color = annotation, size = 3)) + # y2 is the correlation to the pH at time of filtering
-                geom_text(data = df.hive.plot_D3(), hjust = 0.5, angle = 45, aes(x2,abs(y2), label = annotation)) +      
+                geom_text(data = df.hive.plot_D3(), hjust = 0.5, angle = 45, aes(x2,abs(y2), label = annotation)) +
                 geom_curve(data = df.hive.to.plot_D3(), curvature = 0.2, color = "grey ", size = 0.2,aes(x = vector_x, y = vector_y, xend = vector_xend, yend = abs(vector_yend))) +
                 theme_gdocs() +
                 scale_colour_tableau(palette = "Tableau 20") +
                 labs(x = "VIP", y = paste("Spearman Correlation to", input$sampleAnnotSelection_D3), colour = "Annotation"))
       dev.off()
       fs <- c(fs, "HIVE_D3.svg")
-      
+
       svg("vip_pval_D3.svg", width = input$HIVED3widthPDF, height = input$HIVED3heightPDF)
-      
+
       if (input$showNames_D3 == 0){
         print(ggplot(vip.pval.df_D3(), aes(x = pvaVn, y = vip)) +
                 geom_point(aes(color=factor(signi)), alpha=1/2, size=1) +
-                scale_color_manual(values=c(NS="grey30", S="red2"), 
-                                   labels=c(NS="NS", 
+                scale_color_manual(values=c(NS="grey30", S="red2"),
+                                   labels=c(NS="NS",
                                             FC_FDR=paste("Adjust pval < 0.05 & VIP > 1", sep=""))) +
                 #Add a horizontal line for VIP cutoff
                 geom_vline(xintercept=0.05, linetype="longdash", colour="black", size=0.4) +
@@ -2317,8 +2288,8 @@ output$hivePlot_D3 <- downloadHandler(
         }
         print(ggplot(vip_table, aes(x = pvaVn, y = vip)) +
                 geom_point(aes(color=factor(signi)), alpha=1/2, size=1) +
-                scale_color_manual(values=c(NS="grey30", S="red2"), 
-                                   labels=c(NS="NS", 
+                scale_color_manual(values=c(NS="grey30", S="red2"),
+                                   labels=c(NS="NS",
                                             FC_FDR=paste("Adjust pval < 0.05 & VIP > 1", sep=""))) +
                 #Add a horizontal line for VIP cutoff
                 geom_vline(xintercept=0.05, linetype="longdash", colour="black", size=0.4) +
@@ -2337,18 +2308,18 @@ output$hivePlot_D3 <- downloadHandler(
       }
       dev.off()
       fs <- c(fs, "vip_pval_D3.svg")
-      
-      
+
+
     }
-    
+
     zip(zipfile=filename, files=fs)
-    
+
   },
   contentType = "application/zip")
 
 
 
-#### DataSet 2 
+#### DataSet 2
 
 
 
@@ -2368,7 +2339,7 @@ output$Download_Network_Exploration_dataset_2 <- downloadHandler(
       }
       dev.off()
       fs <- c(fs, "Contribution_MEs.pdf")
-      
+
       pdf(paste("Module_", input$selectModuleSec ,"_Corr_Vs_Membership.pdf", sep=""), width = input$widthPDF_D2, height = input$heightPDF_D2)
       print(ggplot(moduleMembershipSec(), aes(x = moduleMembership, y = TraitSignificance)) +
               geom_point(color = input$selectModuleSec) +
@@ -2376,22 +2347,22 @@ output$Download_Network_Exploration_dataset_2 <- downloadHandler(
               labs(x = paste("Module Membership in", input$selectModuleSec, "module"), y = paste("OTU significance for", input$selectVariable1Sec),
                    title = paste("Module membership vs. gene significance\n", textModuleMembershipSec() ,sep = "")) +
               geom_density_2d(color = '#E69F00'))
-      
+
       dev.off()
       fs <- c(fs, paste("Module_", input$selectModuleSec ,"_Corr_Vs_Membership.pdf", sep=""))
       if (input$TaxonFile1 && input$OmicTable == "OTUs"){
         pdf(paste("Module_", input$selectModuleSec ,"_Relative_Abundance.pdf", sep=""), width = input$widthPDF_D2, height = input$heightPDF_D2)
-        
+
         print(ggplot(module_Relative_abundanceSec(), aes_string(x = "variable", y = "value", fill = input$selectTaxo2Sec)) +
                 geom_bar(stat = "identity") +
                 labs(x = "Samples", y = "Relative Abundance", title = paste("Relative abundance at the ", input$selectTaxo2Sec, " Taxonomic level of the ", input$selectModuleSec, " module.", sep = "")) +
                 theme(axis.text.x = element_text(angle = 90, hjust = 1)))
-        
+
         dev.off()
         fs <- c(fs, paste("Module_", input$selectModuleSec ,"_Relative_Abundance.pdf", sep=""))
       }
-      
-      
+
+
       pdf("Module_Correlation_External_Trait.pdf", width = input$widthPDF_D2, height = input$heightPDF_D2)
       print(ggplot(data = selectedCondDFSec(), aes(x = rn, y = variable, fill = value)) +
               geom_tile(color = "white") +
@@ -2422,21 +2393,21 @@ output$Download_Network_Exploration_dataset_2 <- downloadHandler(
               labs(x = paste("Module Membership in", input$selectModuleSec, "module"), y = paste("OTU significance for", input$selectVariable1Sec),
                    title = paste("Module membership vs. gene significance\n", textModuleMembershipSec() ,sep = "")) +
               geom_density_2d(color = '#E69F00'))
-      
+
       dev.off()
       fs <- c(fs, paste("Module_", input$selectModuleSec ,"_Corr_Vs_Membership.svg", sep=""))
       if (input$TaxonFile1 && input$OmicTable == "OTUs"){
         svg(paste("Module_", input$selectModuleSec ,"_Relative_Abundance.svg", sep=""), width = input$widthPDF_D2, height = input$heightPDF_D2)
-        
+
         print(ggplot(module_Relative_abundanceSec(), aes_string(x = "variable", y = "value", fill = input$selectTaxo2Sec)) +
                 geom_bar(stat = "identity") +
                 labs(x = "Samples", y = "Relative Abundance", title = paste("Relative abundance at the ", input$selectTaxo2Sec, " Taxonomic level of the ", input$selectModuleSec, " module.", sep = "")) +
                 theme(axis.text.x = element_text(angle = 90, hjust = 1)))
-        
+
         dev.off()
         fs <- c(fs, paste("Module_", input$selectModuleSec ,"_Relative_Abundance.svg", sep=""))
       }
-      
+
       svg("Module_Correlation_External_Trait.svg", width = input$widthPDF_D2, height = input$heightPDF_D2)
       print(ggplot(data = selectedCondDFSec(), aes(x = rn, y = variable, fill = value)) +
               geom_tile(color = "white") +
@@ -2453,9 +2424,9 @@ output$Download_Network_Exploration_dataset_2 <- downloadHandler(
       dev.off()
       fs <- c(fs, "Module_Correlation_External_Trait.svg")
     }
-    
+
     zip(zipfile=filename, files=fs)
-    
+
   },
   contentType = "application/zip")
 
@@ -2477,7 +2448,7 @@ output$Download_Network_Exploration_dataset_3 <- downloadHandler(
       }
       dev.off()
       fs <- c(fs, "Contribution_MEs.pdf")
-      
+
       pdf(paste("Module_", input$selectModuleTer ,"_Corr_Vs_Membership.pdf", sep=""), width = input$widthPDF_D3, height = input$heightPDF_D3)
       print(ggplot(moduleMembershipTer(), aes(x = moduleMembership, y = TraitSignificance)) +
               geom_point(color = input$selectModuleTer) +
@@ -2485,22 +2456,22 @@ output$Download_Network_Exploration_dataset_3 <- downloadHandler(
               labs(x = paste("Module Membership in", input$selectModuleTer, "module"), y = paste("OTU significance for", input$selectVariable1Ter),
                    title = paste("Module membership vs. gene significance\n", textModuleMembershipTer() ,sep = "")) +
               geom_density_2d(color = '#E69F00'))
-      
+
       dev.off()
       fs <- c(fs, paste("Module_", input$selectModuleTer ,"_Corr_Vs_Membership.pdf", sep=""))
       if (input$TaxonFile1 && input$OmicTable3 == "OTUs"){
         pdf(paste("Module_", input$selectModuleTer ,"_Relative_Abundance.pdf", sep=""), width = input$widthPDF_D3, height = input$heightPDF_D3)
-        
+
         print(ggplot(module_Relative_abundanceTer(), aes_string(x = "variable", y = "value", fill = input$selectTaxo2Ter)) +
                 geom_bar(stat = "identity") +
                 labs(x = "Samples", y = "Relative Abundance", title = paste("Relative abundance at the ", input$selectTaxo2Ter, " Taxonomic level of the ", input$selectModuleTer, " module.", sep = "")) +
                 theme(axis.text.x = element_text(angle = 90, hjust = 1)))
-        
+
         dev.off()
         fs <- c(fs, paste("Module_", input$selectModuleTer ,"_Relative_Abundance.pdf", sep=""))
       }
-      
-      
+
+
       pdf("Module_Correlation_External_Trait.pdf", width = input$widthPDF_D3, height = input$heightPDF_D3)
       print(ggplot(data = selectedCondDFTer(), aes(x = rn, y = variable, fill = value)) +
               geom_tile(color = "white") +
@@ -2530,21 +2501,21 @@ output$Download_Network_Exploration_dataset_3 <- downloadHandler(
               labs(x = paste("Module Membership in", input$selectModuleTer, "module"), y = paste("OTU significance for", input$selectVariable1Ter),
                    title = paste("Module membership vs. gene significance\n", textModuleMembershipTer() ,sep = "")) +
               geom_density_2d(color = '#E69F00'))
-      
+
       dev.off()
       fs <- c(fs, paste("Module_", input$selectModuleTer ,"_Corr_Vs_Membership.svg", sep=""))
       if (input$TaxonFile1 && input$OmicTable3 == "OTUs"){
         svg(paste("Module_", input$selectModuleTer ,"_Relative_Abundance.svg", sep=""), width = input$widthPDF_D3, height = input$heightPDF_D3)
-        
+
         print(ggplot(module_Relative_abundanceTer(), aes_string(x = "variable", y = "value", fill = input$selectTaxo2Ter)) +
                 geom_bar(stat = "identity") +
                 labs(x = "Samples", y = "Relative Abundance", title = paste("Relative abundance at the ", input$selectTaxo2Ter, " Taxonomic level of the ", input$selectModuleSec, " module.", sep = "")) +
                 theme(axis.text.x = element_text(angle = 90, hjust = 1)))
-        
+
         dev.off()
         fs <- c(fs, paste("Module_", input$selectModuleTer ,"_Relative_Abundance.svg", sep=""))
       }
-      
+
       svg("Module_Correlation_External_Trait.svg", width = input$widthPDF_D3, height = input$heightPDF_D3)
       print(ggplot(data = selectedCondDFTer(), aes(x = rn, y = variable, fill = value)) +
               geom_tile(color = "white") +
@@ -2561,11 +2532,8 @@ output$Download_Network_Exploration_dataset_3 <- downloadHandler(
       dev.off()
       fs <- c(fs, "Module_Correlation_External_Trait.svg")
     }
-    
+
     zip(zipfile=filename, files=fs)
-    
+
   },
   contentType = "application/zip")
-
-
-
diff --git a/ui.R b/ui.R
index 6b20a83cde795c9f411c4c13b84f1c259c707701..fe16fcdc65d02080fa4c08f579b7c0613a8ec1b4 100644
--- a/ui.R
+++ b/ui.R
@@ -31,7 +31,7 @@ css <- "
 # The UI generate the shiny web interface.
 
 ui <- tagList(
-  
+
   useShinyjs(),
   extendShinyjs(script = "function.js", functions = c("enableTab","disableTab")),
   inlineCSS(css),
@@ -44,7 +44,7 @@ ui <- tagList(
                       id = "GENERAL_PARAMETERS",
                       icon = icon("folder"), #   adding icons --> go to https://fontawesome.com/icons?d=gallery
                       mainPanel(
-                        fluidRow( 
+                        fluidRow(
                           column(5,
                                  tabsetPanel(type = "tabs", # A box containing several panels.
                                              id = "PAGE1",
@@ -69,7 +69,7 @@ ui <- tagList(
                                                                                         selectInput("OmicTable", "Second 'Omic' Table:", choices = c("Metabolites" = "Metabolites", "OTUs" = "OTUs", "Genes" = "Genes", "mRNA" = "mRNA", "miRNA" = "miRNA", "Proteins" = "Proteins", "Others" = "Others"), selected = character(0)),
                                                                                         conditionalPanel("input.Omic3",
                                                                                                          selectInput("OmicTable3", "Third 'Omic' Table:", choices = c("Metabolites" = "Metabolites", "OTUs" = "OTUs", "Genes" = "Genes", "mRNA" = "mRNA", "miRNA" = "miRNA", "Proteins" = "Proteins", "Others" = "Others"), selected = character(0))
-                                                                                        )
+                                                                                                         )
                                                                        )
                                                       )),
                                              tabPanel("Advanced Parameters",
@@ -82,10 +82,10 @@ ui <- tagList(
                                                                                         sliderInput("prevalence", "Prevalence Threshold: ", min = 0, max = 100, value = 0)),
                                                                        conditionalPanel("input.TypeFiltration == 'count'",
                                                                                         numericInput("count", "Minimum number of count across sample: ", min = 0, value = 2))),
-                                                      
+
                                                       radioButtons("Normalisation", "Normalization", choices = c("Yes" = "Yes", "No" = "No"), selected = "No"),
                                                       conditionalPanel("input.Normalisation == 'Yes'",
-                                                                       selectInput("TypeNormalisation", "Type of normalisation: ", choices = c("CSS" = "CSS", "TSS" = "TSS"))),
+                                                                         selectInput("TypeNormalisation", "Type of normalisation: ", choices = c("CSS" = "CSS", "TSS" = "TSS"))),
                                                       radioButtons("Transformation", "Transformation", choices = c("Yes" = "Yes", "No" = "No"), selected = "No"),
                                                       conditionalPanel("input.Transformation == 'Yes'",
                                                                        selectInput("TypeTransformation", "Type of transformation: ", choices = c("Log10" = "Log10", "Log2"= "Log2", "Hellinger"= "Hellinger", "Square" = "Square", "Square Root" = "sqrt", "ILR" = "ILR", "CLR" = "CLR"))),
@@ -98,7 +98,7 @@ ui <- tagList(
                                                                                                          sliderInput("prevalence1", "Prevalence Threshold: ", min = 0, max = 100, value = 0)),
                                                                                         conditionalPanel("input.TypeFiltration1 == 'count'",
                                                                                                          numericInput("count1", "Minimum number of count across sample: ", min = 0, value = 2))),
-                                                                       
+
                                                                        radioButtons("Normalisation1", "Normalization of the second table", choices = c("Yes" = "Yes", "No" = "No"), selected = "No"),
                                                                        conditionalPanel("input.Normalisation1 == 'Yes'",
                                                                                         selectInput("TypeNormalisation1", "Type of normalisation: ", choices = c("CSS" = "CSS", "TSS" = "TSS"))),
@@ -114,19 +114,19 @@ ui <- tagList(
                                                                                                                           sliderInput("prevalence2", "Prevalence Threshold: ", min = 0, max = 100, value = 0)),
                                                                                                          conditionalPanel("input.TypeFiltration2 == 'count'",
                                                                                                                           numericInput("count2", "Minimum number of count across sample: ", min = 0, value = 2))),
-                                                                                        
+
                                                                                         radioButtons("Normalisation2", "Normalization of the third table", choices = c("Yes" = "Yes", "No" = "No"), selected = "No"),
                                                                                         conditionalPanel("input.Normalisation2 == 'Yes'",
                                                                                                          selectInput("TypeNormalisation2", "Type of normalisation: ", choices = c("CSS" = "CSS", "TSS" = "TSS"))),
                                                                                         radioButtons("Transformation2", "Transformation of the third table", choices = c("Yes" = "Yes", "No" = "No"), selected = "No"),
                                                                                         conditionalPanel("input.Transformation2 == 'Yes'",
                                                                                                          selectInput("TypeTransformation2", "Type of transformation: ", choices = c("Log10" = "Log10", "Log2"= "Log2", "Hellinger"= "Hellinger", "Square" = "Square", "Square Root" = "sqrt", "ILR" = "ILR", "CLR" = "CLR")))
-                                                                       ),
+                                                                                        ),
                                                                        hr()),
                                                       uiOutput("selectSample")
                                              ) # end TabPanel advanced Parameter
                                  ) #End TabPanel where user select its options
-                                 
+
                           ),
                           #### CHOOSING THE VIEWING OPTION
                           column(3,
@@ -138,26 +138,26 @@ ui <- tagList(
                                  DT::dataTableOutput("ViewDim"),
                                  h4("General information"),
                                  conditionalPanel("input.LoadExample == 'Example1'",
-                                                  p("You selected the Breast TGCA datasets, from The Cancer Genome Atlas (Cancer Genome Atlas Network et al. 
-                                                  Comprehensive molecular portraits of human breast tumours. Nature, 490(7418):61-70, 2012.). These datasets describe 379 samples 
+                                                  p("You selected the Breast TGCA datasets, from The Cancer Genome Atlas (Cancer Genome Atlas Network et al.
+                                                  Comprehensive molecular portraits of human breast tumours. Nature, 490(7418):61–70, 2012.). These datasets describe 379 samples
                                                     of breast cancer. In this example, the first Omics contains miRNA expression, the second, mRNA expression
-                                                    and the last, protein abundances of these cancerous cells belonging to four different subtypes of tumor 
-                                                    (Basal, Her2, Luminal A and Luminal B. Each dataset was normalized and pre-processed. You can explore with 
-                                                    MiBiOmics the associations between miRNA, mRNA and proteins and how these associations discriminates the 
+                                                    and the last, protein abundances of these cancerous cells belonging to four different subtypes of tumor
+                                                    (Basal, Her2, Luminal A and Luminal B. Each dataset was normalized and pre-processed. You can explore with
+                                                    MiBiOmics the associations between miRNA, mRNA and proteins and how these associations discriminates the
                                                     different subtypes of cancer cells.", style="text-align:justify;color:black;background-color:lavender;padding:15px;border-radius:10px")
-                                 ),
+                                                  ),
                                  conditionalPanel("input.LoadExample == 'Example2'",
                                                   p("You selected the TARA Oceans datasets, from The TARA Oceans Expedition. These datasets regroups information
                                                     about the oceans microbiota across different geographical regions and depths. This example gathers 2 omics tables,
                                                     describing 139 prokaryotic samples. These samples were collected in 8 different locations: Indian Ocean (IO), Mediterranean Sea
                                                     (MS), North Atlantic Ocean (NAO), North Pacific Ocean (NPO), Red Sea (RS), South Atlantic Ocean (SAO), South Pacific Ocean
-                                                    (SPO) and South Ocean (SO); and across 3 depth layers: Surface (SRF), Deep chlorophyll maximum (DCM) and mesopelagic (MES). 
-                                                    The first omics dataset contains the OTUs Abundances, the second, the NOGS expressions. You also have a taxonomic table 
+                                                    (SPO) and South Ocean (SO); and across 3 depth layers: Surface (SRF), Deep chlorophyll maximum (DCM) and mesopelagic (MES).
+                                                    The first omics dataset contains the OTUs Abundances, the second, the NOGS expressions. You also have a taxonomic table
                                                     describing the OTUs. You can use MiBiOmics to explore how ocean depth affects the prokaryotic communities across different
                                                     locations.", style="text-align:justify;color:black;background-color:papayawhip;padding:15px;border-radius:10px")
+                                                  )
                                  )
-                          )
-                          
+
                         ), #End first Row
                         fluidRow(
                           h4("Click on the button bellow to view or to update your data according to the chosen advanced parameters"),
@@ -167,24 +167,24 @@ ui <- tagList(
                           h3("Information Visualization"),
                           DT::dataTableOutput("ViewTable")
                         ), #End second row
-                        
+
                         fluidRow( #Beginning third row
-                          
+
                           #### COUNTING TABLE UPLOAD
                           column(3,
-                                 h3("Upload first omic Table"),
-                                 conditionalPanel(("input.LoadExample == 'No'"),
-                                                  fileInput("file1", "Choose CSV File (Counting Table): ",
-                                                            multiple = FALSE,
-                                                            accept = c("text/csv", "text/comma-separated-values,text/plain",".csv")),
-                                                  checkboxInput("header", "Header", TRUE),
-                                                  checkboxInput("rownames", "Rownames", TRUE),
-                                                  radioButtons("sep", "Separator", choices = c(Comma = ",",Semicolon = ";",Tab = "\t"), selected = ","),
-                                                  radioButtons("dec", "Decimal", choices = c(Comma = ",", Dot = "."), selected = ".")
-                                 )
-                                 
+                            h3("Upload first omic Table"),
+                            conditionalPanel(("input.LoadExample == 'No'"),
+                                             fileInput("file1", "Choose CSV File (Counting Table): ",
+                                                       multiple = FALSE,
+                                                       accept = c("text/csv", "text/comma-separated-values,text/plain",".csv")),
+                                             checkboxInput("header", "Header", TRUE),
+                                             checkboxInput("rownames", "Rownames", TRUE),
+                                             radioButtons("sep", "Separator", choices = c(Comma = ",",Semicolon = ";",Tab = "\t"), selected = ","),
+                                             radioButtons("dec", "Decimal", choices = c(Comma = ",", Dot = "."), selected = ".")
+                            )
+
                           ),
-                          
+
                           column(3,
                                  h3("Upload your second omic table"),
                                  conditionalPanel("input.TypeAnalysis == 'multivariate' && input.LoadExample == 'No'",
@@ -197,7 +197,7 @@ ui <- tagList(
                                                   radioButtons("dec4", "Decimal", choices = c(Comma = ",", Dot = "."), selected = ".")
                                  )
                           ),
-                          
+
                           column(3,
                                  h3("Upload your third omic table"),
                                  conditionalPanel("input.Omic3 && input.LoadExample == 'No'",
@@ -210,42 +210,42 @@ ui <- tagList(
                                                   radioButtons("dec5", "Decimal", choices = c(Comma = ",", Dot = "."), selected = ".")
                                  )
                           ),
-                          
+
                           #### ANNOTATION TABLE UPLOAD
                           column(3,
-                                 h3("Upload Annotation File"),
-                                 conditionalPanel(("input.LoadExample == 'No'"),
-                                                  fileInput("file2", "Choose CSV File (Annotation File): ",
-                                                            multiple = FALSE,
-                                                            accept = c("text/csv", "text/comma-separated-values,text/plain", ".csv")),
-                                                  checkboxInput("header2", "Header", TRUE),
-                                                  checkboxInput("rownames2", "Rownames", TRUE),
-                                                  radioButtons("sep2", "Separator", choices = c(Comma = ",", Semicolon = ";", Tab = "\t"), selected = ","),
-                                                  radioButtons("dec2", "Decimal", choices = c(Comma = ",", Dot = "."), selected = ".")
-                                 )
+                            h3("Upload Annotation File"),
+                            conditionalPanel(("input.LoadExample == 'No'"),
+                                             fileInput("file2", "Choose CSV File (Annotation File): ",
+                                                       multiple = FALSE,
+                                                       accept = c("text/csv", "text/comma-separated-values,text/plain", ".csv")),
+                                             checkboxInput("header2", "Header", TRUE),
+                                             checkboxInput("rownames2", "Rownames", TRUE),
+                                             radioButtons("sep2", "Separator", choices = c(Comma = ",", Semicolon = ";", Tab = "\t"), selected = ","),
+                                             radioButtons("dec2", "Decimal", choices = c(Comma = ",", Dot = "."), selected = ".")
+                            )
                           ),
-                          
+
                           #### TAXA TABLE UPLOAD
                           column(3,
-                                 h3("Upload Optional File"),
-                                 conditionalPanel(condition = "((input.CountingT == 'OTUs' | input.CountingT1 == 'OTUs') && (input.TaxonFile | input.TaxonFile1) && (input.LoadExample == 'No'))",
-                                                  fileInput("file3", "Choose CSV File (Taxa Table): ",
-                                                            multiple = FALSE,
-                                                            accept = c("text/csv", "text/comma-separated-values,text/plain", ".csv")),
-                                                  checkboxInput("header3", "Header", TRUE),
-                                                  checkboxInput("rownames3", "Rownames", TRUE),
-                                                  radioButtons("sep3", "Separator", choices = c(Comma = ",", Semicolon = ";", Tab = "\t"), selected = ",")
-                                 )
+                            h3("Upload Optional File"),
+                            conditionalPanel(condition = "((input.CountingT == 'OTUs' | input.CountingT1 == 'OTUs') && (input.TaxonFile | input.TaxonFile1) && (input.LoadExample == 'No'))",
+                                             fileInput("file3", "Choose CSV File (Taxa Table): ",
+                                                       multiple = FALSE,
+                                                       accept = c("text/csv", "text/comma-separated-values,text/plain", ".csv")),
+                                             checkboxInput("header3", "Header", TRUE),
+                                             checkboxInput("rownames3", "Rownames", TRUE),
+                                             radioButtons("sep3", "Separator", choices = c(Comma = ",", Semicolon = ";", Tab = "\t"), selected = ",")
+                            )
                           )
-                          
+
                           #### UPLOAD SECOND OMIC TABLE
-                          
-                          
-                          
-                        ) # End third row
+
+
+
+                      ) # End third row
                       )
              ),# End First Page
-             
+
              #### PAGE 2 ####
              tabPanel("DATA_OVERVIEW",
                       id = "DATA_OVERVIEW",
@@ -287,7 +287,7 @@ ui <- tagList(
                                                                                       "Choose an extension:",
                                                                                       choices = c("pdf", "svg")),
                                                                          downloadButton("Download_Page2_dataset1_ordination", "Download")
-                                                                         
+
                                                                 ),
                                                                 tabPanel("Dataset Specificity", value = "Page2_dataset1_rel_ab",
                                                                          withSpinner(plotOutput("Relative_Abundance", height = 650)),
@@ -301,7 +301,7 @@ ui <- tagList(
                                                                          downloadButton("Download_Page2_dataset1_rel_ab", "Download")
                                                                 ))
                                              )
-                                           )),
+                                  )),
                                   tabPanel("Second Dataset", value = "Page2_dataset2",
                                            fluidRow( # Begin First row (preference selection)
                                              column(8,
@@ -320,7 +320,7 @@ ui <- tagList(
                                                                          downloadButton("Download_Page2_dataset2_dendrogramme", "Download")
                                                                 ),
                                                                 tabPanel("General Ordination", value = "Page2_dataset2_ordination",
-                                                                         
+
                                                                          withSpinner(plotOutput("PCoA_sec", width = 850, height = 650)),
                                                                          checkboxInput("PcoaName2", "Do you want samples name ?", value = FALSE),
                                                                          selectInput("selectOrdinationSec",
@@ -333,13 +333,13 @@ ui <- tagList(
                                                                                                       choices = c("bray", "euclidean", "manhattan", "jaccard", "binomial", "cao"),
                                                                                                       selected = "bray"),
                                                                                           actionButton("showDist_sec", "How to choose the right distance ?")),
-                                                                         
+
                                                                          uiOutput("SelectVariable3_sec"),
                                                                          radioButtons("pdf_or_svg_page2_dataset2_ordination",
                                                                                       "Choose an extension:",
                                                                                       choices = c("pdf", "svg")),
                                                                          downloadButton("Download_Page2_dataset2_ordination", "Download")
-                                                                         
+
                                                                 ),
                                                                 tabPanel("Dataset Specificity", value = "Page2_dataset2_rel_ab",
                                                                          withSpinner(plotOutput("Relative_Abundance_sec", height = 650)),
@@ -352,9 +352,9 @@ ui <- tagList(
                                                                          sliderInput("heightPDF_p2_d2", "Figures Height: ", min = 10, max = 100, value = 30),
                                                                          downloadButton("Download_Page2_dataset2_rel_ab", "Download")
                                                                 )
-                                                    )
+                                                                )
                                              )
-                                           )),
+                                             )),
                                   tabPanel("Third Dataset", value = "Page2_dataset3",
                                            fluidRow( # Begin First row (preference selection)
                                              column(8,
@@ -373,7 +373,7 @@ ui <- tagList(
                                                                          downloadButton("Download_Page2_dataset3_dendrogramme", "Download")
                                                                 ),
                                                                 tabPanel("General Ordination", value = "Page2_dataset3_ordination",
-                                                                         
+
                                                                          withSpinner(plotOutput("PCoA_ter", width = 850, height = 650)),
                                                                          checkboxInput("PcoaName3", "Do you want samples name ?", value = FALSE),
                                                                          selectInput("selectOrdinationTer",
@@ -386,13 +386,13 @@ ui <- tagList(
                                                                                                       choices = c("bray", "euclidean", "manhattan", "jaccard", "binomial", "cao"),
                                                                                                       selected = "bray"),
                                                                                           actionButton("showDist_ter", "How to choose the right distance ?")),
-                                                                         
+
                                                                          uiOutput("SelectVariable3_ter"),
                                                                          radioButtons("pdf_or_svg_page2_dataset3_ordination",
                                                                                       "Choose an extension:",
                                                                                       choices = c("pdf", "svg")),
                                                                          downloadButton("Download_Page2_dataset3_ordination", "Download")
-                                                                         
+
                                                                 ),
                                                                 tabPanel("Dataset Specificity", value = "Page2_dataset3_rel_ab",
                                                                          withSpinner(plotOutput("Relative_Abundance_ter", height = 650)),
@@ -408,1025 +408,1022 @@ ui <- tagList(
                                                     )
                                              )
                                            ))
-                                  
-                                  
+
+
                       ), #End First Row
                       br()
-                      
-                      
-             ), # End Second Page
-             
-             #### PAGE 3 ####
-             tabPanel("NETWORK_INFERENCE", # Beginning third Page
-                      id = "NETWORK_INFERENCE",
-                      icon = icon("share-alt"),
-                      tabsetPanel(type = "tabs",
-                                  id = "NETWORK_INFERENCE_D1_D2",
-                                  tabPanel("First Dataset",
-                                           fluidRow( #Beginning first row
-                                             column(4,
-                                                    h3("Choose Your Preferences: "),
-                                                    powers = c(c(1:10), seq(from = 12, to=20, by=2)),
-                                                    uiOutput("Power"),
-                                                    
-                                                    actionButton("showPower", "How to choose the right softPower ?"),
-                                                    
-                                                    hr(),
-                                                    
-                                                    uiOutput("ModuleSize"),
-                                                    actionButton("showMS", "How to choose the right Module Size ?"),
-                                                    
-                                                    hr(),
-                                                    radioButtons('signed', "Choose between a signed and a unsigned network: ",
-                                                                 choices = c("signed", "unsigned"),
-                                                                 selected = "signed"),
-                                                    
-                                                    actionButton("showSigned", "What is the difference between a signed and a unsigned Network ?"),
-                                                    
-                                                    hr(),
-                                                    
-                                                    radioButtons('corNetwork', "Choose the correlation option for the network: ",
-                                                                 choices= c('pearson', 'spearman', 'bicor'),
-                                                                 selected = 'pearson'),
-                                                    
-                                                    hr(),
-                                                    
-                                                    uiOutput("buttonPower"),
-                                                    
-                                                    uiOutput("buttonNet"),
-                                                    
-                                                    radioButtons("pdf_or_svg_p3",
-                                                                 "Choose an extension:",
-                                                                 choices = c("pdf", "svg")),
-                                                    
-                                                    downloadButton("Download_Network_Creation", "Download"),
-                                                    
-                                                    hr()
-                                                    
-                                             ),
-                                             
-                                             
-                                             column(6,
-                                                    h3("Scale Free Topoly against Soft Power: "),
-                                                    
-                                                    withSpinner(plotOutput("ScaleFree", height = 650))
-                                                    
-                                                    
-                                                    
-                                             ),
-                                             conditionalPanel("input.TypeAnalysis == 'simple'",
-                                                              column(2,
-                                                                     h3("Click here to unlock the network exploration and the multivariate analysis
+
+
+  ), # End Second Page
+
+  #### PAGE 3 ####
+  tabPanel("NETWORK_INFERENCE", # Beginning third Page
+           id = "NETWORK_INFERENCE",
+           icon = icon("share-alt"),
+           tabsetPanel(type = "tabs",
+                       id = "NETWORK_INFERENCE_D1_D2",
+                       tabPanel("First Dataset",
+                                fluidRow( #Beginning first row
+                                  column(4,
+                                         h3("Choose Your Preferences: "),
+                                         powers = c(c(1:10), seq(from = 12, to=20, by=2)),
+                                         uiOutput("Power"),
+
+                                         actionButton("showPower", "How to choose the right softPower ?"),
+
+                                         hr(),
+
+                                         uiOutput("ModuleSize"),
+                                         actionButton("showMS", "How to choose the right Module Size ?"),
+
+                                         hr(),
+                                         radioButtons('signed', "Choose between a signed and a unsigned network: ",
+                                                      choices = c("signed", "unsigned"),
+                                                      selected = "signed"),
+
+                                         actionButton("showSigned", "What is the difference between a signed and a unsigned Network ?"),
+
+                                         hr(),
+
+                                         radioButtons('corNetwork', "Choose the correlation option for the network: ",
+                                                      choices= c('pearson', 'spearman', 'bicor'),
+                                                      selected = 'pearson'),
+
+                                         hr(),
+
+                                         uiOutput("buttonPower"),
+
+                                         uiOutput("buttonNet"),
+
+                                         radioButtons("pdf_or_svg_p3",
+                                                      "Choose an extension:",
+                                                      choices = c("pdf", "svg")),
+
+                                         downloadButton("Download_Network_Creation", "Download"),
+
+                                         hr()
+
+                                  ),
+
+
+                                  column(6,
+                                         h3("Scale Free Topoly against Soft Power: "),
+
+                                             withSpinner(plotOutput("ScaleFree", height = 650))
+
+
+
+                                  ),
+                                  conditionalPanel("input.TypeAnalysis == 'simple'",
+                                                   column(2,
+                                                          h3("Click here to unlock the network exploration and the multivariate analysis
                                             (if you uploaded two counting tables)"),
-                                                                     actionButton("enableTabulations", "Explore your network")
-                                                              )),
-                                             conditionalPanel("input.TypeAnalysis == 'multivariate'",
-                                                              column(2,
-                                                                     h3("Click here to unlock the network exploration and the multivariate analysis
+                                                          actionButton("enableTabulations", "Explore your network")
+                                                   )),
+                                  conditionalPanel("input.TypeAnalysis == 'multivariate'",
+                                                   column(2,
+                                                          h3("Click here to unlock the network exploration and the multivariate analysis
                                             (if you uploaded two counting tables)"),
-                                                                     actionButton("goD2", "Check your second dataset")
-                                                              ))
-                                             
-                                             
-                                           ), #End first Row
-                                           fluidRow( #Second Row
-                                             
-                                             column(6,
-                                                    h3("Classical Multidimensional Scaling plot to visualize the network"),
-                                                    withSpinner(uiOutput("multiScalePlotOutput"))
-                                             ),
-                                             column(6,
-                                                    h3("Module Clustering: "),
-                                                    withSpinner(plotOutput("ModuleClustering"))
-                                                    
-                                             )
-                                           ), # End Second Row
-                                           fluidRow( #Beginning Third Row
-                                             column(10,
-                                                    h3("Variables Dendrogramme with Module Colors: "),
-                                                    withSpinner(plotOutput("Dendrogramme_Colors")),
-                                                    downloadButton("downloadEigen", "Download Modules\' Eigenvalues")
-                                             ),
-                                             column(2,
-                                                    h3("Module Informations: "),
-                                                    withSpinner(DT::dataTableOutput("Module_Information")),
-                                                    downloadButton("downloadModule", "Download Modules")
-                                             )
-                                           )
-                                           # , #End third Row
-                                           # h2("SparCC"),
-                                           # fluidRow( #Begining fourth row
-                                           #
-                                           #   column(10,
-                                           #          h3("SparCC Network"),
-                                           #          uiOutput("buttonSparcc"),
-                                           #          visNetworkOutput("sparcc.Network", height = 1000)
-                                           #   )
-                                           # ) #End Fourth Row
+                                                          actionButton("goD2", "Check your second dataset")
+                                                   ))
+
+
+                                ), #End first Row
+                                fluidRow( #Second Row
+
+                                  column(6,
+                                         h3("Classical Multidimensional Scaling plot to visualize the network"),
+                                         withSpinner(uiOutput("multiScalePlotOutput"))
+                                  ),
+                                  column(6,
+                                         h3("Module Clustering: "),
+                                         withSpinner(plotOutput("ModuleClustering"))
+
+                                  )
+                                ), # End Second Row
+                                fluidRow( #Beginning Third Row
+                                  column(10,
+                                         h3("Variables Dendrogramme with Module Colors: "),
+                                         withSpinner(plotOutput("Dendrogramme_Colors")),
+                                         downloadButton("downloadEigen", "Download Modules\' Eigenvalues")
                                   ),
-                                  tabPanel("Second Dataset", value = "NETWORK_INFERENCE_D2",
-                                           fluidRow( #Beginning first row
-                                             column(4,
-                                                    h3("Choose Your Preferences: "),
-                                                    powers = c(c(1:10), seq(from = 12, to=20, by=2)),
-                                                    uiOutput("Power2"),
-                                                    
-                                                    actionButton("showPower2", "How to choose the right softPower ?"),
-                                                    
-                                                    hr(),
-                                                    
-                                                    uiOutput("ModuleSize2"),
-                                                    actionButton("showMS2", "How to choose the right Module Size ?"),
-                                                    hr(),
-                                                    radioButtons('signed2', "Choose between a signed and a unsigned network: ",
-                                                                 choices = c("signed", "unsigned"),
-                                                                 selected = "signed"),
-                                                    
-                                                    actionButton("showSigned2", "What is the difference between a signed and a unsigned Network ?"),
-                                                    
-                                                    hr(),
-                                                    
-                                                    radioButtons('corNetwork2', "Choose the correlation option for the network: ",
-                                                                 choices= c('pearson', 'spearman', 'bicor'),
-                                                                 selected = 'pearson'),
-                                                    
-                                                    
-                                                    hr(),
-                                                    
-                                                    uiOutput("buttonPower2"),
-                                                    
-                                                    uiOutput("buttonNet2"),
-                                                    
-                                                    radioButtons("pdf_or_svg_p3_dataset2",
-                                                                 "Choose an extension:",
-                                                                 choices = c("pdf", "svg")),
-                                                    
-                                                    downloadButton("Download_Network_Creation_dataset2", "Download"),
-                                                    
-                                                    hr()
-                                                    
-                                             ),
-                                             column(6,
-                                                    h3("Scale Free Topoly against Soft Power: "),
-                                                    withSpinner(plotOutput("ScaleFree2", height = 650))
-                                             ),
-                                             conditionalPanel("input.Omic3",
-                                                              column(2,
-                                                                     h3("Click here to unlock the network exploration and the multivariate analysis
+                                  column(2,
+                                         h3("Module Informations: "),
+                                         withSpinner(DT::dataTableOutput("Module_Information")),
+                                         downloadButton("downloadModule", "Download Modules")
+                                  )
+                                )
+                                # , #End third Row
+                                # h2("SparCC"),
+                                # fluidRow( #Begining fourth row
+                                #
+                                #   column(10,
+                                #          h3("SparCC Network"),
+                                #          uiOutput("buttonSparcc"),
+                                #          visNetworkOutput("sparcc.Network", height = 1000)
+                                #   )
+                                # ) #End Fourth Row
+                       ),
+                       tabPanel("Second Dataset", value = "NETWORK_INFERENCE_D2",
+                                fluidRow( #Beginning first row
+                                  column(4,
+                                         h3("Choose Your Preferences: "),
+                                         powers = c(c(1:10), seq(from = 12, to=20, by=2)),
+                                         uiOutput("Power2"),
+
+                                         actionButton("showPower2", "How to choose the right softPower ?"),
+
+                                         hr(),
+
+                                         uiOutput("ModuleSize2"),
+                                         actionButton("showMS2", "How to choose the right Module Size ?"),
+                                         hr(),
+                                         radioButtons('signed2', "Choose between a signed and a unsigned network: ",
+                                                      choices = c("signed", "unsigned"),
+                                                      selected = "signed"),
+
+                                         actionButton("showSigned2", "What is the difference between a signed and a unsigned Network ?"),
+
+                                         hr(),
+
+                                         radioButtons('corNetwork2', "Choose the correlation option for the network: ",
+                                                      choices= c('pearson', 'spearman', 'bicor'),
+                                                      selected = 'pearson'),
+
+
+                                         hr(),
+
+                                         uiOutput("buttonPower2"),
+
+                                         uiOutput("buttonNet2"),
+
+                                         radioButtons("pdf_or_svg_p3_dataset2",
+                                                      "Choose an extension:",
+                                                      choices = c("pdf", "svg")),
+
+                                         downloadButton("Download_Network_Creation_dataset2", "Download"),
+
+                                         hr()
+
+                                  ),
+                                  column(6,
+                                         h3("Scale Free Topoly against Soft Power: "),
+                                         withSpinner(plotOutput("ScaleFree2", height = 650))
+                                  ),
+                                  conditionalPanel("input.Omic3",
+                                                   column(2,
+                                                          h3("Click here to unlock the network exploration and the multivariate analysis
                                             (if you uploaded two counting tables)"),
-                                                                     actionButton("goD3", "Check your third dataset")
-                                                              )),
-                                             conditionalPanel("!input.Omic3",
-                                                              column(2,
-                                                                     h3("Click here to unlock the network exploration and the multivariate analysis
+                                                          actionButton("goD3", "Check your third dataset")
+                                                   )),
+                                  conditionalPanel("!input.Omic3",
+                                                   column(2,
+                                                          h3("Click here to unlock the network exploration and the multivariate analysis
                                             (if you uploaded two counting tables)"),
-                                                                     actionButton("enableTabulations_D2", "Explore your network")
-                                                              ))
-                                             
-                                           ), #End first Row
-                                           fluidRow( #Second Row
-                                             
-                                             column(6,
-                                                    h3("Classical Multidimensional Scaling plot to visualize the network"),
-                                                    withSpinner(uiOutput("multiScalePlotOutput2"))
-                                                    
-                                                    
-                                             ),
-                                             column(6,
-                                                    h3("Module Clustering: "),
-                                                    withSpinner(plotOutput("ModuleClustering2"))
-                                                    
-                                             )
-                                           ), # End Second Row
-                                           fluidRow( #Beginning Third Row
-                                             column(10,
-                                                    h3("Variables Dendrogramme with Module Colors: "),
-                                                    withSpinner(plotOutput("Dendrogramme_Colors2")),
-                                                    downloadButton("downloadEigenD2", "Download Modules\' Eigenvalues")
-                                             ),
-                                             column(2,
-                                                    h3("Module Informations: "),
-                                                    withSpinner(DT::dataTableOutput("Module_Information2")),
-                                                    
-                                                    downloadButton("downloadModuleD2", "Download Modules")
-                                             )
-                                           )
-                                           # , #End third Row
-                                           # h2("SparCC"),
-                                           # fluidRow( #Begining fourth row
-                                           # 
-                                           #   column(10,
-                                           #          h3("SparCC Network"),
-                                           #          uiOutput("buttonSparcc2"),
-                                           #          visNetworkOutput("sparcc.Network2", height = 1000)
-                                           #   )
-                                           # ) # End Fourth Row
+                                                          actionButton("enableTabulations_D2", "Explore your network")
+                                                   ))
+
+                                ), #End first Row
+                                fluidRow( #Second Row
+
+                                  column(6,
+                                         h3("Classical Multidimensional Scaling plot to visualize the network"),
+                                         withSpinner(uiOutput("multiScalePlotOutput2"))
+
+
+                                  ),
+                                  column(6,
+                                         h3("Module Clustering: "),
+                                         withSpinner(plotOutput("ModuleClustering2"))
+
+                                  )
+                                ), # End Second Row
+                                fluidRow( #Beginning Third Row
+                                  column(10,
+                                         h3("Variables Dendrogramme with Module Colors: "),
+                                         withSpinner(plotOutput("Dendrogramme_Colors2")),
+                                         downloadButton("downloadEigenD2", "Download Modules\' Eigenvalues")
+                                  ),
+                                  column(2,
+                                         h3("Module Informations: "),
+                                         withSpinner(DT::dataTableOutput("Module_Information2")),
+
+                                         downloadButton("downloadModuleD2", "Download Modules")
+                                  )
+                                )
+                                # , #End third Row
+                                # h2("SparCC"),
+                                # fluidRow( #Begining fourth row
+                                #
+                                #   column(10,
+                                #          h3("SparCC Network"),
+                                #          uiOutput("buttonSparcc2"),
+                                #          visNetworkOutput("sparcc.Network2", height = 1000)
+                                #   )
+                                # ) # End Fourth Row
+                       ),
+                       tabPanel("Third Dataset", value = "NETWORK_INFERENCE_D3",
+                                fluidRow( #Beginning first row
+                                  column(4,
+                                         h3("Choose Your Preferences: "),
+                                         powers = c(c(1:10), seq(from = 12, to=20, by=2)),
+                                         uiOutput("Power3"),
+
+                                         actionButton("showPower3", "How to choose the right softPower ?"),
+
+                                         hr(),
+
+                                         uiOutput("ModuleSize3"),
+                                         actionButton("showMS3", "How to choose the right Module Size ?"),
+                                         hr(),
+                                         radioButtons('signed3', "Choose between a signed and a unsigned network: ",
+                                                      choices = c("signed", "unsigned"),
+                                                      selected = "signed"),
+
+                                         actionButton("showSigned3", "What is the difference between a signed and a unsigned Network ?"),
+
+                                         hr(),
+
+                                         radioButtons('corNetwork3', "Choose the correlation option for the network: ",
+                                                      choices= c('pearson', 'spearman', 'bicor'),
+                                                      selected = 'pearson'),
+
+
+                                         hr(),
+
+                                         uiOutput("buttonPower3"),
+
+                                         uiOutput("buttonNet3"),
+
+                                         radioButtons("pdf_or_svg_p3_dataset3",
+                                                      "Choose an extension:",
+                                                      choices = c("pdf", "svg")),
+
+                                         downloadButton("Download_Network_Creation_dataset3", "Download"),
+
+                                         hr()
+
+                                  ),
+                                  column(6,
+                                         h3("Scale Free Topoly against Soft Power: "),
+                                         withSpinner(plotOutput("ScaleFree3", height = 650))
+
                                   ),
-                                  tabPanel("Third Dataset", value = "NETWORK_INFERENCE_D3",
-                                           fluidRow( #Beginning first row
-                                             column(4,
-                                                    h3("Choose Your Preferences: "),
-                                                    powers = c(c(1:10), seq(from = 12, to=20, by=2)),
-                                                    uiOutput("Power3"),
-                                                    
-                                                    actionButton("showPower3", "How to choose the right softPower ?"),
-                                                    
-                                                    hr(),
-                                                    
-                                                    uiOutput("ModuleSize3"),
-                                                    actionButton("showMS3", "How to choose the right Module Size ?"),
-                                                    hr(),
-                                                    radioButtons('signed3', "Choose between a signed and a unsigned network: ",
-                                                                 choices = c("signed", "unsigned"),
-                                                                 selected = "signed"),
-                                                    
-                                                    actionButton("showSigned3", "What is the difference between a signed and a unsigned Network ?"),
-                                                    
-                                                    hr(),
-                                                    
-                                                    radioButtons('corNetwork3', "Choose the correlation option for the network: ",
-                                                                 choices= c('pearson', 'spearman', 'bicor'),
-                                                                 selected = 'pearson'),
-                                                    
-                                                    
-                                                    hr(),
-                                                    
-                                                    uiOutput("buttonPower3"),
-                                                    
-                                                    uiOutput("buttonNet3"),
-                                                    
-                                                    radioButtons("pdf_or_svg_p3_dataset3",
-                                                                 "Choose an extension:",
-                                                                 choices = c("pdf", "svg")),
-                                                    
-                                                    downloadButton("Download_Network_Creation_dataset3", "Download"),
-                                                    
-                                                    hr()
-                                                    
-                                             ),
-                                             column(6,
-                                                    h3("Scale Free Topoly against Soft Power: "),
-                                                    withSpinner(plotOutput("ScaleFree3", height = 650))
-                                                    
-                                             ),
-                                             column(2,
-                                                    h3("Click here to unlock the network exploration and the multivariate analysis
+                                  column(2,
+                                         h3("Click here to unlock the network exploration and the multivariate analysis
                                             (if you uploaded two or counting tables)"),
-                                                    actionButton("enableTabulations_D3", "Explore your network")
-                                                    
-                                             )
-                                             
-                                           ), #End first Row
-                                           fluidRow( #Second Row
-                                             
-                                             column(6,
-                                                    h3("Classical Multidimensional Scaling plot to visualize the network"),
-                                                    withSpinner(uiOutput("multiScalePlotOutput3"))
-                                             ),
-                                             column(6,
-                                                    h3("Module Clustering: "),
-                                                    withSpinner(plotOutput("ModuleClustering3"))
-                                             )
-                                           ), # End Second Row
-                                           fluidRow( #Beginning Third Row
-                                             column(10,
-                                                    h3("Variables Dendrogramme with Module Colors: "),
-                                                    withSpinner(plotOutput("Dendrogramme_Colors3")),
-                                                    downloadButton("downloadEigenD3", "Download Modules\' Eigenvalues")
-                                             ),
-                                             column(2,
-                                                    h3("Module Informations: "),
-                                                    withSpinner(DT::dataTableOutput("Module_Information3")),
-                                                    downloadButton("downloadModuleD3", "Download Modules")
-                                             )
-                                           )
-                                           # , #End third Row
-                                           # h2("SparCC"),
-                                           # fluidRow( #Begining fourth row
-                                           # 
-                                           #   column(10,
-                                           #          h3("SparCC Network"),
-                                           #          uiOutput("buttonSparcc2"),
-                                           #          visNetworkOutput("sparcc.Network2", height = 1000)
-                                           #   )
-                                           # ) # End Fourth Row
+                                         actionButton("enableTabulations_D3", "Explore your network")
+
                                   )
-                      )
-             ), # End third Page
-             
-             ### PAGE 4 ###
-             # tabPanel("SPARCC", #Beginning page 4
-             #          id = "SPARCC",
-             #          icon = icon("spinner"),
-             #          fluidRow( #First Row
-             #            column(9,
-             #                   h3("SparCC Network"),
-             #                   visNetworkOutput("sparcc.Network")
-             #            )
+
+                                ), #End first Row
+                                fluidRow( #Second Row
+
+                                  column(6,
+                                         h3("Classical Multidimensional Scaling plot to visualize the network"),
+                                         withSpinner(uiOutput("multiScalePlotOutput3"))
+                                  ),
+                                  column(6,
+                                         h3("Module Clustering: "),
+                                         withSpinner(plotOutput("ModuleClustering3"))
+                                  )
+                                ), # End Second Row
+                                fluidRow( #Beginning Third Row
+                                  column(10,
+                                         h3("Variables Dendrogramme with Module Colors: "),
+                                         withSpinner(plotOutput("Dendrogramme_Colors3")),
+                                         downloadButton("downloadEigenD3", "Download Modules\' Eigenvalues")
+                                  ),
+                                  column(2,
+                                         h3("Module Informations: "),
+                                         withSpinner(DT::dataTableOutput("Module_Information3")),
+                                         downloadButton("downloadModuleD3", "Download Modules")
+                                  )
+                                )
+                                # , #End third Row
+                                # h2("SparCC"),
+                                # fluidRow( #Begining fourth row
+                                #
+                                #   column(10,
+                                #          h3("SparCC Network"),
+                                #          uiOutput("buttonSparcc2"),
+                                #          visNetworkOutput("sparcc.Network2", height = 1000)
+                                #   )
+                                # ) # End Fourth Row
+                       )
+                       )
+           ), # End third Page
+
+ ### PAGE 4 ###
+  # tabPanel("SPARCC", #Beginning page 4
+  #          id = "SPARCC",
+  #          icon = icon("spinner"),
+  #          fluidRow( #First Row
+  #            column(9,
+  #                   h3("SparCC Network"),
+  #                   visNetworkOutput("sparcc.Network")
+  #            )
              # ,
              # column(3,
              #        h3("Module information:"),
              #        DT::dataTableOutput("sparcc_table")
              # )
-             # )
-             # ,# End First Row
-             # fluidRow( #beginning second row
-             #   column(3,
-             #          h3("Choose your preferences:"),
-             #          uiOutput("SelectModule_sparcc"),
-             #          uiOutput("SelectTaxo_sparcc"))
-             # ), #End second row
-             # fluidRow(
-             #   column(6,
-             #          h3("Relative Abundance SparCC Network Modules"),
-             #          #verbatimTextOutput("Relative_Abundance_Module_sparcc")
-             #          plotlyOutput("Relative_Abundance_Module_sparcc", height = 650)
-             #
-             #   ),
-             #   column(6,
-             #          h3("Correlation between the modules and the external variables"),
-             #          #verbatimTextOutput("Relative_Abundance_Module_sparcc")
-             #          iheatmaprOutput("HEATMAP_SPARCC", height = 650)
-             #
-             #   )
-             # ) #Beginning third row
-             
-             # ), # End Page 5
-             
-             #### PAGE 4 ####
-             tabPanel("NETWORK_EXPLORATION", # Beginning fourth page
-                      id = "NETWORK_EXPLORATION",
-                      icon = icon("share-alt-square"),
-                      tabsetPanel(type = "tabs",
-                                  tabPanel("First Dataset",
-                                           fluidRow( # first row
-                                             column(3,
-                                                    h3("Choose Your Preferences"),
-                                                    p("In this section you will be able to explore the genes or OTUs of specific modules."),
-                                                    p("The selection inputs under each plots allow you to select your preferences"),
-                                                    p("First, take a look at the heatmap on your right and try to find interesting correlation. For the
+           # )
+           # ,# End First Row
+           # fluidRow( #beginning second row
+           #   column(3,
+           #          h3("Choose your preferences:"),
+           #          uiOutput("SelectModule_sparcc"),
+           #          uiOutput("SelectTaxo_sparcc"))
+           # ), #End second row
+           # fluidRow(
+           #   column(6,
+           #          h3("Relative Abundance SparCC Network Modules"),
+           #          #verbatimTextOutput("Relative_Abundance_Module_sparcc")
+           #          plotlyOutput("Relative_Abundance_Module_sparcc", height = 650)
+           #
+           #   ),
+           #   column(6,
+           #          h3("Correlation between the modules and the external variables"),
+           #          #verbatimTextOutput("Relative_Abundance_Module_sparcc")
+           #          iheatmaprOutput("HEATMAP_SPARCC", height = 650)
+           #
+           #   )
+           # ) #Beginning third row
+
+  # ), # End Page 5
+
+ #### PAGE 4 ####
+ tabPanel("NETWORK_EXPLORATION", # Beginning fourth page
+          id = "NETWORK_EXPLORATION",
+          icon = icon("share-alt-square"),
+          tabsetPanel(type = "tabs",
+                      tabPanel("First Dataset",
+                               fluidRow( # first row
+                                 column(3,
+                                        h3("Choose Your Preferences"),
+                                        p("In this section you will be able to explore the genes or OTUs of specific modules."),
+                                        p("The selection inputs under each plots allow you to select your preferences"),
+                                        p("First, take a look at the heatmap on your right and try to find interesting correlation. For the
                                           modules and variables of your choice, explore their specificity in the network to better understand what
                                           links these entity together."),
-                                                    hr(),
-                                                    radioButtons("selectCorrelation", label = "Choose a correlation method to link modules to external traits:",
-                                                                 choices = list("Spearman" = "spearman", "Pearson" = "pearson", "Kendall" = "kendall"),
-                                                                 selected = "spearman"),
-                                                    checkboxInput("correctPval", "Pvalue correction", value = FALSE),
-                                                    uiOutput("SelectModule"),
-                                                    hr(),
-                                                    
-                                                    radioButtons("pdf_or_svg_p4",
-                                                                 "Choose an extension:",
-                                                                 choices = c("pdf", "svg")),
-                                                    sliderInput("widthPDF", "Figures Width:", min = 10, max = 100, value = 30),
-                                                    sliderInput("heightPDF", "Figures Height: ", min = 10, max = 100, value = 30),
-                                                    downloadButton("Download_Network_Exploration", "Download"),
-                                                    downloadButton("association_module_trait", "DownloadCSV")
-                                                    
-                                                    
-                                             ),
-                                             column(9,
-                                                    title = "Module's Correlation to External Traits",
-                                                    plotOutput("Corr_External_Trait", height = 1000, width = 1000)
-                                             )
-                                             
-                                           ), # end first row
-                                           br(),
-                                           br(),
-                                           fluidRow( # Beginning Second Row
-                                             column(6,
-                                                    h3("Contribution of the Samples to the Modules"),
-                                                    withSpinner(plotOutput("Sample_Contribution", height = 650)),
-                                                    uiOutput("SelectVariable_barplot"),
-                                                    actionButton("moduleContrib", "What does this plot mean ?")
-                                             ),
-                                             column(6,
-                                                    h3("Variable's Correlation to External Trait Against Module Membership"),
-                                                    withSpinner(plotOutput("Module_Membership", height = 650)),
-                                                    uiOutput("SelectVariable1"),
-                                                    actionButton("moduleMembership", "What does this plot mean ?")
-                                             )
-                                           ), # End Second Row
-                                           br(),
-                                           hr(),
-                                           br(),
-                                           fluidRow( # Beginning Third Row
-                                             column(9,
-                                                    title = "Module Specificity",
-                                                    withSpinner(plotOutput("Relative_Abundance_Module", height = 1000))
-                                             ),
-                                             column(3,
-                                                    uiOutput("SelectTaxo1"),
-                                                    uiOutput("SelectVariable_RelAb")
-                                             )
-                                           ),
-                                           br(),
-                                           fluidRow(
-                                             h2("PLS and VIP Scores"),
-                                             column(3,
-                                                    uiOutput("sampleAnnotSelection"),
-                                                    uiOutput("colorModule"),
-                                                    actionButton("nbComp", "How many components ?")),
-                                             
-                                             column(3,
-                                                    withSpinner(plotOutput("ncomp")),
-                                                    numericInput("ncomponent", "Number of Components:",
-                                                                 1, min = 1, max = 10,
-                                                                 value = 1),
-                                                    
-                                                    
-                                                    downloadButton("PLS_VIP", "Download Module Content"),
-                                                    downloadButton("edge_node_D1", "Download Cytoscape")),
-                                             column(6,
-                                                    h3("PLS"),
-                                                    withSpinner(plotOutput("PLS")),
-                                                    h5("CVS:"),
-                                                    withSpinner(textOutput("CVS")))
-                                           ),
-                                           fluidRow(
-                                             column(9,
-                                                    h2("Hive Plot"),
-                                                    uiOutput("taxAnnot"),
-                                                    withSpinner(plotOutput("edge_node", height = 1000)),
-                                                    actionButton("hivePlotPLS", "What does this plot mean ?"),
-                                                    h2("What are the significant important variables of your module ?"),
-                                                    checkboxInput("corrPval", "Correct the pvalues ?", value=FALSE),
-                                                    sliderInput("showNames", "Changes variable name sizes:", min=0, max=5, value=2),
-                                                    withSpinner(plotOutput("vip.pval")),
-                                                    actionButton("vip.pval.plot", "What does this plot mean ?"),
-                                                    radioButtons("pdf_or_svg_hive_p4",
-                                                                 "Choose an extension:",
-                                                                 choices = c("pdf", "svg")),
-                                                    sliderInput("HIVEwidthPDF", "Figures Width:", min = 10, max = 100, value = 30),
-                                                    sliderInput("HIVEheightPDF", "Figures Height: ", min = 10, max = 100, value = 30),
-                                                    downloadButton("hivePlot_D1", "Download")
-                                                    
-                                             )
-                                           )
-                                           
-                                           # End Third Row
-                                  ),
-                                  tabPanel("Second Dataset",
-                                           fluidRow( # first row
-                                             column(3,
-                                                    h3("Choose Your Preferences"),
-                                                    p("In this section you will be able to explore the genes or OTUs of specific modules."),
-                                                    p("The selection inputs under each plots allow you to select your preferences"),
-                                                    p("First, take a look at the heatmap on your right and try to find interesting correlation. For the
+                                        hr(),
+                                        radioButtons("selectCorrelation", label = "Choose a correlation method to link modules to external traits:",
+                                                     choices = list("Spearman" = "spearman", "Pearson" = "pearson", "Kendall" = "kendall"),
+                                                     selected = "spearman"),
+                                        checkboxInput("correctPval", "Pvalue correction", value = FALSE),
+                                        uiOutput("SelectModule"),
+                                        hr(),
+
+                                        radioButtons("pdf_or_svg_p4",
+                                                     "Choose an extension:",
+                                                     choices = c("pdf", "svg")),
+                                        sliderInput("widthPDF", "Figures Width:", min = 10, max = 100, value = 30),
+                                        sliderInput("heightPDF", "Figures Height: ", min = 10, max = 100, value = 30),
+                                        downloadButton("Download_Network_Exploration", "Download"),
+                                        downloadButton("association_module_trait", "DownloadCSV")
+
+
+                                        ),
+                                 column(9,
+                                        title = "Module's Correlation to External Traits",
+                                        plotOutput("Corr_External_Trait", height = 1000, width = 1000)
+                                 )
+
+                                 ), # end first row
+                               br(),
+                               br(),
+                               fluidRow( # Beginning Second Row
+                                 column(6,
+                                        h3("Contribution of the Samples to the Modules"),
+                                        withSpinner(plotOutput("Sample_Contribution", height = 650)),
+                                        uiOutput("SelectVariable_barplot"),
+                                        actionButton("moduleContrib", "What does this plot mean ?")
+                                 ),
+                                 column(6,
+                                        h3("Variable's Correlation to External Trait Against Module Membership"),
+                                        withSpinner(plotOutput("Module_Membership", height = 650)),
+                                        uiOutput("SelectVariable1"),
+                                        actionButton("moduleMembership", "What does this plot mean ?")
+                                 )
+                               ), # End Second Row
+                               br(),
+                               hr(),
+                               br(),
+                               fluidRow( # Beginning Third Row
+                                 column(9,
+                                        title = "Module Specificity",
+                                        withSpinner(plotOutput("Relative_Abundance_Module", height = 1000))
+                                 ),
+                                 column(3,
+                                        uiOutput("SelectTaxo1"),
+                                        uiOutput("SelectVariable_RelAb")
+                                 )
+                               ),
+                               br(),
+                               fluidRow(
+                                 h2("PLS and VIP Scores"),
+                                 column(3,
+                                        uiOutput("sampleAnnotSelection"),
+                                        uiOutput("colorModule"),
+                                        actionButton("nbComp", "How many components ?")),
+
+                                 column(3,
+                                        withSpinner(plotOutput("ncomp")),
+                                        numericInput("ncomponent", "Number of Components:",
+                                                     1, min = 1, max = 10,
+                                                     value = 1),
+
+
+                                        downloadButton("PLS_VIP", "Download Module Content")),
+                                 column(6,
+                                        h3("PLS"),
+                                        withSpinner(plotOutput("PLS")),
+                                        h5("CVS:"),
+                                        withSpinner(textOutput("CVS")))
+                               ),
+                               fluidRow(
+                                 column(9,
+                                        h2("Hive Plot"),
+                                        uiOutput("taxAnnot"),
+                                        withSpinner(plotOutput("edge_node", height = 1000)),
+                                        actionButton("hivePlotPLS", "What does this plot mean ?"),
+                                        h2("What are the significant important variables of your module ?"),
+                                        checkboxInput("corrPval", "Correct the pvalues ?", value=FALSE),
+                                        sliderInput("showNames", "Changes variable name sizes:", min=0, max=5, value=2),
+                                        withSpinner(plotOutput("vip.pval")),
+                                        actionButton("vip.pval.plot", "What does this plot mean ?"),
+                                        radioButtons("pdf_or_svg_hive_p4",
+                                                     "Choose an extension:",
+                                                     choices = c("pdf", "svg")),
+                                        sliderInput("HIVEwidthPDF", "Figures Width:", min = 10, max = 100, value = 30),
+                                        sliderInput("HIVEheightPDF", "Figures Height: ", min = 10, max = 100, value = 30),
+                                        downloadButton("hivePlot_D1", "Download")
+
+                                 )
+                               )
+
+                               # End Third Row
+          ),
+          tabPanel("Second Dataset",
+                   fluidRow( # first row
+                     column(3,
+                            h3("Choose Your Preferences"),
+                            p("In this section you will be able to explore the genes or OTUs of specific modules."),
+                            p("The selection inputs under each plots allow you to select your preferences"),
+                            p("First, take a look at the heatmap on your right and try to find interesting correlation. For the
                               modules and variables of your choice, explore their specificity in the network to better understand what
                               links these entity together."),
-                                                    hr(),
-                                                    radioButtons("selectCorrelationSec", label = "Choose a correlation method to link modules to external traits:",
-                                                                 choices = list("Spearman" = "spearman", "Pearson" = "pearson", "Kendall" = "kendall"),
-                                                                 selected = "spearman"),
-                                                    checkboxInput("correctPval2", "Pvalue correction", value = FALSE),
-                                                    uiOutput("SelectModuleSec"),
-                                                    hr(),
-                                                    radioButtons("pdf_or_svg_p4_dataset2",
-                                                                 "Choose an extension:",
-                                                                 choices = c("pdf", "svg")),
-                                                    sliderInput("widthPDF_D2", "Figures Width: ", min = 10, max = 100, value = 30),
-                                                    sliderInput("heightPDF_D2", "Figures Height: ", min = 10, max = 100, value = 30),
-                                                    
-                                                    downloadButton("Download_Network_Exploration_dataset_2", "Download"),
-                                                    downloadButton("association_module_trait_D2", "DownloadCSV")
-                                                    
-                                                    
-                                             )
-                                             ,
-                                             column(9,
-                                                    title = "Module's Correlation to External Traits",
-                                                    withSpinner(plotOutput("Corr_External_TraitSec", height = 1000, width = 1000))
-                                             )
-                                             
-                                           ), # end first row
-                                           br(),
-                                           br(),
-                                           fluidRow( # Beginning Second Row
-                                             column(6,
-                                                    h3("Contribution of the Samples to the Modules"),
-                                                    withSpinner(plotOutput("Sample_ContributionSec", height = 650)),
-                                                    uiOutput("SelectVariable_barplotSec"),
-                                                    actionButton("moduleContrib2", "What does this plot mean ?")
-                                             ),
-                                             column(6,
-                                                    h3("Variable's Correlation to External Trait Against Module Membership"),
-                                                    withSpinner(plotOutput("Module_MembershipSec", height = 650)),
-                                                    uiOutput("SelectVariable1Sec"),
-                                                    actionButton("moduleMembership2", "What does this plot mean ?")
-                                             )
-                                           ), # End Second Row
-                                           br(),
-                                           hr(),
-                                           br(),
-                                           fluidRow( # Beginning Third Row
-                                             column(6,
-                                                    title = "Module Specificity",
-                                                    withSpinner(plotOutput("Relative_Abundance_ModuleSec", height = 650))
-                                             ),
-                                             column(3,
-                                                    uiOutput("SelectTaxo1Sec"),
-                                                    uiOutput("SelectVariable_RelAbSec")
-                                             )
-                                           ),
-                                           br(),
-                                           fluidRow(
-                                             h2("PLS and VIP Scores"),
-                                             column(3,
-                                                    uiOutput("sampleAnnotSelection_D2"),
-                                                    uiOutput("colorModule_D2"),
-                                                    actionButton("nbComp2", "How many components ?")),
-                                             column(3,
-                                                    withSpinner(plotOutput("ncomp_D2")),
-                                                    numericInput("ncomponent_D2", "Number of Components:",
-                                                                 1, min = 1, max = 10,
-                                                                 value = 1),
-                                                    
-                                                    downloadButton("PLS_VIP_D2", "Download Module Content"),
-                                                    downloadButton("edge_node_D2", "Download Cytoscape")),
-                                             column(6,
-                                                    h3("PLS"),
-                                                    withSpinner(plotOutput("PLS_D2")),
-                                                    h5("CVS:"),
-                                                    withSpinner(textOutput("CVS_D2")))
-                                             
-                                           ),
-                                           fluidRow(
-                                             column(9,
-                                                    h2("Hive Plot"),
-                                                    uiOutput("taxAnnotSec"),
-                                                    withSpinner(plotOutput("edge_node_D2", height = 1000)),
-                                                    actionButton("hivePlotPLS2", "What does this plot mean ?"),
-                                                    h2("What are the significant important variables of your module ?"),
-                                                    checkboxInput("corrPval_D2", "Correct the pvalues ?", value=FALSE),
-                                                    sliderInput("showNames_D2", "Changes variable name sizes:", min=0, max=5, value=2),
-                                                    withSpinner(plotOutput("vip.pval_D2")),
-                                                    actionButton("vip.pval.plot_D2", "What does this plot mean ?"),
-                                                    radioButtons("pdf_or_svg_hiveD2_p4",
-                                                                 "Choose an extension:",
-                                                                 choices = c("pdf", "svg")),
-                                                    sliderInput("HIVED2widthPDF", "Figures Width:", min = 10, max = 100, value = 30),
-                                                    sliderInput("HIVED2heightPDF", "Figures Height: ", min = 10, max = 100, value = 30),
-                                                    downloadButton("hivePlot_D2", "Download")
-                                                    
-                                             )
-                                             
-                                           )
-                                  ),
-                                  tabPanel("Third Dataset",
-                                           fluidRow( # first row
-                                             column(3,
-                                                    h3("Choose Your Preferences"),
-                                                    p("In this section you will be able to explore the genes or OTUs of specific modules."),
-                                                    p("The selection inputs under each plots allow you to select your preferences"),
-                                                    p("First, take a look at the heatmap on your right and try to find interesting correlation. For the
+                            hr(),
+                            radioButtons("selectCorrelationSec", label = "Choose a correlation method to link modules to external traits:",
+                                         choices = list("Spearman" = "spearman", "Pearson" = "pearson", "Kendall" = "kendall"),
+                                         selected = "spearman"),
+                            checkboxInput("correctPval2", "Pvalue correction", value = FALSE),
+                            uiOutput("SelectModuleSec"),
+                            hr(),
+                            radioButtons("pdf_or_svg_p4_dataset2",
+                                         "Choose an extension:",
+                                         choices = c("pdf", "svg")),
+                            sliderInput("widthPDF_D2", "Figures Width: ", min = 10, max = 100, value = 30),
+                            sliderInput("heightPDF_D2", "Figures Height: ", min = 10, max = 100, value = 30),
+
+                            downloadButton("Download_Network_Exploration_dataset_2", "Download"),
+                            downloadButton("association_module_trait_D2", "DownloadCSV")
+
+
+                            )
+                     ,
+                     column(9,
+                            title = "Module's Correlation to External Traits",
+                            withSpinner(plotOutput("Corr_External_TraitSec", height = 1000, width = 1000))
+                     )
+
+                     ), # end first row
+                   br(),
+                   br(),
+                   fluidRow( # Beginning Second Row
+                     column(6,
+                            h3("Contribution of the Samples to the Modules"),
+                            withSpinner(plotOutput("Sample_ContributionSec", height = 650)),
+                            uiOutput("SelectVariable_barplotSec"),
+                            actionButton("moduleContrib2", "What does this plot mean ?")
+                     ),
+                     column(6,
+                            h3("Variable's Correlation to External Trait Against Module Membership"),
+                            withSpinner(plotOutput("Module_MembershipSec", height = 650)),
+                            uiOutput("SelectVariable1Sec"),
+                            actionButton("moduleMembership2", "What does this plot mean ?")
+                     )
+                   ), # End Second Row
+                   br(),
+                   hr(),
+                   br(),
+                   fluidRow( # Beginning Third Row
+                     column(6,
+                            title = "Module Specificity",
+                            withSpinner(plotOutput("Relative_Abundance_ModuleSec", height = 650))
+                     ),
+                     column(3,
+                            uiOutput("SelectTaxo1Sec"),
+                            uiOutput("SelectVariable_RelAbSec")
+                     )
+                   ),
+                   br(),
+                   fluidRow(
+                     h2("PLS and VIP Scores"),
+                     column(3,
+                            uiOutput("sampleAnnotSelection_D2"),
+                            uiOutput("colorModule_D2"),
+                            actionButton("nbComp2", "How many components ?")),
+                     column(3,
+                            withSpinner(plotOutput("ncomp_D2")),
+                            numericInput("ncomponent_D2", "Number of Components:",
+                                         1, min = 1, max = 10,
+                                         value = 1),
+
+                            downloadButton("PLS_VIP_D2", "Download Module Content")),
+                     column(6,
+                            h3("PLS"),
+                            withSpinner(plotOutput("PLS_D2")),
+                            h5("CVS:"),
+                            withSpinner(textOutput("CVS_D2")))
+
+                   ),
+                   fluidRow(
+                     column(9,
+                            h2("Hive Plot"),
+                            uiOutput("taxAnnotSec"),
+                            withSpinner(plotOutput("edge_node_D2", height = 1000)),
+                            actionButton("hivePlotPLS2", "What does this plot mean ?"),
+                            h2("What are the significant important variables of your module ?"),
+                            checkboxInput("corrPval_D2", "Correct the pvalues ?", value=FALSE),
+                            sliderInput("showNames_D2", "Changes variable name sizes:", min=0, max=5, value=2),
+                            withSpinner(plotOutput("vip.pval_D2")),
+                            actionButton("vip.pval.plot_D2", "What does this plot mean ?"),
+                            radioButtons("pdf_or_svg_hiveD2_p4",
+                                         "Choose an extension:",
+                                         choices = c("pdf", "svg")),
+                            sliderInput("HIVED2widthPDF", "Figures Width:", min = 10, max = 100, value = 30),
+                            sliderInput("HIVED2heightPDF", "Figures Height: ", min = 10, max = 100, value = 30),
+                            downloadButton("hivePlot_D2", "Download")
+
+                     )
+
+                   )
+ ),
+ tabPanel("Third Dataset",
+          fluidRow( # first row
+            column(3,
+                   h3("Choose Your Preferences"),
+                   p("In this section you will be able to explore the genes or OTUs of specific modules."),
+                   p("The selection inputs under each plots allow you to select your preferences"),
+                   p("First, take a look at the heatmap on your right and try to find interesting correlation. For the
                               modules and variables of your choice, explore their specificity in the network to better understand what
                               links these entity together."),
-                                                    hr(),
-                                                    radioButtons("selectCorrelationTer", label = "Choose a correlation method to link modules to external traits:",
-                                                                 choices = list("Spearman" = "spearman", "Pearson" = "pearson", "Kendall" = "kendall"),
-                                                                 selected = "spearman"),
-                                                    checkboxInput("correctPval3", "Pvalue correction", value = FALSE),
-                                                    uiOutput("SelectModuleTer"),
-                                                    hr(),
-                                                    radioButtons("pdf_or_svg_p4_dataset3",
-                                                                 "Choose an extension:",
-                                                                 choices = c("pdf", "svg")),
-                                                    sliderInput("widthPDF_D3", "Figures Width: ", min = 10, max = 100, value = 30),
-                                                    sliderInput("heightPDF_D3", "Figures Height: ", min = 10, max = 100, value = 30),
-                                                    
-                                                    downloadButton("Download_Network_Exploration_dataset_3", "Download"),
-                                                    downloadButton("association_module_trait_D3", "DownloadCSV")
-                                                    
-                                                    
-                                             )
-                                             ,
-                                             column(9,
-                                                    title = "Module's Correlation to External Traits",
-                                                    withSpinner(plotOutput("Corr_External_TraitTer", height = 1000, width = 1000))
-                                             )
-                                             
-                                           ), # end first row
-                                           br(),
-                                           br(),
-                                           fluidRow( # Beginning Second Row
-                                             column(6,
-                                                    h3("Contribution of the Samples to the Modules"),
-                                                    withSpinner(plotOutput("Sample_ContributionTer", height = 650)),
-                                                    uiOutput("SelectVariable_barplotTer"),
-                                                    actionButton("moduleContrib3", "What does this plot mean ?")
-                                             ),
-                                             column(6,
-                                                    h3("Variable's Correlation to External Trait Against Module Membership"),
-                                                    withSpinner(plotOutput("Module_MembershipTer", height = 650)),
-                                                    uiOutput("SelectVariable1Ter"),
-                                                    actionButton("moduleMembership3", "What does this plot mean ?")
-                                             )
-                                           ), # End Second Row
-                                           br(),
-                                           hr(),
-                                           br(),
-                                           fluidRow( # Beginning Third Row
-                                             column(6,
-                                                    title = "Module Specificity",
-                                                    withSpinner(plotOutput("Relative_Abundance_ModuleTer", height = 650))
-                                             ),
-                                             column(3,
-                                                    uiOutput("SelectTaxo1Ter"),
-                                                    uiOutput("SelectVariable_RelAbTer")
-                                             )
-                                           ),
-                                           br(),
-                                           fluidRow(
-                                             h2("PLS and VIP Scores"),
-                                             column(3,
-                                                    uiOutput("sampleAnnotSelection_D3"),
-                                                    uiOutput("colorModule_D3"),
-                                                    actionButton("nbComp3", "How many components ?")),
-                                             column(3,
-                                                    withSpinner(plotOutput("ncomp_D3")),
-                                                    numericInput("ncomponent_D3", "Number of Components:",
-                                                                 1, min = 1, max = 10,
-                                                                 value = 1),
-                                                    
-                                                    downloadButton("PLS_VIP_D3", "Download Module Content"),
-                                                    downloadButton("edge_node_D3", "Download Cytoscape")),
-                                             column(6,
-                                                    h3("PLS"),
-                                                    withSpinner(plotOutput("PLS_D3")),
-                                                    h5("CVS:"),
-                                                    withSpinner(textOutput("CVS_D3")))
-                                             
-                                           ),
-                                           fluidRow(
-                                             column(9,
-                                                    h2("Hive Plot"),
-                                                    uiOutput("taxAnnotTer"),
-                                                    withSpinner(plotOutput("edge_node_D3", height = 1000)),
-                                                    actionButton("hivePlotPLS3", "What does this plot mean ?"),
-                                                    h2("What are the significant important variables of your module ?"),
-                                                    checkboxInput("corrPval_D3", "Correct the pvalues ?", value=FALSE),
-                                                    sliderInput("showNames_D3", "Changes variable name sizes:", min=0, max=5, value=2),
-                                                    withSpinner(plotOutput("vip.pval_D3")),
-                                                    actionButton("vip.pval.plot_D3", "What does this plot mean ?"),
-                                                    radioButtons("pdf_or_svg_hiveD3_p4",
-                                                                 "Choose an extension:",
-                                                                 choices = c("pdf", "svg")),
-                                                    sliderInput("HIVED3widthPDF", "Figures Width:", min = 10, max = 100, value = 30),
-                                                    sliderInput("HIVED3heightPDF", "Figures Height: ", min = 10, max = 100, value = 30),
-                                                    downloadButton("hivePlot_D3", "Download")
-                                                    
-                                             )
-                                             
+                   hr(),
+                   radioButtons("selectCorrelationTer", label = "Choose a correlation method to link modules to external traits:",
+                                choices = list("Spearman" = "spearman", "Pearson" = "pearson", "Kendall" = "kendall"),
+                                selected = "spearman"),
+                   checkboxInput("correctPval3", "Pvalue correction", value = FALSE),
+                   uiOutput("SelectModuleTer"),
+                   hr(),
+                   radioButtons("pdf_or_svg_p4_dataset3",
+                                "Choose an extension:",
+                                choices = c("pdf", "svg")),
+                   sliderInput("widthPDF_D3", "Figures Width: ", min = 10, max = 100, value = 30),
+                   sliderInput("heightPDF_D3", "Figures Height: ", min = 10, max = 100, value = 30),
+
+                   downloadButton("Download_Network_Exploration_dataset_3", "Download"),
+                   downloadButton("association_module_trait_D3", "DownloadCSV")
+
+
+            )
+            ,
+            column(9,
+                   title = "Module's Correlation to External Traits",
+                   withSpinner(plotOutput("Corr_External_TraitTer", height = 1000, width = 1000))
+            )
+
+          ), # end first row
+          br(),
+          br(),
+          fluidRow( # Beginning Second Row
+            column(6,
+                   h3("Contribution of the Samples to the Modules"),
+                   withSpinner(plotOutput("Sample_ContributionTer", height = 650)),
+                   uiOutput("SelectVariable_barplotTer"),
+                   actionButton("moduleContrib3", "What does this plot mean ?")
+            ),
+            column(6,
+                   h3("Variable's Correlation to External Trait Against Module Membership"),
+                   withSpinner(plotOutput("Module_MembershipTer", height = 650)),
+                   uiOutput("SelectVariable1Ter"),
+                   actionButton("moduleMembership3", "What does this plot mean ?")
+            )
+          ), # End Second Row
+          br(),
+          hr(),
+          br(),
+          fluidRow( # Beginning Third Row
+            column(6,
+                   title = "Module Specificity",
+                   withSpinner(plotOutput("Relative_Abundance_ModuleTer", height = 650))
+            ),
+            column(3,
+                   uiOutput("SelectTaxo1Ter"),
+                   uiOutput("SelectVariable_RelAbTer")
+            )
+          ),
+          br(),
+          fluidRow(
+            h2("PLS and VIP Scores"),
+            column(3,
+                   uiOutput("sampleAnnotSelection_D3"),
+                   uiOutput("colorModule_D3"),
+                   actionButton("nbComp3", "How many components ?")),
+            column(3,
+                   withSpinner(plotOutput("ncomp_D3")),
+                   numericInput("ncomponent_D3", "Number of Components:",
+                                1, min = 1, max = 10,
+                                value = 1),
+
+                   downloadButton("PLS_VIP_D3", "Download Module Content")),
+            column(6,
+                   h3("PLS"),
+                   withSpinner(plotOutput("PLS_D3")),
+                   h5("CVS:"),
+                   withSpinner(textOutput("CVS_D3")))
+
+          ),
+          fluidRow(
+            column(9,
+                   h2("Hive Plot"),
+                   uiOutput("taxAnnotTer"),
+                   withSpinner(plotOutput("edge_node_D3", height = 1000)),
+                   actionButton("hivePlotPLS3", "What does this plot mean ?"),
+                   h2("What are the significant important variables of your module ?"),
+                   checkboxInput("corrPval_D3", "Correct the pvalues ?", value=FALSE),
+                   sliderInput("showNames_D3", "Changes variable name sizes:", min=0, max=5, value=2),
+                   withSpinner(plotOutput("vip.pval_D3")),
+                   actionButton("vip.pval.plot_D3", "What does this plot mean ?"),
+                   radioButtons("pdf_or_svg_hiveD3_p4",
+                                "Choose an extension:",
+                                choices = c("pdf", "svg")),
+                   sliderInput("HIVED3widthPDF", "Figures Width:", min = 10, max = 100, value = 30),
+                   sliderInput("HIVED3heightPDF", "Figures Height: ", min = 10, max = 100, value = 30),
+                   downloadButton("hivePlot_D3", "Download")
+
+            )
+
+          )
+ )
+          )
+                      ), # End fourth page
+
+
+  #### PAGE 5 ####
+  tabPanel("MULTI-OMICS_ANALYSIS", #Beginning page 5
+           id = "MULTI-OMICS_ANALYSIS",
+           icon = icon("sitemap"),
+           fluidRow( #First Row
+             column(3,
+               h3("Select your preferences: "),
+               # h5("Choose an option for the first dataset:"),
+               # uiOutput("SelectModule1"),
+               #
+               # hr(),
+               #
+               # h5("Choose an option for the second dataset:"),
+               # uiOutput("SelectModule2"),
+               #
+               # conditionalPanel("input.Omic3",
+               #                  h5("Choose an option for the third dataset:"),
+               #                  uiOutput("SelectModule3")),
+               #
+               # hr(),
+
+               uiOutput("SelectVariable2"),
+
+               hr(),
+
+               uiOutput("SelectTaxonomy"),
+
+               hr(),
+               checkboxInput("ShowDrivers", "Show drivers of the co-inertia", value = FALSE),
+               selectInput("ShowDrivers_axis", "Which axis ?", choices = c("Axis 1" = "axis1", "Axis 2" = "axis2")),
+               # checkboxInput("padjust.mcoia", "Adjust pvalue for coinertia drivers", value=FALSE),
+               # sliderInput("labels.mcoai", "Change label size on coinertia drivers plot",  min = 0, max = 5, value = 2),
+               downloadButton("Download_Coinertia_drivers", "Download drivers"),
+
+               radioButtons("pdf_or_svg_p5",
+                            "Choose an extension:",
+                            choices = c("pdf", "svg")),
+
+               downloadButton("Download_Multivariate_Analysis", "Download Ordination"),
+               actionButton("explainCoinertia", "What does this plot mean ?")
+             ),
+             column(9,
+                    tabsetPanel(type = "tabs",
+                                tabPanel("Co-Inertia Analysis",
+                                         withSpinner(plotOutput("coinertia", height = 750, width = 750)),
+                                         h4("RV-score: "),
+                                         withSpinner(verbatimTextOutput("RV"))
+                                ),
+                                # tabPanel("Co-inertia Information",
+                                #          plotOutput("coinertia_bivariate", height = 750),
+                                #          h4("RV-score: "),
+                                #          verbatimTextOutput("RV2")
+                                #          ),
+                                # tabPanel("Co-Inertia Drivers",
+                                #          plotOutput("vip.pval.plot", height = 750, width = 750),
+                                #          h4("CVS Score: "),
+                                #          verbatimTextOutput("cvs_mcoia")),
+                                tabPanel("Procrustes Analysis",
+                                         withSpinner(plotOutput("PA", height = 750))
+                                         )
+                    )
+             )
+           ), # End First Row
+           fluidRow(
+             h3("Hive Plot representing the association between the modules eigengenes of each network"),
+             column(8,
+                    radioButtons("correlationMultiOmics", "Choose the type of correlation between modules and between modules and external parameters: ",
+                                 choices = list("Spearman" = "spearman", "Pearson" = "pearson"),
+                                 selected = "spearman"),
+                    uiOutput("traitHive"),
+                    actionButton("explainMultiOmicsHivePlot", "What does this plot mean ?"),
+                    withSpinner(plotOutput("HIVE_MEs", height = 1000)),
+                    #plotOutput("NETWORK_MEs", height = 800),
+                    downloadButton("Download_Multivariate_Analysis2", "Download Hive Plot"),
+                    radioButtons("pdf_or_svg_p5_2",
+                                 "Choose an extension:",
+                                 choices = c("pdf", "svg")),
+                    sliderInput("widthPDF2", "Figures Width:", min = 10, max = 100, value = 30),
+                    sliderInput("heightPDF2", "Figures Height: ", min = 10, max = 100, value = 30)
+             ),
+             column(4,
+                    uiOutput("ModuleOfInterest"),
+                    sliderInput("correlationThreshold", "Choose a correlation threshold", min= 0.1, max = 1, value = 0.4),
+                    withSpinner(verbatimTextOutput("tableModule")))
+           ),
+           fluidRow(12, # Second Row
+                    tabsetPanel(type = "tabs",
+                                tabPanel("Omic 1 - Omic 2",
+                                         h3("General Heatmap representing the correlation between the modules eigengenes of each network. (Dataset 1 vs Dataset 2)"),
+                                         withSpinner(iheatmaprOutput("HEATMAP_MEs12", height = 1000)),
+                                         downloadButton("Download_Multivariate_Analysis3", "Download Heatmap"), # End Third Row
+                                         radioButtons("pdf_or_svg_p5_3",
+                                                      "Choose an extension:",
+                                                      choices = c("pdf", "png")),
+                                         sliderInput("widthPDF3", "Figures Width:", min = 10, max = 100, value = 30),
+                                         sliderInput("heightPDF3", "Figures Height: ", min = 10, max = 100, value = 30),
+                                         fluidRow( # Third Row
+                                           column(6,
+                                                  h3("Choose an option for the first dataset"),
+                                                  uiOutput("SelectModule12")),
+                                           conditionalPanel("input.selectModule12_p5 == 'Individual_Variables'",
+                                                            h4("Select some variables to show in the heatmap: "),
+                                                            uiOutput("selectVariablesExprDat")),
+                                           column(6,
+                                                  h3("Choose an option for the second dataset"),
+                                                  uiOutput("SelectModule21"),
+                                                  conditionalPanel("input.selectModule21_p5 == 'Individual_Variables'",
+                                                                   h4("Select some variables to show in the heatmap: "),
+                                                                   uiOutput("selectVariables"))
+
                                            )
-                                  )
-                      )
-             ), # End fourth page
-             
-             
-             #### PAGE 5 ####
-             tabPanel("MULTI-OMICS_ANALYSIS", #Beginning page 5
-                      id = "MULTI-OMICS_ANALYSIS",
-                      icon = icon("sitemap"),
-                      fluidRow( #First Row
-                        column(3,
-                               h3("Select your preferences: "),
-                               # h5("Choose an option for the first dataset:"),
-                               # uiOutput("SelectModule1"),
-                               # 
-                               # hr(),
-                               # 
-                               # h5("Choose an option for the second dataset:"),
-                               # uiOutput("SelectModule2"),
-                               # 
-                               # conditionalPanel("input.Omic3",
-                               #                  h5("Choose an option for the third dataset:"),
-                               #                  uiOutput("SelectModule3")),
-                               # 
-                               # hr(),
-                               
-                               uiOutput("SelectVariable2"),
-                               
-                               hr(),
-                               
-                               uiOutput("SelectTaxonomy"),
-                               
-                               hr(),
-                               checkboxInput("ShowDrivers", "Show drivers of the co-inertia", value = FALSE),
-                               selectInput("ShowDrivers_axis", "Which axis ?", choices = c("Axis 1" = "axis1", "Axis 2" = "axis2")),
-                               # checkboxInput("padjust.mcoia", "Adjust pvalue for coinertia drivers", value=FALSE),
-                               # sliderInput("labels.mcoai", "Change label size on coinertia drivers plot",  min = 0, max = 5, value = 2),
-                               downloadButton("Download_Coinertia_drivers", "Download drivers"),
-                               
-                               radioButtons("pdf_or_svg_p5",
-                                            "Choose an extension:",
-                                            choices = c("pdf", "svg")),
-                               
-                               downloadButton("Download_Multivariate_Analysis", "Download Ordination"),
-                               actionButton("explainCoinertia", "What does this plot mean ?")
-                        ),
-                        column(9,
-                               tabsetPanel(type = "tabs",
-                                           tabPanel("Co-Inertia Analysis",
-                                                    withSpinner(plotOutput("coinertia", height = 750, width = 750)),
-                                                    h4("RV-score: "),
-                                                    withSpinner(verbatimTextOutput("RV"))
-                                           ),
-                                           # tabPanel("Co-inertia Information",
-                                           #          plotOutput("coinertia_bivariate", height = 750),
-                                           #          h4("RV-score: "),
-                                           #          verbatimTextOutput("RV2")
-                                           #          ),
-                                           # tabPanel("Co-Inertia Drivers",
-                                           #          plotOutput("vip.pval.plot", height = 750, width = 750),
-                                           #          h4("CVS Score: "),
-                                           #          verbatimTextOutput("cvs_mcoia")),
-                                           tabPanel("Procrustes Analysis",
-                                                    withSpinner(plotOutput("PA", height = 750))
+                                         ),
+
+                                         fluidRow( #Fourth Row
+                                           column(12,
+                                                  h3("Bipartite_network representing the associations between modules of each networks"),
+                                                  sliderInput("Bipartite12", "Choose the correlation threshold for bipartite network:",
+                                                              min=0.1, max=0.9, value=0.5),
+                                                  actionButton("goBipartite12", "Go !"),
+                                                  withSpinner(plotOutput("bipartite_network12", height = 1000)),
+                                                  h3("Heatmap representing the correlation between selected variables of each omics networks"),
+                                                  withSpinner(iheatmaprOutput("HEATMAP", height = 1000))
                                            )
-                               )
-                        )
-                      ), # End First Row
-                      fluidRow(
-                        h3("Hive Plot representing the association between the modules eigengenes of each network"),
-                        column(8,
-                               radioButtons("correlationMultiOmics", "Choose the type of correlation between modules and between modules and external parameters: ",
-                                            choices = list("Spearman" = "spearman", "Pearson" = "pearson"),
-                                            selected = "spearman"),
-                               uiOutput("traitHive"),
-                               actionButton("explainMultiOmicsHivePlot", "What does this plot mean ?"),
-                               withSpinner(plotOutput("HIVE_MEs", height = 1000)),
-                               #plotOutput("NETWORK_MEs", height = 800),
-                               downloadButton("Download_Multivariate_Analysis2", "Download Hive Plot"),
-                               radioButtons("pdf_or_svg_p5_2",
-                                            "Choose an extension:",
-                                            choices = c("pdf", "svg")),
-                               sliderInput("widthPDF2", "Figures Width:", min = 10, max = 100, value = 30),
-                               sliderInput("heightPDF2", "Figures Height: ", min = 10, max = 100, value = 30)
-                        ),
-                        column(4,
-                               uiOutput("ModuleOfInterest"),
-                               sliderInput("correlationThreshold", "Choose a correlation threshold", min= 0.1, max = 1, value = 0.4),
-                               withSpinner(verbatimTextOutput("tableModule")))
-                      ),
-                      fluidRow(12, # Second Row
-                               tabsetPanel(type = "tabs",
-                                           tabPanel("Omic 1 - Omic 2",
-                                                    h3("General Heatmap representing the correlation between the modules eigengenes of each network. (Dataset 1 vs Dataset 2)"),
-                                                    withSpinner(iheatmaprOutput("HEATMAP_MEs12", height = 1000)),
-                                                    downloadButton("Download_Multivariate_Analysis3", "Download Heatmap"), # End Third Row
-                                                    radioButtons("pdf_or_svg_p5_3",
-                                                                 "Choose an extension:",
-                                                                 choices = c("pdf", "png")),
-                                                    sliderInput("widthPDF3", "Figures Width:", min = 10, max = 100, value = 30),
-                                                    sliderInput("heightPDF3", "Figures Height: ", min = 10, max = 100, value = 30),
-                                                    fluidRow( # Third Row
-                                                      column(6,
-                                                             h3("Choose an option for the first dataset"),
-                                                             uiOutput("SelectModule12")),
-                                                      conditionalPanel("input.selectModule12_p5 == 'Individual_Variables'",
-                                                                       h4("Select some variables to show in the heatmap: "),
-                                                                       uiOutput("selectVariablesExprDat")),
-                                                      column(6,
-                                                             h3("Choose an option for the second dataset"),
-                                                             uiOutput("SelectModule21"),
-                                                             conditionalPanel("input.selectModule21_p5 == 'Individual_Variables'",
-                                                                              h4("Select some variables to show in the heatmap: "),
-                                                                              uiOutput("selectVariables"))
-                                                             
-                                                      )
-                                                    ),
-                                                    
-                                                    fluidRow( #Fourth Row
-                                                      column(12,
-                                                             h3("Bipartite_network representing the associations between modules of each networks"),
-                                                             sliderInput("Bipartite12", "Choose the correlation threshold for bipartite network:",
-                                                                         min=0.1, max=0.9, value=0.5),
-                                                             actionButton("goBipartite12", "Go !"),
-                                                             withSpinner(plotOutput("bipartite_network12", height = 1000)),
-                                                             h3("Heatmap representing the correlation between selected variables of each omics networks"),
-                                                             withSpinner(iheatmaprOutput("HEATMAP", height = 1000))
-                                                      )
-                                                    ),
-                                                    p("Before the download; be sure to select the variables to plot in the bipartite network and the heatmap (either individual variables or modules)"),
-                                                    downloadButton("Download_Multivariate_Analysis6", "Download Heatmap and bipartite network"), # End Third Row
-                                                    checkboxInput("addLabels12", "Add rownames and colnames in download", value = FALSE),
-                                                    radioButtons("pdf_or_svg_p5_6",
-                                                                 "Choose an extension:",
-                                                                 choices = c("pdf", "svg")),
-                                                    sliderInput("widthPDF6", "Figures Width:", min = 10, max = 100, value = 30),
-                                                    sliderInput("heightPDF6", "Figures Height: ", min = 10, max = 100, value = 30)),
-                                           tabPanel("Omic 2 - Omic 3",
-                                                    h3("General Heatmap representing the correlation between the modules eigengenes of each network. (Dataset 2 vs Dataset 3)"),
-                                                    withSpinner(iheatmaprOutput("HEATMAP_MEs23", height = 1000)),
-                                                    downloadButton("Download_Multivariate_Analysis4", "Download Heatmap"), # End Third Row
-                                                    radioButtons("pdf_or_svg_p5_4",
-                                                                 "Choose an extension:",
-                                                                 choices = c("pdf", "png")),
-                                                    sliderInput("widthPDF4", "Figures Width:", min = 10, max = 100, value = 30),
-                                                    sliderInput("heightPDF4", "Figures Height: ", min = 10, max = 100, value = 30),
-                                                    fluidRow( # Third Row
-                                                      column(6,
-                                                             h3("Choose an option for the second dataset"),
-                                                             uiOutput("SelectModule23")),
-                                                      conditionalPanel("input.selectModule23_p5 == 'Individual_Variables'",
-                                                                       h4("Select some variables to show in the heatmap: "),
-                                                                       uiOutput("selectVariablesExprDat23")),
-                                                      column(6,
-                                                             h3("Choose an option for the third dataset"),
-                                                             uiOutput("SelectModule32"),
-                                                             conditionalPanel("input.selectModule32_p5 == 'Individual_Variables'",
-                                                                              h4("Select some variables to show in the heatmap: "),
-                                                                              uiOutput("selectVariables32"))
-                                                             
-                                                      )
-                                                    ), # End Third Row
-                                                    fluidRow( #Fourth Row
-                                                      column(12,
-                                                             h3("Bipartite_network representing the associations between modules of each networks"),
-                                                             sliderInput("Bipartite23", "Choose the correlation threshold for bipartite network:",
-                                                                         min=0.1, max=0.9, value=0.5),
-                                                             actionButton("goBipartite23", "Go !"),
-                                                             withSpinner(plotOutput("bipartite_network23", height = 1000)),
-                                                             h3("Heatmap representing the correlation between selected variables of each omics networks"),
-                                                             withSpinner(iheatmaprOutput("HEATMAP23", height = 1000))
-                                                      )
-                                                    ),
-                                                    p("Before the download; be sure to select the variables to plot in the bipartite network and the heatmap (either individual variables or modules)"),
-                                                    downloadButton("Download_Multivariate_Analysis7", "Download Heatmap and bipartite network"), # End Third Row
-                                                    checkboxInput("addLabels23", "Add rownames and colnames in download", value = FALSE),
-                                                    radioButtons("pdf_or_svg_p5_7",
-                                                                 "Choose an extension:",
-                                                                 choices = c("pdf", "svg")),
-                                                    sliderInput("widthPDF7", "Figures Width:", min = 10, max = 100, value = 30),
-                                                    sliderInput("heightPDF7", "Figures Height: ", min = 10, max = 100, value = 30)),
-                                           tabPanel("Omic 1 - Omic 3",
-                                                    h3("General Heatmap representing the correlation between the modules eigengenes of each network. (Dataset 1 vs Dataset 3)"),
-                                                    withSpinner(iheatmaprOutput("HEATMAP_MEs13", height = 1000)),
-                                                    downloadButton("Download_Multivariate_Analysis5", "Download Heatmap"), # End Third Row
-                                                    radioButtons("pdf_or_svg_p5_5",
-                                                                 "Choose an extension:",
-                                                                 choices = c("pdf", "png")),
-                                                    sliderInput("widthPDF5", "Figures Width:", min = 10, max = 100, value = 30),
-                                                    sliderInput("heightPDF5", "Figures Height: ", min = 10, max = 100, value = 30),
-                                                    fluidRow( # Third Row
-                                                      column(6,
-                                                             h3("Choose an option for the first dataset"),
-                                                             uiOutput("SelectModule13")),
-                                                      conditionalPanel("input.selectModule13_p5 == 'Individual_Variables'",
-                                                                       h4("Select some variables to show in the heatmap: "),
-                                                                       uiOutput("selectVariablesExprDat13")),
-                                                      column(6,
-                                                             h3("Choose an option for the second dataset"),
-                                                             uiOutput("SelectModule31"),
-                                                             conditionalPanel("input.selectModule31_p5 == 'Individual_Variables'",
-                                                                              h4("Select some variables to show in the heatmap: "),
-                                                                              uiOutput("selectVariables31"))
-                                                             
-                                                      )
-                                                    ), # End Third Row
-                                                    fluidRow( #Fourth Row
-                                                      column(12,
-                                                             h3("Bipartite_network representing the associations between modules of each networks"),
-                                                             sliderInput("Bipartite13", "Choose the correlation threshold for bipartite network:",
-                                                                         min=0.1, max=0.9, value=0.5),
-                                                             actionButton("goBipartite13", "Go !"),
-                                                             withSpinner(plotOutput("bipartite_network13", height = 1000)),
-                                                             h3("Heatmap representing the correlation between selected variables of each omics networks"),
-                                                             withSpinner(iheatmaprOutput("HEATMAP13", height = 1000))
-                                                      )
-                                                    ),
-                                                    p("Before the download; be sure to select the variables to plot in the bipartite network and the heatmap (either individual variables or modules)"),
-                                                    downloadButton("Download_Multivariate_Analysis8", "Download Heatmap and bipartite network"), # End Third Row
-                                                    checkboxInput("addLabels13", "Add rownames and colnames in download", value = FALSE),
-                                                    radioButtons("pdf_or_svg_p5_8",
-                                                                 "Choose an extension:",
-                                                                 choices = c("pdf", "svg")),
-                                                    sliderInput("widthPDF8", "Figures Width:", min = 10, max = 100, value = 30),
-                                                    sliderInput("heightPDF8", "Figures Height: ", min = 10, max = 100, value = 30)
+                                         ),
+                                         p("Before the download; be sure to select the variables to plot in the bipartite network and the heatmap (either individual variables or modules)"),
+                                         downloadButton("Download_Multivariate_Analysis6", "Download Heatmap and bipartite network"), # End Third Row
+                                         checkboxInput("addLabels12", "Add rownames and colnames in download", value = FALSE),
+                                         radioButtons("pdf_or_svg_p5_6",
+                                                      "Choose an extension:",
+                                                      choices = c("pdf", "svg")),
+                                         sliderInput("widthPDF6", "Figures Width:", min = 10, max = 100, value = 30),
+                                         sliderInput("heightPDF6", "Figures Height: ", min = 10, max = 100, value = 30)),
+                                tabPanel("Omic 2 - Omic 3",
+                                         h3("General Heatmap representing the correlation between the modules eigengenes of each network. (Dataset 2 vs Dataset 3)"),
+                                         withSpinner(iheatmaprOutput("HEATMAP_MEs23", height = 1000)),
+                                         downloadButton("Download_Multivariate_Analysis4", "Download Heatmap"), # End Third Row
+                                         radioButtons("pdf_or_svg_p5_4",
+                                                      "Choose an extension:",
+                                                      choices = c("pdf", "png")),
+                                         sliderInput("widthPDF4", "Figures Width:", min = 10, max = 100, value = 30),
+                                         sliderInput("heightPDF4", "Figures Height: ", min = 10, max = 100, value = 30),
+                                         fluidRow( # Third Row
+                                           column(6,
+                                                  h3("Choose an option for the second dataset"),
+                                                  uiOutput("SelectModule23")),
+                                           conditionalPanel("input.selectModule23_p5 == 'Individual_Variables'",
+                                                            h4("Select some variables to show in the heatmap: "),
+                                                            uiOutput("selectVariablesExprDat23")),
+                                           column(6,
+                                                  h3("Choose an option for the third dataset"),
+                                                  uiOutput("SelectModule32"),
+                                                  conditionalPanel("input.selectModule32_p5 == 'Individual_Variables'",
+                                                                   h4("Select some variables to show in the heatmap: "),
+                                                                   uiOutput("selectVariables32"))
+
                                            )
-                               )
-                               
-                               
-                      )
-                      
-             ), # End Page 5
-             
-             #### HELP PAGE ####
-             tabPanel("HELP", # Beginning Help Page
-                      fluidRow(
-                        column(12,
-                               h3("What is the purpose of Network Explorer ?"),
-                               style = "background-color: #fcd688; box-shadow: 5px 10px;",
-                               p("MiBiOmics uses several R libraries in a user friendly way in order to explore and to understand the correlation patterns
+                                         ), # End Third Row
+                                         fluidRow( #Fourth Row
+                                           column(12,
+                                                  h3("Bipartite_network representing the associations between modules of each networks"),
+                                                  sliderInput("Bipartite23", "Choose the correlation threshold for bipartite network:",
+                                                              min=0.1, max=0.9, value=0.5),
+                                                  actionButton("goBipartite23", "Go !"),
+                                                  withSpinner(plotOutput("bipartite_network23", height = 1000)),
+                                                  h3("Heatmap representing the correlation between selected variables of each omics networks"),
+                                                  withSpinner(iheatmaprOutput("HEATMAP23", height = 1000))
+                                           )
+                                         ),
+                                         p("Before the download; be sure to select the variables to plot in the bipartite network and the heatmap (either individual variables or modules)"),
+                                         downloadButton("Download_Multivariate_Analysis7", "Download Heatmap and bipartite network"), # End Third Row
+                                         checkboxInput("addLabels23", "Add rownames and colnames in download", value = FALSE),
+                                         radioButtons("pdf_or_svg_p5_7",
+                                                      "Choose an extension:",
+                                                      choices = c("pdf", "svg")),
+                                         sliderInput("widthPDF7", "Figures Width:", min = 10, max = 100, value = 30),
+                                         sliderInput("heightPDF7", "Figures Height: ", min = 10, max = 100, value = 30)),
+                                tabPanel("Omic 1 - Omic 3",
+                                         h3("General Heatmap representing the correlation between the modules eigengenes of each network. (Dataset 1 vs Dataset 3)"),
+                                         withSpinner(iheatmaprOutput("HEATMAP_MEs13", height = 1000)),
+                                         downloadButton("Download_Multivariate_Analysis5", "Download Heatmap"), # End Third Row
+                                         radioButtons("pdf_or_svg_p5_5",
+                                                      "Choose an extension:",
+                                                      choices = c("pdf", "png")),
+                                         sliderInput("widthPDF5", "Figures Width:", min = 10, max = 100, value = 30),
+                                         sliderInput("heightPDF5", "Figures Height: ", min = 10, max = 100, value = 30),
+                                         fluidRow( # Third Row
+                                           column(6,
+                                                  h3("Choose an option for the first dataset"),
+                                                  uiOutput("SelectModule13")),
+                                           conditionalPanel("input.selectModule13_p5 == 'Individual_Variables'",
+                                                            h4("Select some variables to show in the heatmap: "),
+                                                            uiOutput("selectVariablesExprDat13")),
+                                           column(6,
+                                                  h3("Choose an option for the second dataset"),
+                                                  uiOutput("SelectModule31"),
+                                                  conditionalPanel("input.selectModule31_p5 == 'Individual_Variables'",
+                                                                   h4("Select some variables to show in the heatmap: "),
+                                                                   uiOutput("selectVariables31"))
+
+                                           )
+                                         ), # End Third Row
+                                         fluidRow( #Fourth Row
+                                           column(12,
+                                                  h3("Bipartite_network representing the associations between modules of each networks"),
+                                                  sliderInput("Bipartite13", "Choose the correlation threshold for bipartite network:",
+                                                              min=0.1, max=0.9, value=0.5),
+                                                  actionButton("goBipartite13", "Go !"),
+                                                  withSpinner(plotOutput("bipartite_network13", height = 1000)),
+                                                  h3("Heatmap representing the correlation between selected variables of each omics networks"),
+                                                  withSpinner(iheatmaprOutput("HEATMAP13", height = 1000))
+                                           )
+                                         ),
+                                         p("Before the download; be sure to select the variables to plot in the bipartite network and the heatmap (either individual variables or modules)"),
+                                         downloadButton("Download_Multivariate_Analysis8", "Download Heatmap and bipartite network"), # End Third Row
+                                         checkboxInput("addLabels13", "Add rownames and colnames in download", value = FALSE),
+                                         radioButtons("pdf_or_svg_p5_8",
+                                                      "Choose an extension:",
+                                                      choices = c("pdf", "svg")),
+                                         sliderInput("widthPDF8", "Figures Width:", min = 10, max = 100, value = 30),
+                                         sliderInput("heightPDF8", "Figures Height: ", min = 10, max = 100, value = 30)
+                                         )
+                                )
+
+
+           )
+
+           ), # End Page 5
+
+  #### HELP PAGE ####
+  tabPanel("HELP", # Beginning Help Page
+           fluidRow(
+             column(12,
+               h3("What is the purpose of Network Explorer ?"),
+               style = "background-color: #fcd688; box-shadow: 5px 10px;",
+               p("MiBiOmics uses several R libraries in a user friendly way in order to explore and to understand the correlation patterns
                                  in one or several omics datasets. Depending on the analysis you seek, you will be able to study a single dataset through
                                  WGCNA correlation network, ordination techniques and dendrogrammes to find what drives the overall variability of your
                                  data but you will also be able to compare two omic datasets in what we call 'multi-omics analysis' using basic
                                  correlation, network analysis, co-inertia and procrustes analysis."),
-                               br(),
-                               p("We propose here a methodology for a system biology approach where it is possible to see, compare and understand the
+               br(),
+               p("We propose here a methodology for a system biology approach where it is possible to see, compare and understand the
                                  different aspect of the same biological object. More and more, we see in experiments, several types of omics data describing
                                  the same individuals. However, it remains really difficult to compare them, even if they are part of the same system. We know
                                  today that genes, RNAs, proteins, OTUs, metabolites, are not closed systems. They interact with each other. The purpose of
                                  our method is to find the associations between these different entities.")
-                        )
-                      ),
-                      hr(),
-                      fluidRow(
-                        column(4,
-                               style = "background-color:   #f17e70 ; box-shadow: 5px 10px;",
-                               h3("First Step: Upload your datasets ! Filtrate ! Normalize ! Transform !"),
-                               h4("If you want to perform a simple WGCNA:"),
-                               p("You only have to upload two datasets. The first one is your counting table. The counting table contains the
+             )
+           ),
+           hr(),
+           fluidRow(
+             column(4,
+                    style = "background-color:   #f17e70 ; box-shadow: 5px 10px;",
+                    h3("First Step: Upload your datasets ! Filtrate ! Normalize ! Transform !"),
+                    h4("If you want to perform a simple WGCNA:"),
+                    p("You only have to upload two datasets. The first one is your counting table. The counting table contains the
                                  name of your genes/OTUs in the columns and the names of your samples in the rows. Each cells corresponds to the
                                  number of the correponding gene/OTU found in this sample. (see Table 1)"),
-                               p("The counting table must be accompagnied by a Annotation table containing the exact same sample names as rows
+                    p("The counting table must be accompagnied by a Annotation table containing the exact same sample names as rows
                                  and several descriptive variables as columns (it can be day of experiments, special treatment, collection site ...). (see Table 2)"),
-                               p("If your working with OTUs, you can also upload a Taxa Table describing, for each OTUs, the corresponding Phylum,
+                    p("If your working with OTUs, you can also upload a Taxa Table describing, for each OTUs, the corresponding Phylum,
                                  Order, Class, ..., Species but selecting the option 'upload a taxa table'. (see Table 3)"),
-                               p("In advance parameters, you can filtrate, normalize, transform your data. You can also remove sample outliers."),
-                               h4("If you want to perform a multi-omics analysis:"),
-                               p("MiBiOmics allows to perform analysis on two omics layers to compare, confront and associate different variables describind the same individuals.
+                    p("In advance parameters, you can filtrate, normalize, transform your data. You can also remove sample outliers."),
+                    h4("If you want to perform a multi-omics analysis:"),
+                    p("MiBiOmics allows to perform analysis on two omics layers to compare, confront and associate different variables describind the same individuals.
                       To perform a multi-omics analysis, select the Multi-Omics Analysis fiels in Type of analysis. This time you will have to upload at least 2 counting
                       tables (the first one contains the variables of your first omics layer and the second one contains the variables of your second omics layer). You will
                       also need, as before, a annotation table. If one of your Omics layer contains OTUs, you need to upload this counting table first to be able to upload its
                       associated taxonomic annotation. As before, you will also be able to filtrate, normalize and transform both counting tables.")
-                        ),
-                        column(4,
-                               DT::dataTableOutput("exampleTable")
-                        ),
-                        column(3,
-                               DT::dataTableOutput("exampleAnnot")
-                        ),
-                        column(8,
-                               DT::dataTableOutput("exampleTaxa")
-                        )
-                      ),
-                      
-                      hr(),
-                      fluidRow(
-                        column(5,
-                               style = "background-color: #86c5d6; box-shadow: 5px 10px;",
-                               h3("Explore your dataset !"),
-                               p("When you are ready, you uploaded your datasets, you treated your data with filtration and/or normalization
+             ),
+             column(4,
+               DT::dataTableOutput("exampleTable")
+             ),
+             column(3,
+               DT::dataTableOutput("exampleAnnot")
+             ),
+             column(8,
+                    DT::dataTableOutput("exampleTaxa")
+             )
+           ),
+
+           hr(),
+           fluidRow(
+             column(5,
+                    style = "background-color: #86c5d6; box-shadow: 5px 10px;",
+                    h3("Explore your dataset !"),
+                    p("When you are ready, you uploaded your datasets, you treated your data with filtration and/or normalization
                                  and/or transformation, you will be able to explore your dataset(s) variability in the second page of MiBiOmics. In this section, a PCA or a PCoA (depending on if you are working with genes
                                  or with OTUs) will allow you to see the main axis of variability. You can change the color of your samples
                                  according to the external variables uploaded with the annotation table to see what might play a part in this
                                  variability."),
-                               p("A cluster dendrogramme is also plotted to help you visualize which samples are closely related."),
-                               p("If you uploaded a OTUs Counting Table with the corresponding Taxa Table you will be able to see a figure
+                    p("A cluster dendrogramme is also plotted to help you visualize which samples are closely related."),
+                    p("If you uploaded a OTUs Counting Table with the corresponding Taxa Table you will be able to see a figure
                                  representing the relative taxa abundance of each sample at different taxonomic level. "),
-                               h4("If you perform a multi-omics analysis"),
-                               p("Use the tabset called 'second dataset' to explore the variability of your second omics layer."),
-                               br()
-                        ),
-                        column(5,
-                               offset = 2,
-                               style = "background-color: #a987d6; box-shadow: 5px 10px;",
-                               h3("Create a correlation Network with WGCNA !"),
-                               p("WGCNA is a R package which uses a system biology approach to find patterns of correlation in omics datasets (Peter Langfelder
+                    h4("If you perform a multi-omics analysis"),
+                    p("Use the tabset called 'second dataset' to explore the variability of your second omics layer."),
+                    br()
+             ),
+             column(5,
+                    offset = 2,
+                    style = "background-color: #a987d6; box-shadow: 5px 10px;",
+                    h3("Create a correlation Network with WGCNA !"),
+                    p("WGCNA is a R package which uses a system biology approach to find patterns of correlation in omics datasets (Peter Langfelder
                                  and Steve Horvath, 2008). Based on correlation networks, the method defines modules as groups of highly interconnected
                                  genes and reduce the dimensionality of the data by helping the user concentrate on the module of interest. A motivation
                                  for the implementation of this application was to give the ability to create the network in a user-friendly way and to
                                  understand better the influence of the principal parameters, like the soft power or the minimum module size, on the
                                  structure of the Network."),
-                               p("Once your in the
+                    p("Once your in the
                                  Network Inference section, you will be able to change the soft power and minimum size module to see how the structure of your
                                  correlation network is affected. This step migth take a while to be completed if the counting table uploaded is too large ( > 5000).
                                  Unfortunately, it is not possible to perform correlation network with datasets larger than 10 000 and we are currently working on
                                  this issue."),
-                               h4("If you perform a multi-omics analysis"),
-                               p("Use the tabset called 'second dataset' to perform the network inference on your second omics layer. /!\ The next section, 'Network exploration' can
+                    h4("If you perform a multi-omics analysis"),
+                    p("Use the tabset called 'second dataset' to perform the network inference on your second omics layer. /!\ The next section, 'Network exploration' can
                       only be used once the network inference step has been performed on both datasets.")
-                        )
-                      ),
-                      hr(),
-                      fluidRow(
-                        column(12,
-                               style = "background-color:   #ff9900; box-shadow: 5px 10px;",
-                               h3("Explore your Network !"),
-                               p("The Network exploration page allows you to characterise the modules, to understand what are the common properties
+                    )
+           ),
+           hr(),
+           fluidRow(
+             column(12,
+                    style = "background-color:   #ff9900; box-shadow: 5px 10px;",
+                    h3("Explore your Network !"),
+                    p("The Network exploration page allows you to characterise the modules, to understand what are the common properties
                                of the genes/OTUs belonging to a same group. In this section you will be able to see which samples contribute the
                                most to the formation of a module, how modules correlate to external traits and the relationship between the module
                                membership of a gene/OTU and its correlation to external traits. In this page you can explore the inside of the
                                network, part by part, and associate a group of highly interconnected genes/OTUs to a particular aspect of the
                                experiment."),
-                               p("If you uploaded an OTUs counting table, you will be able to explore the relative taxon abundance of each module."),
-                               h4("If you perform a multi-omics analysis"),
-                               p("Use the tabset called 'second dataset' to explore the modules of your second network."),
-                               p("This section is important to select the modules of interest in each omics layers. To compare modules of the two different networks, they need to
+                    p("If you uploaded an OTUs counting table, you will be able to explore the relative taxon abundance of each module."),
+                    h4("If you perform a multi-omics analysis"),
+                    p("Use the tabset called 'second dataset' to explore the modules of your second network."),
+                    p("This section is important to select the modules of interest in each omics layers. To compare modules of the two different networks, they need to
                       to be associated to the same external traits. For example the module yellow of your first dataset and the module blue of your second dataset are
                       strongly associated to the sampleSite external trait. They might be used and associated in the multi-omics analysis tab of MiBiOmics.")
-                        )
-                        
-                      ),
-                      hr(),
-                      fluidRow(
-                        column(12,
-                               style = "background-color: #fcd688; box-shadow: 5px 10px;",
-                               h3("Perform a multi-omics analysis (only if the option multi-omics analysis was selected in the first tab) !"),
-                               h4("Ordination technique: Co-Inertia Analysis"),
-                               p("The co-inertia analysis is performed with the omicade4 R package used to perform multiple co-inertia analysis and created by Meng C, et al. in 2013.
+             )
+
+           ),
+           hr(),
+           fluidRow(
+             column(12,
+                    style = "background-color: #fcd688; box-shadow: 5px 10px;",
+                    h3("Perform a multi-omics analysis (only if the option multi-omics analysis was selected in the first tab) !"),
+                    h4("Ordination technique: Co-Inertia Analysis"),
+                    p("The co-inertia analysis is performed with the omicade4 R package used to perform multiple co-inertia analysis and created by Meng C, et al. in 2013.
                       This package is based on the work realized by Stephane Dray, Daniel Chessel and Jean Thioulouse in 2003. With the co-inertia they created a methodoly
                       to associate two datasets and to represent the co-variance between both datasets. In MiBiOmics, the co-inertia is represented in two different ways.
                       In the first figure (on the top in the multi-omics analysis tab), the samples are placed on the plot according to their values in the co-inertia first
@@ -1438,53 +1435,53 @@ ui <- tagList(
                       from one dataset to the over. The longer is the line the less the values of the same sample covary from one dataset to the other. The variables that are the most
                       associated with the covariance of both datasets are also plotted on the co-inertia. They can belong to both datasets. The RV score indicates the quality
                       of the co-inertia. It values varies between 0 and 1 and the closest it is to 1, the best is the covariation between both datasets."),
-                               p("The co-inertia information tabset shows the length of this line for each samples represented with a dendrogramme, and two other figures. This tabsets might help
+                    p("The co-inertia information tabset shows the length of this line for each samples represented with a dendrogramme, and two other figures. This tabsets might help
                       to isolate the samples with a low covariation and see if it can be associated with a external clinical traits."),
-                               h4("Ordination Technique: Procrustes Analysis"),
-                               p("Procrustes analysis is realized in MiBiOmics thanks to the vegan R package created by Jari Oksanen. The procrustes method was originally created
+                    h4("Ordination Technique: Procrustes Analysis"),
+                    p("Procrustes analysis is realized in MiBiOmics thanks to the vegan R package created by Jari Oksanen. The procrustes method was originally created
                       by J. C. Gower in 1975 and uses the 3D configuration of the datasets ordinations, reorientate and re-scale them to allow the comparison of these differents
                       ordination in multidimensional space. The procrustes analysis plot can be found in the procrustes analysis tabset and can be interpreted as the co-inertia
                       analysis plot."),
-                               h4("Correlation Network analysis: using WGCNA modules to compare sub-parts of two different networks."),
-                               p("First, the first heatmap represents the correlation between each modules of both networks. The more two modules are correlated the more they might be
+                    h4("Correlation Network analysis: using WGCNA modules to compare sub-parts of two different networks."),
+                    p("First, the first heatmap represents the correlation between each modules of both networks. The more two modules are correlated the more they might be
                       associated to each other. This heatmap needs to be used as a guide to select the module of both network (and both omics layers) to each other. Only one
                       module of each network can be selected to pursue the analysis."),
-                               p("Once a module from each network (each omics dataset) is selected, the pairwise correlation between each variables of each modules is performed and represented
+                    p("Once a module from each network (each omics dataset) is selected, the pairwise correlation between each variables of each modules is performed and represented
                       in two different manners: a bi-partite networks and a correlation heatmap. In the bi-partite networks, red nodes represents the variables of the first dataset
                       and blue nodes the variables of the second datasets. A line between two nodes indicates an association. The following heatmap represents the correlation values
                       between the variables of the first selected module (first omics layer) and the variables of the second selected module (second omic layer)")
-                        ),
-                        hr()
-                        
-                      )
-             ), # End Help Page
-             #### ABOUT ####
-             tabPanel("ABOUT",
-                      fluidRow(
-                        column(6, offset = 1,
-                               h2("Citations"),
-                               p("MiBiOmics was developed with Shiny, a RStudio package for web application development. The methodology available on the application relies
+                    ),
+             hr()
+
+                    )
+           ), # End Help Page
+ #### ABOUT ####
+ tabPanel("ABOUT",
+          fluidRow(
+            column(6, offset = 1,
+                   h2("Citations"),
+                   p("MiBiOmics was developed with Shiny, a RStudio package for web application development. The methodology available on the application relies
                      on the following R packages: "),
-                               a(href="https://horvath.genetics.ucla.edu/html/CoexpressionNetwork/Rpackages/WGCNA/", "WGCNA"),
-                               p(""),
-                               a(href="https://cran.r-project.org/web/packages/vegan/vignettes/intro-vegan.pdf", "vegan"),
-                               p(""),
-                               a(href="https://www.bioconductor.org/packages/release/bioc/vignettes/omicade4/inst/doc/omicade4.pdf", "omicade4"),
-                               p("For WGCNA, we strongly advice to read their publication and look at their tutorial to choose the parameter in the network inference section:"),
-                               a(href="https://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-9-559", "Peter Langfelder and Steve Horvath, 2008"),
-                               p("Procrustes and co-inertia analysis were performed with vegan and omicade4 functions respectively. Please refer to the original publication
+                   a(href="https://horvath.genetics.ucla.edu/html/CoexpressionNetwork/Rpackages/WGCNA/", "WGCNA"),
+                   p(""),
+                   a(href="https://cran.r-project.org/web/packages/vegan/vignettes/intro-vegan.pdf", "vegan"),
+                   p(""),
+                   a(href="https://www.bioconductor.org/packages/release/bioc/vignettes/omicade4/inst/doc/omicade4.pdf", "omicade4"),
+                   p("For WGCNA, we strongly advice to read their publication and look at their tutorial to choose the parameter in the network inference section:"),
+                   a(href="https://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-9-559", "Peter Langfelder and Steve Horvath, 2008"),
+                   p("Procrustes and co-inertia analysis were performed with vegan and omicade4 functions respectively. Please refer to the original publication
                      to aknowledge the methodology:"),
-                               a(href="https://link.springer.com/content/pdf/10.1007%2FBF02291478.pdf", "J. C. Gower, 1975 (procrustes analysis)"),
-                               p(""),
-                               a(href="http://pbil.univ-lyon1.fr/members/dray/files/articles/dray2003c.pdf", "S. Dray et al., 2003 (co-inertia analysis)"),
-                               h4("You can cite us:"),
-                               p(""),
-                               a(href="https://www.biorxiv.org/content/10.1101/2020.04.24.031773v1", "Zoppi, J., Guillaume, J., Neunlist, M., & Chaffron, S. (2020). MiBiOmics : An interactive web application for multi-omics data exploration and integration, 1-11."),
-                               h4("License: A-GPL3")
-                        )
-                        
-                      )
-             ) # end about page
-             
-  )
+                   a(href="https://link.springer.com/content/pdf/10.1007%2FBF02291478.pdf", "J. C. Gower, 1975 (procrustes analysis)"),
+                   p(""),
+                   a(href="http://pbil.univ-lyon1.fr/members/dray/files/articles/dray2003c.pdf", "S. Dray et al., 2003 (co-inertia analysis)"),
+                   h4("You can cite us:"),
+                   p(""),
+                   a(href="https://www.biorxiv.org/content/10.1101/2020.04.24.031773v1", "Zoppi, J., Guillaume, J., Neunlist, M., & Chaffron, S. (2020). MiBiOmics : An interactive web application for multi-omics data exploration and integration, 1–11."),
+                   h4("License: A-GPL3")
+                   )
+
+          )
+ ) # end about page
+
+)
 )