Skip to content

Fix Celda tab feature selection and app startup with preloaded data - #806

Merged
joshua-d-campbell merged 8 commits into
develfrom
fix/shiny-celda-feature-selection
Oct 8, 2026
Merged

joshua-d-campbell merged 8 commits into
develfrom
fix/shiny-celda-feature-selection

Conversation

@joshua-d-campbell

@joshua-d-campbell joshua-d-campbell commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

What changed and why

The maintainer asked for these Shiny app fixes. AGENTS.md otherwise keeps
app changes propose-only.

Celda tab feature selection. Both methods failed:

  • Scran_modelGeneVar called scranModelGeneVar(), which doesn't exist.
    It now calls runModelGeneVar(). It also normalized with the deprecated
    scater::logNormCounts(), and now uses scaterlogNormCounts().
  • SeuratFindHVG never ran. The server checked for "runSeuratFindHVG",
    but the dropdown's value is "SeuratFindHVG".
  • Both passed n = to getTopHVG(), which takes hvgNumber. They now also
    pass useFeatureSubset = NULL, so the genes come from the computed
    metrics, and featureDisplay = NULL, so they come back as rownames that
    can subset the object.
  • Both replaced the app's whole dataset with the selected genes, so every
    other tab lost the rest (found by /code-review). The HVGs, filtered by
    the count thresholds, now go only into the featureSubset altExp that
    Celda uses, as with the "None" option.
  • With Seurat 5, only the vst method of SeuratFindHVG works. The other
    two fail inside runSeuratFindHVG() (runSeuratFindHVG fails for dispersion and mean.var.plot with Seurat 5 #804), and NEWS says so.

Starting the app with data. singleCellTK(inSCE = sce) returned HTTP 500
for any object without alternative experiments: ui.R called
names(altExp(x)). It now calls altExpNames(x).

Other changes:

How it was tested

  • Manual check (maintainer): ran the Celda workflow in the app with both
    feature-selection methods; it worked. This was before the change that
    keeps all genes in the main dataset, which was verified only by script
    (next point).
  • Keep-all-genes change (scripted): both branches keep the full
    200 × 195 main object, with 95 or 100 HVGs in featureSubset, and
    recursiveSplitModule() runs on the result.
  • Scripted: the exact server-side calls for both branches ran on
    scExample with featureDisplay set:
    • modelGeneVar: 95 HVGs, returned as rownames;
    • SeuratFindHVG: 100 HVGs, returned as rownames;
    • the old calls fail with "unused argument (n = n)" and "could not find
      function scranModelGeneVar".
  • App startup with preloaded data: HTTP 500 before the altExpNames()
    fix, HTTP 200 after.
  • Automated UI test: a shinytest2 run couldn't click through the app,
    because it never becomes idle in headless Chrome (Shiny app never becomes idle under shinytest2, blocking automated tests #803).
  • lintr is clean on changed lines, and server.R parses.

Issues found while testing and left for later:

Checklist

ADR

N/A: no structural change.

Scientific correctness

Generated content

Claude Code (Opus 5.5) wrote all of this PR. The maintainer requested the
app changes and checked them in the running app.

🤖 Generated with Claude Code

joshua-d-campbell and others added 8 commits October 6, 2026 21:22
Both feature-selection options on the Celda tab failed. The modelGeneVar
option called scranModelGeneVar(), which does not exist; it now calls
runModelGeneVar(). Both options passed n = to getTopHVG(), which takes
hvgNumber, and did not set useFeatureSubset = NULL, so no HVGs were
computed from the stored metrics. featureDisplay = NULL keeps rownames
so that the object can be subset by them. The deprecated
scater::logNormCounts() call now goes through scaterlogNormCounts().

Requested by the maintainer as a separate change (AGENTS.md lists app
changes as propose-only by default).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Requested by the maintainer; matches the runSoupX() change in PR B2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dropdown's value is 'SeuratFindHVG', but the server checked for
'runSeuratFindHVG', so choosing it ran no feature selection and the next
step failed on the missing feature subset. The Celda workflow article now
names the option as the app shows it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
singleCellTK(inSCE = sce) failed with HTTP 500 for any object without
alternative experiments: ui.R called names(altExp(x)), which errors when
there are none. Use altExpNames(x).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Found by /code-review: both HVG options replaced the app's whole dataset
with the selected genes, so every other tab lost the rest. The HVGs,
filtered by the count thresholds, now go only into the featureSubset
altExp that Celda uses, as with the None option. NEWS notes that only
the vst method of SeuratFindHVG works with Seurat 5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@joshua-d-campbell
joshua-d-campbell merged commit 3e384e3 into devel Oct 8, 2026
0 of 4 checks passed
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.

1 participant