Skip to content

Commit

Permalink
Finish Bubbleplot GUI
Browse files Browse the repository at this point in the history
- Removed bpRowUI, selected after imports now
  • Loading branch information
akshayarav committed Jan 3, 2024
1 parent 71c60d5 commit 91a9191
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
4 changes: 2 additions & 2 deletions R/runNormalization.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
#' outAssayName = "logcounts")
runNormalization <- function(inSCE,
useAssay = "counts",
outAssayName = "customNormalizedAssay",
normalizationMethod = NULL,
outAssayName = "logcounts",
normalizationMethod = "logNormCounts",
scale = FALSE,
seuratScaleFactor = 10000,
transformation = NULL,
Expand Down
21 changes: 8 additions & 13 deletions inst/shiny/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -5713,22 +5713,17 @@ shinyServer(function(input, output, session) {
req(vals$counts)
selectInput(
'bpCluster',
"Select Feature for Annotation",
"",
colnames(colData(vals$counts)), multiple = FALSE, width = '550px')
})

output$bpRowUI <- renderUI({
req(vals$counts)
selectNonNARowData <- names(apply(rowData(vals$counts), 2, anyNA)[apply(rowData(vals$counts), 2, anyNA) == FALSE])
selectInput(
"bpRow",
"Select Row Data Name",
selectNonNARowData, selected = names(rowData(vals$counts))[1], multiple = FALSE, width = '550px')
})

observeEvent(input$bpRow, {
req(vals$counts)
updateSelectizeInput(session, "bpFeatures", choices = rowData(vals$counts)[[input$bpRow]], server = TRUE)
observe({
req(vals$counts)

if (!is.null(metadata(vals$counts)$featureDisplay) && metadata(vals$counts)$featureDisplay %in% names(rowData(vals$counts))) {
featureDisplayValue <- metadata(vals$counts)$featureDisplay
updateSelectizeInput(session, "bpFeatures", choices = rowData(vals$counts)[[featureDisplayValue]], server = TRUE)
}
})

observeEvent(input$plotBubbleplot, {
Expand Down
3 changes: 1 addition & 2 deletions inst/shiny/ui_08_4_bubbleplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ shinyPanelBubbleplot <- fluidPage(
column(width = 4,
hr(),
# Subset ####
h3("Select Annotation"),
h3("Select Cell Annotation"),
uiOutput("bpClusterUI"),
h3("Feature"),
fluidRow(
Expand All @@ -24,7 +24,6 @@ shinyPanelBubbleplot <- fluidPage(
options = NULL)
)
),
uiOutput('bpRowUI'),
selectizeInput(
'bpFeatures',
"Select Features",
Expand Down

0 comments on commit 91a9191

Please sign in to comment.