Commit 7936ac9d authored by svolant's avatar svolant
Browse files

Ajout de la normalisation par groupe

parents 8381410f 075362b4
......@@ -6,11 +6,11 @@ dataTableOutput <- DT::dataTableOutput
shinyServer(function(input, output,session) {
#####################################################
##
## LOAD FILES
##
#####################################################
#####################################################
##
## LOAD FILES
##
#####################################################
## Create base for contrast
rand = floor(runif(1,0,1e9))
......@@ -259,11 +259,11 @@ shinyServer(function(input, output,session) {
#####################################################
##
## DYNAMIC MENU
##
#####################################################
#####################################################
##
## DYNAMIC MENU
##
#####################################################
......@@ -420,9 +420,9 @@ shinyServer(function(input, output,session) {
#rownames(data) <- colnames(counts)
# Percent annotated
# print(ind)
# print(colnames(counts))
# print(rownames(data))
# print(ind)
# print(colnames(counts))
# print(rownames(data))
labeled = length(ind)/length(colnames(counts))*100.0
return(list(target = target, labeled=labeled))
......@@ -588,11 +588,11 @@ shinyServer(function(input, output,session) {
#####################################################
##
## DEFINE CONTRAST
##
#####################################################
#####################################################
##
## DEFINE CONTRAST
##
#####################################################
output$contrastMat <- renderUI({
......@@ -759,8 +759,8 @@ shinyServer(function(input, output,session) {
})
# Infobox Contrast
output$InfoContrast <- renderInfoBox({
# Infobox Contrast
output$InfoContrast <- renderInfoBox({
input$RunDESeq
input$AddContrast
input$AddContrastEasy
......@@ -846,6 +846,8 @@ output$InfoContrast <- renderInfoBox({
ModInterestAll = unique(unlist(lapply(as.data.frame(target[,InterVar]),levels)))
ModInterestAll = unique(unlist(lapply(as.data.frame(target[,InterVar]),levels)))
updateSelectInput(session, "Select1_contrast",label="Compare",ModInterestAll)
})
......@@ -963,11 +965,11 @@ output$InfoContrast <- renderInfoBox({
#####################################################
##
## DESEQ2 run
##
#####################################################
#####################################################
##
## DESEQ2 run
##
#####################################################
......@@ -1008,11 +1010,11 @@ output$InfoContrast <- renderInfoBox({
})
#####################################################
##
## Taxonomy
##
#####################################################
#####################################################
##
## Taxonomy
##
#####################################################
# Infobox Contrast
......@@ -1048,11 +1050,11 @@ output$InfoContrast <- renderInfoBox({
#####################################################
##
## Diagnostic plots
##
#####################################################
#####################################################
##
## Diagnostic plots
##
#####################################################
......@@ -1143,11 +1145,11 @@ output$InfoContrast <- renderInfoBox({
#####################################################
##
## EXPORT DIAG GRAPH
##
#####################################################
#####################################################
##
## EXPORT DIAG GRAPH
##
#####################################################
#### Export Diag
output$exportdiag <- downloadHandler(
......@@ -1163,15 +1165,15 @@ output$InfoContrast <- renderInfoBox({
}
)
#####################################################
##
## EXPORT VISU GRAPH
##
#####################################################
#####################################################
##
## EXPORT VISU GRAPH
##
#####################################################
#### Export Visu
output$exportVisu <- downloadHandler(
#### Export Visu
output$exportVisu <- downloadHandler(
filename <- function() { paste(input$PlotVisuSelect,paste('SHAMAN',input$Exp_format_Visu,sep="."),sep="_") },
content <- function(file) {
......@@ -1191,7 +1193,7 @@ output$exportVisu <- downloadHandler(
dev.off()
}
)
)
......@@ -1227,24 +1229,24 @@ output$exportVisu <- downloadHandler(
#####################################################
##
## DIFF TABLES
##
#####################################################
#####################################################
##
## DIFF TABLES
##
#####################################################
# output$ContrastListTable <- renderUI({
#
# filesize = file.info(namesfile)[,"size"]
# if(filesize!=0)
# {
# tmp = read.table(namesfile,header=TRUE)
# cont = colnames(tmp)
# }
# selectInput("ContrastList_table",h6(strong("Contrast list")),cont, multiple = FALSE)
#
# })
# output$ContrastListTable <- renderUI({
#
# filesize = file.info(namesfile)[,"size"]
# if(filesize!=0)
# {
# tmp = read.table(namesfile,header=TRUE)
# cont = colnames(tmp)
# }
# selectInput("ContrastList_table",h6(strong("Contrast list")),cont, multiple = FALSE)
#
# })
output$ContrastOverviewTable <- renderPrint({
......@@ -1329,14 +1331,14 @@ output$exportVisu <- downloadHandler(
})
#####################
###
###
###################
#####################
###
###
###################
#### Export diff table
output$exportDiffTable <- downloadHandler(
#### Export diff table
output$exportDiffTable <- downloadHandler(
filename = function() {paste(input$WhichExportTable,input$ContrastList_table,'SHAMAN.csv',sep="_")},
content = function(file){
switch(input$WhichExportTable,
......@@ -1345,18 +1347,18 @@ output$exportDiffTable <- downloadHandler(
"Down" = write.csv(dataDiff()$down, file,row.names = FALSE)
)
}
)
)
output$ExportTableButton <- renderUI({
output$ExportTableButton <- renderUI({
res = NULL
table = dataDiff()$complete
if(nrow(table)>0) res = downloadButton('exportDiffTable', 'Export table')
return(res)
})
})
......@@ -1367,7 +1369,7 @@ output$ExportTableButton <- renderUI({
## Run button
output$RunButton <- renderUI({
output$RunButton <- renderUI({
res = NULL
target = dataInputTarget()$target
......@@ -1375,16 +1377,16 @@ output$RunButton <- renderUI({
if(!is.null(target) && taxo!="...") res = actionButton("RunDESeq",strong("Run analysis"),icon = icon("caret-right"))
return(res)
})
})
#####################################################
##
## VISUALISATION
##
#####################################################
#####################################################
##
## VISUALISATION
##
#####################################################
output$PlotVisuBar <- renderChart({
......@@ -1543,7 +1545,7 @@ output$RunButton <- renderUI({
}
})
#### Select color and split for diversity
#### Select color and split for diversity
output$SelectVarBoxDiv <- renderUI({
......@@ -1553,18 +1555,18 @@ output$RunButton <- renderUI({
})
# output$SelectVarDivCol <- renderUI({
#
# selectVar = input$VisuVarInt
# VarB = input$VarBoxDiv
#
# if(length(selectVar)>1)
# {
# selectInput("VarDivCol", h6(strong("Color by")),c(NULL,selectVar[-which(selectVar%in%VarB)]),multiple = FALSE)
# }
#
# })
#
# output$SelectVarDivCol <- renderUI({
#
# selectVar = input$VisuVarInt
# VarB = input$VarBoxDiv
#
# if(length(selectVar)>1)
# {
# selectInput("VarDivCol", h6(strong("Color by")),c(NULL,selectVar[-which(selectVar%in%VarB)]),multiple = FALSE)
# }
#
# })
#
......@@ -1600,10 +1602,10 @@ output$RunButton <- renderUI({
})
# output$DiversityBoxPlot <- renderPlot({
# resDiff = ResDiffAnal()
# if(!is.null(resDiff$dds)) Plot_Visu_Diversity(input,resDiff,type="box")
# })
# output$DiversityBoxPlot <- renderPlot({
# resDiff = ResDiffAnal()
# if(!is.null(resDiff$dds)) Plot_Visu_Diversity(input,resDiff,type="box")
# })
......@@ -1682,7 +1684,7 @@ output$RunButton <- renderUI({
if(input$SelectSpecifTaxo=="All") res = selectizeInput("selectTaxoPlot",h6(strong(paste("Select the",input$TaxoSelect, "to plot"))),Available_taxo, selected = Available_taxo,multiple = TRUE)
}
return(res)
})
})
## For comp plot
......@@ -1768,9 +1770,9 @@ output$RunButton <- renderUI({
output$VarIntVisu <- renderUI({
# int = input$InterestVar
# if(length(int)>=2) intSel = int[c(1,2)]
# else intSel = int[1]
# int = input$InterestVar
# if(length(int)>=2) intSel = int[c(1,2)]
# else intSel = int[1]
target=dataInputTarget()$target
......
......@@ -99,9 +99,29 @@ body <- dashboardBody(
"- Diversity",br(),img(src="tutorial/tutorial_diversity.png",width = "100%",style="max-width: 900px"),hr(),
"- Rarefaction",br(),img(src="tutorial/tutorial_rarefaction.png",width = "100%",style="max-width: 900px"))),
tabPanel("6-Other datasets available",
p("You can test SHAMAN with the dataset with two other datasets : "),
p("- Bacteriocin impact on mice microbiota from ", a("[Quereda et al. 2016]",href="http://www.ncbi.nlm.nih.gov/pubmed/27140611"), ":", a("here",target="_blank",href="listeria.zip"), br(),
"- MOCK communities from ", a("[The NIH HMP Working Group, 2009]",href="http://www.ncbi.nlm.nih.gov/pubmed/19819907"), ":", a("here",target="_blank",href="mock.zip")))))
p("You can test SHAMAN with two other datasets : "),
p("- Bacteriocin impact on mice microbiota from ", a("[Quereda et al. 2016]",href="http://www.ncbi.nlm.nih.gov/pubmed/27140611"), ":", a("here",target="_blank",href="listeria.zip"), br(),br(),
"The project is divided into three group : WT, Delta : Bacteriocin KO, Delta-complemented: Bacteriocin KO + complementation.", br(),
"Three time points are considered :", br(),
"- T0 : merged counts from -48H and -24H", br(),
"- T2 : 6H after listeria infection", br(),
"- T3 : 24H after listeria infection", br(),
img(src="listeria.png",width = "100%",style="max-width: 500px"),br(),br(),
"Analysis with SHAMAN:", br(),
"Set variables: condition, time, mice", br(),
"Set interactions:",
"1. condition:mice", br(),
"2. condition:time", br(),hr(),
"- MOCK communities from ", a("[The NIH HMP Working Group, 2009]",href="http://www.ncbi.nlm.nih.gov/pubmed/19819907"), ":", a("here",target="_blank",href="mock.zip"),br(),
"Mock communities are composed of 21 species mixed in even or staggered proportions :", br(),br(),
img(src="mock.png",width = "100%",style="max-width: 600px"),br(),br(),
"Analysis with SHAMAN: ",br(),
"Set variables : Community", br(),
"no interaction"))
))
),
tabItem(tabName = "Upload",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment