Problem Reading CEL files in http://www.shinyapps.io/ (SOLVED)


#1

I am developing an interactive tool to run an analysis of gene expression arrays in shiny and I got really stuck when I deployes the app in shinyapps.io

To upload the necesary files to run the analysis the user must indicate the path directory where he have the files stored.

Here is the code for the ui to upload the files

#ui

box(title ="CEL FILES",
                        solidHeader = T, status = "info", width = 6,
                        
                        textInput("file", "Load CEL files(.CEL)",
                                 placeholder = "Please, insert the datapath of  CEL files"),
                        submitButton("Submit")
                        )

And here the code to read and create the objetct:


rawData <- reactive({
  validate(
    need(input$file != "", "Please Load CEL files")
  )
   
   celFiles <- list.celfiles(input$file, full.names = TRUE)
   read.celfiles(celFiles)
})

And here is the problem , this code in local machine(windows 10) runs perfectly and upload the files from the directory and run the analysis.

When I deployed the app in shinyapps.io the app is unnable to read the files from the especified directory and returns the following error:

Warning: Error in : checkChipTypes(filenames, verbose, "affymetrix", TRUE) is not TRUE

There are to possible outcomes to this error, first the cel files are differente(which not, because they work locally) and the second outcome is that the function doesn't read the files and return an empty vector.

I'm pretty stuck with that because I don't understand why the files upload works fine locally , and isn't working in the server with the same code


#2

Solved , problem was the list.celfiles() function.

Now the code is like this:

#ui
###Input CEL files###
                    box(title ="CEL FILES",
                        solidHeader = T, status = "info", width = 6,
                        
                        fileInput("file", "Load CEL files(.CEL)",
                                  multiple = TRUE,
                                  accept = ".CEL",
                                 placeholder = "Please, insert the datapath of  CEL files"),
                        submitButton("Submit")
                        )

Server side


####Load CEL Files function###########
rawData <- reactive({
  validate(
    need(input$file != "", "Please Load CEL files")
  )
  
   read.celfiles(input$file$datapath)
   
})