Skip to content

Commit 93ad2ea

Browse files
committed
feat: add Spectronaut pivot report import and inline experimental design editor
- Add Spectronaut pivot report as a new data source with per-file preprocessing, condition setup TSV import, and wiring through identifier and experimental design steps - Replace file-upload experimental design with inline rhandsontable editor for CSV/Excel workflows; adds column classification, validation helpers, and collapsible data preview panel - Fix sidebar setup next button reactivity - Fix .data$ pronoun usage in color-mod helper - Add rhandsontable dependency; expose DTOutput/renderDT and p.adjust - Add tests for Spectronaut processing and expand CSV/Excel test coverage
1 parent 6f3b52c commit 93ad2ea

30 files changed

+2060
-206
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,11 @@ CLAUDE.md
1717
# Pak lockfiles (optional, platform-specific)
1818
pkg.lock
1919
.github/pkg.lock
20+
21+
.worktrees/
22+
23+
firebase-debug.log
24+
25+
docs/
26+
27+
.observer.lock

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ Imports:
5656
snakecase,
5757
shinyjs,
5858
future,
59-
furrr
59+
furrr,
60+
rhandsontable
6061
Depends:
6162
R (>= 4.0.0),
6263
shiny

NAMESPACE

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@ import(janitor)
1313
import(khroma)
1414
import(limma)
1515
import(markdown)
16+
import(rhandsontable)
1617
import(shiny, except=c(dataTableOutput, renderDataTable, runExample))
1718
import(shinyBS)
1819
import(shinyWidgets)
1920
import(snakecase)
2021
import(stringr)
2122
import(tidyr)
23+
importFrom(DT,DTOutput)
2224
importFrom(DT,dataTableOutput)
2325
importFrom(DT,datatable)
26+
importFrom(DT,renderDT)
2427
importFrom(DT,renderDataTable)
2528
importFrom(Matrix,Matrix)
2629
importFrom(Matrix,crossprod)
@@ -72,6 +75,7 @@ importFrom(stats,lm)
7275
importFrom(stats,mad)
7376
importFrom(stats,median)
7477
importFrom(stats,model.matrix)
78+
importFrom(stats,p.adjust)
7579
importFrom(stats,prcomp)
7680
importFrom(stats,qnorm)
7781
importFrom(stats,qt)

R/app_server.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ app_server <- function(input, output, session) {
1919
GCTs_and_params <- sidebar_output$GCTs_and_params
2020
globals <- sidebar_output$globals
2121
GCTs_original <- sidebar_output$GCTs_original
22+
column_rename_map <- sidebar_output$column_rename_map
2223

2324

2425
## Clear all notifications functionality
@@ -37,7 +38,8 @@ app_server <- function(input, output, session) {
3738
all_summary_exports <- summaryTabServer(
3839
GCTs_and_params = GCTs_and_params,
3940
globals = globals,
40-
GCTs_original = GCTs_original
41+
GCTs_original = GCTs_original,
42+
column_rename_map = column_rename_map
4143
)
4244

4345
## QC boxplots module

R/app_ui.R

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,40 @@ app_UI <- function(request) {dashboardPage(
5858
});
5959
")),
6060

61+
# Experimental design panel - shown during CSV/Excel experimental design step
62+
conditionalPanel(
63+
condition = "output['setupSidebar-showExpDesignPanel']",
64+
div(id = "exp-design-panel", style = "padding: 10px 15px;",
65+
uiOutput("setupSidebar-expDesignPanelContent")
66+
)
67+
),
68+
69+
# Separator between experimental design and data preview
70+
conditionalPanel(
71+
condition = "output['setupSidebar-showDataPreview']",
72+
hr(style = "margin: 4px 15px;")
73+
),
74+
75+
# Data preview panel - shown when a CSV/Excel file is uploaded
76+
conditionalPanel(
77+
condition = "output['setupSidebar-showDataPreview']",
78+
div(id = "data-preview-panel", style = "padding: 10px 15px;",
79+
div(style = "display:flex; align-items:center; gap:8px; margin-bottom:6px;",
80+
tags$strong(shiny::icon("table"), " Data Preview (first 20 rows)"),
81+
actionButton("toggleDataPreview", "Hide", class = "btn btn-xs btn-default",
82+
onclick = "$('#data-preview-content').slideToggle(); $(this).text($(this).text() === 'Hide' ? 'Show' : 'Hide');")
83+
),
84+
uiOutput("setupSidebar-previewFileSelector"),
85+
div(id = "data-preview-content",
86+
DT::DTOutput("setupSidebar-dataPreviewTable"))
87+
)
88+
),
89+
90+
conditionalPanel(
91+
condition = "output['setupSidebar-showDataPreview']",
92+
div(style = "padding-top: 20px;")
93+
),
94+
6195
navbarPage(
6296
title = '',
6397
id = "navbar-tabs",

R/protigy-package.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@
3030
#' @importFrom shinyjqui orderInput updateOrderInput
3131
#' @importFrom grDevices colorRampPalette dev.off pdf boxplot.stats
3232
#' @importFrom methods new
33-
#' @importFrom stats density mad median quantile sd aggregate coef qnorm qt setNames cor anova lm prcomp var complete.cases model.matrix
33+
#' @importFrom stats density mad median quantile sd aggregate coef qnorm qt setNames cor anova lm prcomp var complete.cases model.matrix p.adjust
3434
#' @importFrom zip zip
3535
#' @importFrom utils tail stack combn compareVersion packageVersion write.csv write.table head
3636
#' @importFrom rlang .data
3737
#' @importFrom ggthemes geom_tufteboxplot
38-
#' @importFrom DT datatable renderDataTable dataTableOutput
38+
#' @importFrom DT datatable renderDataTable dataTableOutput DTOutput renderDT
39+
#' @import rhandsontable
3940
#' @importFrom future plan availableCores
4041
#' @importFrom furrr future_map future_map2
4142
#' @importFrom Matrix Matrix

0 commit comments

Comments
 (0)