Thank you. This is what I would like to do: "If the R program depends on user input in the shiny app then you can just run the code inside of a reactive() or eventReactive() function that will rerun the code every time one of the dependent inputs is changed or a specific action is perform (i.e. a button click), respectively". Will I write the reactive or eventReactive() functions inside the server function or outside? in either the leftside panel or mainPanel?
This is the code I have written so far:
library(shiny)
#source("glycoPipe/glycoPipe.R")
Define ui
ui <- fluidPage(
tags$head(
tags$style(HTML("
@import url('//fonts.googleapis.com/css?family='Helvetica', 'Arial', sans-serif:400,700');
"))
),
fluidRow(
column(width = 3, offset = 1),
headerPanel(
h1("glycoPipe - Identification and Analysis Pipeline R Package",
style = "font-family: 'Lobster', 'cursive';
font-weight: 500; line-height: 1.1;
color: #394779;"))
),
sidebarLayout(
sidebarPanel(
fluidRow(
column(width = 3, offset = 0,
img(src="logo.jpeg", height = 50, width = 200, align = "middle"))
),
fluidRow(
column(width = 3, offset = 0,div(style = "height:25px;background-color: #99CCFF", strong("Urology"))
)
),
fluidRow(column(width = 10, helpText(div(style = "height:100px;background-color: white;"),
h4("Do you have a parameter file ready to use (Y/N)?")))
),
fluidRow(
textInput(",",h4("Please enter Y/N"),
value = "Enter text...")
)
),
mainPanel(
p("glycoPipe first identifies and annotates glycan compositions
from peaks in non-SID/ MS/MS data, which is optimized for
fragmentation of the glycan portion of glycopeptides."),
p("These glycan identifications are next grouped by shared
annotated glycan peaks, shared probable peptide mass,
and found within the same RT regions."),
p("glycoPipe then processes, annotates and incororates peptide
search engine results from SID/HCD data, which is optimized
for fragmentation of the peptide portion."),
p("Finally the glycan groups are matched to these peptide
identifications by mass and RT adjacency in order to derive
full, annotated glycoconjugate identifications."),
p("glycoPipe outputs numerous plots and tabular results.")
)
)
)
Define server logic
server <- function(input, output){
}
Run the app
shinyApp(ui = ui, server = server)
What I need to write now is text that asks the user for the file that needs to be uploaded to the server, answer will be Y/N and the user will have the ability to browse the PC to find and select the file to be uploaded