|
|
@ -11,7 +11,9 @@ ui <- fluidPage( |
|
|
|
|
|
|
|
sidebarLayout( |
|
|
|
sidebarPanel( |
|
|
|
shinyFilesButton("file", label="Select File", title="Select a Seurat Object", multiple=F) |
|
|
|
shinyFilesButton("file", label="Select File", title="Select a Seurat Object", multiple=F), |
|
|
|
uiOutput('groupby'), |
|
|
|
uiOutput('facetby') |
|
|
|
), |
|
|
|
|
|
|
|
mainPanel( |
|
|
@ -35,10 +37,28 @@ server <- function(input, output) { |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
output$groupby<-renderUI({ |
|
|
|
if (!is.null(dades$seu)){ |
|
|
|
selectInput("groupby", "GroupBy", c("Default", colnames(dades$seu@meta.data))) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
output$facetby<-renderUI({ |
|
|
|
if (!is.null(dades$seu)){ |
|
|
|
selectInput("facetby", "FacetBy", c("None", colnames(dades$seu@meta.data))) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
output$umapPlot <- renderPlot({ |
|
|
|
observeEvent(dades$seu, {}) |
|
|
|
if (!is.null(dades$seu)){ |
|
|
|
DimPlot(dades$seu)+theme(aspect.ratio=1) |
|
|
|
|
|
|
|
plot<-DimPlot(dades$seu, |
|
|
|
group.by = if(input$groupby != "Default"){input$groupby}else{NULL}, |
|
|
|
split.by=if(input$facetby != "None"){input$facetby}else{NULL})+ |
|
|
|
theme(aspect.ratio=1) |
|
|
|
plot |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|