Skip to content

Commit

Permalink
Removed custom file upload.
Browse files Browse the repository at this point in the history
  • Loading branch information
trestletech committed Feb 5, 2013
1 parent 56c4ac1 commit b6dbe1a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 34 deletions.
18 changes: 6 additions & 12 deletions grn/server.R
Expand Up @@ -38,19 +38,13 @@ shinyServer(function(input, output) {

data <- reactive(function(){

if (input$dataSource == FALSE){
path <- input$url
path <- input$url

#translate relative paths to server-friendly paths
if (substr(input$url, 0, 2) == "./"){
path <- paste("./www/", substring(input$url, 3), sep="")
}
} else{
df <- input$file
path <- df$datapath
}


#translate relative paths to server-friendly paths
if (substr(input$url, 0, 2) == "./"){
path <- paste("./www/", substring(input$url, 3), sep="")
}


data <- read.csv(path, row.names=1)

Expand Down
25 changes: 3 additions & 22 deletions grn/ui.R
Expand Up @@ -30,28 +30,9 @@ shinyUI(pageWithSidebar(
# label = "Source of the gene expression data:",
# choices = c("Local", "Remote"),
# selected = "Remote"),

checkboxInput(inputId= "dataSource", label="Use a file stored on my local machine.", value=FALSE),

conditionalPanel(
condition = "input.dataSource == false",
textInput(inputId="url", label="File URL:", value="./sampleExp.csv"),
helpText(HTML("<div style=\"text-indent: 25px\">Download the sample dataset <a href=\"sampleExp.csv\">here</a></div>"))
),

conditionalPanel(
condition = "input.dataSource == true",
fileInput(inputId = "file", label="Network to reconstruct:"),
helpText(HTML("<div style=\"color: red; font-weight: bold\">Warning:</div> Local file uploads in
Shiny are <strong>very</strong> experimental. I have had success using this
feature from the latest version of Firefox but, at the time of writing, it
does not seem to be working from Chrome or IE.
<p>If you have trouble using this feature but want to analyze your own
dataset, you can upload the file to a public URL using a tool like
<a href=\"http://dropbox.com\">Dropbox</a> or one of the many free upload
sites."))
),

textInput(inputId="url", label="File URL:", value="./sampleExp.csv"),
helpText(HTML("<div style=\"text-indent: 25px\">Unfortunately, Shiny isn't playing nicely with file uploads at the time of writing, so I've disabled the custom file uploads temporarily. However, you can post your expression file online using any one of the free file hosting sites now available and provide the URL here to process it in this app! <p>You can also download the sample dataset <a href=\"sampleExp.csv\">here</a>.</div>")),

HTML("<hr />"),

selectInput(inputId = "orientation",
Expand Down

0 comments on commit b6dbe1a

Please sign in to comment.