Skip to content

Fix denoise bug#90

Merged
maxkarlsson merged 8 commits into
mainfrom
fix-denoise-bug
Jun 24, 2026
Merged

Fix denoise bug#90
maxkarlsson merged 8 commits into
mainfrom
fix-denoise-bug

Conversation

@maxkarlsson

@maxkarlsson maxkarlsson commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Description

Fixed a plot bug and added tabset anchors that can be used to navigate throughout the ES using links.

Added

  • In-report deep-link anchor IDs for plot tabsets (title_plotlist, tabset_plotlist, tabset_nested_plotlist). Anchor IDs are derived from the knitr chunk label and tab name (e.g. #abundance-per-marker-cd3, #qc-metrics-sequencing-saturation-s11).
  • ES report hash navigation in custom.html: opens nested tab panes for # links, scrolls to the target, refreshes HTMLWidgets and DataTables in newly shown tabs, and restores tab/scroll state on browser back.

Fixed

  • Bug in component_denoising in the isotype reduction plot, where components with zero isotype counts would cause the summary median to become NAs.

Type of change

  • Bug fix
  • New feature
  • Breaking change

How Has This Been Tested?

Manual tests.

PR checklist:

  • I have run R CMD check on the package and it passes.
  • I have made changes to the documentation.
  • I have added tests.
  • I have documented any significant changes in CHANGELOG.md

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an NA/median issue in the denoising isotype reduction component and adds in-report deep-linking for plot tabsets, including client-side hash navigation to open nested tabs and refresh widgets/tables when navigating via #... anchors.

Changes:

  • Add stable, URL-safe plot anchor IDs to title_plotlist(), tabset_plotlist(), and tabset_nested_plotlist() (with corresponding tests/docs/CSS).
  • Add hash-based navigation logic in inst/quarto/custom.html to activate nested tab-pane chains, scroll to targets, and refresh HTMLWidgets/DataTables/tooltips.
  • Fix component_denoising isotype reduction handling by converting NA reductions to 0 (and tweak plot rounding).

Reviewed changes

Copilot reviewed 9 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/testthat/test_plot_helpers.R Updates existing expectations to disable anchors in tests and adds new tests for slug/anchor emission.
R/read_data.R Tightens control_markers assertion in downsample_data().
R/plot_helpers.R Implements anchor slugging + optional anchor emission for plot lists/tabsets.
R/components.R Fixes NA handling for isotype reduction and adjusts rounding.
man/title_plotlist.Rd Documents new anchor_prefix argument.
man/tabset_plotlist.Rd Documents new anchor_prefix argument.
man/tabset_nested_plotlist.Rd Documents new anchor_prefix argument.
inst/quarto/styles.css Adds .plot-anchor styling (zero-height anchor div).
inst/quarto/custom.html Reworks tabset behavior and adds hash/deeplink navigation + widget/table refresh.
CHANGELOG.md Records added deep-linking/navigation and denoise/tab activation fixes.
Files not reviewed (3)
  • man/tabset_nested_plotlist.Rd: Generated file
  • man/tabset_plotlist.Rd: Generated file
  • man/title_plotlist.Rd: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread inst/quarto/custom.html
Comment thread inst/quarto/custom.html
@maxkarlsson maxkarlsson merged commit 42b794d into main Jun 24, 2026
6 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.

3 participants