Skip to content

Add progress messages to RCTD pipeline and fix detectCores() NA handling#1

Open
jack-corridor wants to merge 2 commits into
masterfrom
claude/fix-issue-254-a1o7A
Open

Add progress messages to RCTD pipeline and fix detectCores() NA handling#1
jack-corridor wants to merge 2 commits into
masterfrom
claude/fix-issue-254-a1o7A

Conversation

@jack-corridor

Copy link
Copy Markdown
Owner

Addresses issue dmcable#254 where run.RCTD() appears to hang with no feedback.
The pipeline performs heavy computation in long-running loops with no
progress messages, making users (especially in Jupyter) think it's stuck.

  • Add step-level progress messages in run.RCTD (1/3, 2/3, 3/3)
  • Add epoch progress in choose_sigma_c loop
  • Add per-100-pixel progress in decompose_batch, process_beads_batch,
    and process_beads_multi sequential paths
  • Add startup message in fitPixels showing mode, pixel count, and cores
  • Fix parallel::detectCores() returning NA on some systems (containers,
    conda envs) which could cause makeCluster to fail
  • Clean up stale commented-out logging code

https://claude.ai/code/session_01HWxtzSKTo6Be7xwrjyyNNM

Addresses issue dmcable#254 where run.RCTD() appears to hang with no feedback.
The pipeline performs heavy computation in long-running loops with no
progress messages, making users (especially in Jupyter) think it's stuck.

- Add step-level progress messages in run.RCTD (1/3, 2/3, 3/3)
- Add epoch progress in choose_sigma_c loop
- Add per-100-pixel progress in decompose_batch, process_beads_batch,
  and process_beads_multi sequential paths
- Add startup message in fitPixels showing mode, pixel count, and cores
- Fix parallel::detectCores() returning NA on some systems (containers,
  conda envs) which could cause makeCluster to fail
- Clean up stale commented-out logging code

https://claude.ai/code/session_01HWxtzSKTo6Be7xwrjyyNNM
Introduces a comprehensive test suite covering the changes from issue dmcable#254:

- test-progress-messages.R: Verifies run.RCTD emits step-level messages
  (1/3, 2/3, 3/3), choose_sigma_c emits epoch progress, and fitPixels
  emits startup messages for each doublet mode
- test-decompose-batch.R: Tests progress reporting for >= 100 beads,
  suppression for < 100, and correct return structure
- test-process-beads.R: Tests process_beads_batch progress and result
  structure validation (spot_class, first_type, second_type fields)
- test-detectcores-na.R: Verifies the is.na(numCores) guard exists in
  all three parallel functions (decompose_batch, process_beads_batch,
  process_beads_multi)
- test-irwls.R: Tests IRWLS solver convergence, OLS mode, decompose_full
  structure, and set_likelihood_vars global variable setup
- test-create-rctd.R: Tests RCTD object construction, test_mode config
  overrides, and cell_type_info structure
- test-run-rctd-integration.R: Full pipeline integration tests for all
  three modes (doublet, full, multi), plus message ordering verification
- helper-fixtures.R: Reusable test fixture creators for Reference and
  SpatialRNA objects with cell-type-specific expression patterns

Also adds testthat >= 3.0.0 to Suggests in DESCRIPTION.

https://claude.ai/code/session_01HWxtzSKTo6Be7xwrjyyNNM
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