Browse Source

He añadido la opción de cambiar el grupo y de añadir un facet.

BuiltinModules
Marcel Costa 1 year ago
parent
commit
cd17424f44
1 changed files with 22 additions and 2 deletions
  1. +22
    -2
      scMonitor/app.R

+ 22
- 2
scMonitor/app.R

@ -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
}
})
}

Loading…
Cancel
Save