Dear, I am trying to develop a shiny app of DotPlot for similarity analysis of two sequences using the seqinr library built-in function dotPlot() function. The following is my code
library(seqinr)
library(shiny)
# User interface
ui <- fluidPage(
titlePanel("Welcome to DotMatcher Plot App"),
sidebarLayout(
sidebarPanel (
fileInput("protein1",
multiple = FALSE,
accept =c("text", "fasta")),
fileInput( "protein2",
multiple=FALSE,
accept =c("text", "fasta")),
# Outputs
mainPanel(
plotOutput(outputId = "plot")
)
)
)
# Server Function
server<- function(input, output) {
output$plot <- renderPlot({
dotPlot(s2c(paste(protein1, collapse = ""),s2c(paste(protein2)))
})
}
# App
shinyApp(ui = ui, server = server)
I am getting following error messages
Error: unexpected '}' in:
" dotPlot(s2c(paste(protein1, collapse = ""),s2c(paste(protein2)))
}"
>
> }
Error: unexpected '}' in "}"
>
>
> shinyApp(ui = ui, server = server)
Error in shinyApp(ui = ui, server = server) : object 'server' not found
I will great acknowledge your help.