Skip to content

Migrate upload and qsee preprocessing to playbase.preprocess - #1900

Closed
phisanti wants to merge 10 commits into
develfrom
refactor/simplify-preprocessing
Closed

phisanti wants to merge 10 commits into
develfrom
refactor/simplify-preprocessing

Conversation

@phisanti

Copy link
Copy Markdown
Contributor

Summary

The app stops calling preprocessing primitives scattered across playbase and talks to one boundary instead. Two consequences shape this PR:

  1. One options object describes a run. The QC/BC panel builds a single canonical option list; staged previews and the submitted matrix are the same description with stages switched off. What you see in the panel is what
    compute runs.
  2. counts is the pure user input, so boards must ask for it aligned. pgx$counts keeps its uploaded shape and no longer matches pgx$X. .opg_pgx_analysis_counts() is the only supported way to read counts on X's axes — never index pgx$counts directly in a board.
components/
├── board.upload/R/
│   ├── upload_preprocess.R          # NEW, 487 lines — the boundary:
│   │                                #   option builder · staged previews
│   │                                #   createPGX handoff · aligned counts
│   ├── upload_module_normalization.R  # QC/BC panel emits the canonical options
│   ├── upload_module_computepgx.R     # splits the batch selector for createPGX
│   └── upload_server.R                # reanalysis payload + contract gate
│
├── app_qsee/R/                      # compute files repointed at the leaf;
│                                    #   plot files migrated to omicsplots bundles
├── board.dataview/  (9 sites) ┐
├── board.expression/(3 sites) ├─ read counts via .opg_pgx_analysis_counts()
└── app_qsee/        (1 site)  ┘

Merge order

Depends on bigomics/playbase#526
playbase → this PR.

Testing

  • 66 contract tests pass (tests/testthat/test-upload-preprocess-contract.R)
  • Verified against example-data.pgx, mouse-example.pgx, arabidopsis.pgx
    and the AML multi-omics dataset
  • Parser-level scan confirms no remaining bad omicsplots:: arguments
  • Single-cell, methylomics (BMIQ) and Olink/NuLISA NPX paths were not tested.

ivokwee and others added 9 commits September 3, 2026 13:31
…flash

- Default a freshly uploaded document to checked for the next question,
  and switch its checkbox id from row index to sanitized name so a doc's
  input state stays attached to it when uploads/deletes reorder the list.
- mark_consumed() now only writes the consumed reactiveVal when the
  locked set actually changes, instead of on every ask - a reactiveVal
  invalidates its renderUI dependents on every write regardless of
  whether the value changed, which was causing the whole Sources docs
  list to visibly flash on every single question, not just the first
  one that locks a document.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RjAHhKH71SHFbo2KuMcBjE
fix(obi): warn instead of silently blocking uncheck of documents already in chat context
- swap the "multi-omics median" choice for "multiomics", since
  normalizeMultiOmics() dropped that algorithm on 2025-11-11 and has
  ignored the "median" value ever since
- translate a legacy-recorded "median" through selectInput() so it
  resolves to the new choice instead of silently falling back to
  choices[[1]]
- run upload previews through the shared preprocessing pipeline
- preserve literal source matrices across compute and reanalysis
- align downstream views explicitly when processed dimensions differ
- repoint pp.* and pgx.preprocess calls from playbase to the new
  playbase.preprocess leaf package across upload, app_qsee, and
  correlation board code, keeping the numerical pipeline behind
  one dedicated boundary
- register playbase.preprocess in DESCRIPTION, dev/functions.R, and
  dev/write_description.R so it is fetched and tracked like the
  other bigomics dependencies
- update GSE/TCGA pipeline scripts and the upload-preprocess
  contract test to match the new call paths
- split the deployment licence gate (ENABLE_AI) from the provider pin
  (AI_PROVIDER_LOCKED): pinning the provider no longer freezes the AI
  on/off switch or the data-sharing consent for every non-admin
- the free deployment sets AI_PROVIDER_LOCKED=TRUE purely to stop users
  picking a provider, which left all seven AI controls disabled and AI
  forced on with no way to opt out, despite the data-exposure warning
- add regression tests for that deployment config and re-point the
  consent tests that encoded the old coupling at the licence gate
- pass batch.correct.method and batch.pars from the panel to pgx.createPGX
- align legacy datasets by name so every board opens without an alignment
- migrate qsee plot calls to the omicsplots control-bundle arguments
- use the bigomics/playbase.preprocess shorthand so access is authenticated
- emit the shorthand from the generator instead of a url archive fetch
@phisanti
phisanti requested review from ESCRI11 and ivokwee September 17, 2026 13:29
@phisanti

Copy link
Copy Markdown
Contributor Author

Please @ivokwee confirm if we close this PR in favour of using the branch as reference for fanta.

@phisanti

phisanti commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Implementation in shiny OPG cancelled. This will go directly to fanta

@phisanti phisanti closed this Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants