griffithlab / GenVisR

Genome data visualizations
Creative Commons Zero v1.0 Universal
206 stars 62 forks source link

Warning: Error in lolliplot_qual: Detected more than 1 transcript in input to x #380

Closed karenlawwc closed 2 years ago

karenlawwc commented 2 years ago

Hi, I am trying to build a shiny app to visualize mutation hotspots overlayed on a protein framework. The line of code works when I just run in R, but encounter this error message "Warning: Error in lolliplot_qual: Detected more than 1 transcript in input to x" when running in shiny R app. I cannot figure out the reason of this error and wondering could anyone help with this.

Input file: variant_ASD102.csv

Original code ran in R successfully: ADNP <- read.csv("variant_ASD102.csv") lolliplot(ADNP, fillCol="mutation_type")

Code that ran in shiny R app (app.R) but failed and got error but I did not have more than 1 transcript name listed: library(GenVisR) library(ggplot2) library("shiny") variant_df <- read.csv("variant_ASD102.csv") ui <- fluidPage( titlePanel("Plot ASD 102 variant"), textInput(inputId = "genename", label = "Enter a gene name from the 102 ASD gene list", value = "",), mainPanel( plotOutput(outputId = "plot") ) )

server <- function(input, output) { variant_df_subset <- reactive({ a <- subset(variant_df, gene == input$genename) return(a) }) output$plot <- renderPlot({ dd <- variant_df_subset() lolliplot(dd, fillCol="mutation_type")
}) } shinyApp(ui = ui, server = server)

Output:Warning: Error in lolliplot_qual: Detected more than 1 transcript in input to x

Input file is attached and any insight is appreciated!! Thanks in advance variant_ASD102.csv