Commit bfe6aa06 authored by Amine  GHOZLANE's avatar Amine GHOZLANE
Browse files

Debug contrast file creation

parent de204f99
...@@ -51,7 +51,8 @@ shinyServer(function(input, output,session) { ...@@ -51,7 +51,8 @@ shinyServer(function(input, output,session) {
## Create base for contrast ## Create base for contrast
rand = floor(runif(1,0,1e9)) rand = floor(runif(1,0,1e9))
namesfile = paste("www/base/BaseContrast_",rand,".txt",sep="") namesfile = tempfile(pattern = "BaseContrast", tmpdir = tempdir(), fileext = "")
#paste("/srv/shiny-server/sample-apps/meta16s/BaseContrast_",rand,".txt",sep="")
file.create(namesfile,showWarnings=FALSE) file.create(namesfile,showWarnings=FALSE)
#namesfile = "www/All_Contrast.txt" #namesfile = "www/All_Contrast.txt"
...@@ -547,7 +548,7 @@ shinyServer(function(input, output,session) { ...@@ -547,7 +548,7 @@ shinyServer(function(input, output,session) {
cont = input$ContrastList cont = input$ContrastList
filesize = file.info(namesfile)[,"size"] filesize = file.info(namesfile)[,"size"]
if(is.na(filesize)){filesize=0}
if(filesize!=0) if(filesize!=0)
{ {
ContrastBase = read.table(namesfile,header=TRUE) ContrastBase = read.table(namesfile,header=TRUE)
...@@ -608,6 +609,7 @@ shinyServer(function(input, output,session) { ...@@ -608,6 +609,7 @@ shinyServer(function(input, output,session) {
res = ReadContrastFile() res = ReadContrastFile()
createdCont = NULL createdCont = NULL
filesize = file.info(namesfile)[,"size"] filesize = file.info(namesfile)[,"size"]
if(is.na(filesize)){filesize=0}
if(filesize!=0){ createdCont = read.table(namesfile,header=TRUE) } if(filesize!=0){ createdCont = read.table(namesfile,header=TRUE) }
if(!is.null(res)) if(!is.null(res))
...@@ -631,6 +633,7 @@ shinyServer(function(input, output,session) { ...@@ -631,6 +633,7 @@ shinyServer(function(input, output,session) {
## get the size of the contrast base file ## get the size of the contrast base file
filesize = file.info(namesfile)[,"size"] filesize = file.info(namesfile)[,"size"]
if(is.na(filesize)){filesize=0}
if(filesize!=0) if(filesize!=0)
{ {
tmp = read.table(namesfile,header=TRUE) tmp = read.table(namesfile,header=TRUE)
...@@ -665,6 +668,7 @@ shinyServer(function(input, output,session) { ...@@ -665,6 +668,7 @@ shinyServer(function(input, output,session) {
input$RemoveContrast input$RemoveContrast
filesize = isolate(file.info(namesfile)[,"size"]) filesize = isolate(file.info(namesfile)[,"size"])
if(is.na(filesize)){filesize=0}
if(filesize!=0) if(filesize!=0)
{ {
tmp = read.table(namesfile,header=TRUE) tmp = read.table(namesfile,header=TRUE)
...@@ -1008,7 +1012,7 @@ output$exportPDFVisu <- downloadHandler( ...@@ -1008,7 +1012,7 @@ output$exportPDFVisu <- downloadHandler(
cont = input$ContrastList_table cont = input$ContrastList_table
filesize = file.info(namesfile)[,"size"] filesize = file.info(namesfile)[,"size"]
if(is.na(filesize)){filesize=0}
if(filesize!=0) if(filesize!=0)
{ {
ContrastBase = read.table(namesfile,header=TRUE) ContrastBase = read.table(namesfile,header=TRUE)
...@@ -1026,7 +1030,7 @@ output$exportPDFVisu <- downloadHandler( ...@@ -1026,7 +1030,7 @@ output$exportPDFVisu <- downloadHandler(
resDiff = ResDiffAnal() resDiff = ResDiffAnal()
filesize = file.info(namesfile)[,"size"] filesize = file.info(namesfile)[,"size"]
res=NULL res=NULL
if(is.na(filesize)){filesize=0}
if(filesize!=0) if(filesize!=0)
{ {
BaseContrast = read.table(namesfile,header=TRUE) BaseContrast = read.table(namesfile,header=TRUE)
......
...@@ -288,8 +288,8 @@ body <- dashboardBody( ...@@ -288,8 +288,8 @@ body <- dashboardBody(
radioButtons(inputId = "SensPlotVisuBP",label = "Type: ",choices = c("Vertical" = "multiBarChart", "Horizontal" = "multiBarHorizontalChart"),selected = "multiBarChart") radioButtons(inputId = "SensPlotVisuBP",label = "Type: ",choices = c("Vertical" = "multiBarChart", "Horizontal" = "multiBarHorizontalChart"),selected = "multiBarChart")
), ),
box(title = "Appearance", width = NULL, status = "primary", solidHeader = TRUE,collapsible = TRUE,collapsed= TRUE, box(title = "Appearance", width = NULL, status = "primary", solidHeader = TRUE,collapsible = TRUE,collapsed= TRUE,
sliderInput("heightVisu", h6(strong("Height")),min=100,max=2000,value = 800), sliderInput("heightVisu", h6(strong("Height")),min=100,max=4000,value = 800),
sliderInput("widthVisu", h6(strong("Width")),min=100,max=1200,value = 1000) sliderInput("widthVisu", h6(strong("Width")),min=100,max=4000,value = 1000)
) )
) )
) )
......
"C1" "C2" "Name....4" "Name..." "Name....1" "Name....2" "Name....3" "Name..."
0 0 1 0 1 0 0 0
1 1 1 0 0 1 1 1
-1 -1 -1 0 0 -1 -12 -0.5
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