Skip to content

Add conformational change explorer - #22

Merged
CedricHermansBIT merged 17 commits into
mainfrom
feature/conformational-change-explorer
Oct 6, 2026
Merged

CedricHermansBIT merged 17 commits into
mainfrom
feature/conformational-change-explorer

Conversation

@CedricHermansBIT

@CedricHermansBIT CedricHermansBIT commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Adds the first residue-level Conformational Change Explorer to the pairwise Compare workflow.

What it does

  • sequence-aligns the selected chains as before;
  • calculates wrapped Δφ and Δψ for every aligned pair;
  • adds a transparent local backbone-displacement measure: sqrt(Δφ² + Δψ²) after wrapping each angular component across ±180°;
  • classifies that display-only displacement as Small (<15°), Moderate (15–30°), Large (30–60°) or Very large (≥60°);
  • renders a scrollable residue track with permanent true PDB residue numbers every 10 positions;
  • exposes the five largest local shifts as direct navigation targets;
  • clicking the track selects the same aligned pair in the 2D comparison plot, table and both 3D structures;
  • selected-pair details show Δφ, Δψ, combined shift, native RamplotR changes and Rama8000 category changes;
  • comparison filters now include combined backbone shift ≥30°;
  • summary metrics show count ≥30° and the largest combined shift.

Interpretation

The combined angular displacement is explicitly presented as a navigation/ranking measure, not a statistical significance score, RMSD, free-energy metric or proof of biological motion.

Coverage

  • unit tests cover wrapped angular displacement and display bands;
  • live-browser CI checks the track, true residue numbering, top-shift shortcuts and track → paired 2D/3D selection;
  • existing scientific, benchmark and independent wwPDB workflows remain unchanged.

@CedricHermansBIT
CedricHermansBIT changed the base branch from feature/rama8000-validation to main October 6, 2026 17:58
@CedricHermansBIT
CedricHermansBIT marked this pull request as ready for review October 6, 2026 18:03
Copilot AI balanced review requested due to automatic review settings October 6, 2026 18:03
@CedricHermansBIT
CedricHermansBIT merged commit ccf4c44 into main Oct 6, 2026
9 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The track omits valid aligned endpoints, rebuilds on every selection, has accessibility gaps, and its browser tests do not verify the claimed linked behavior.

Review effort: Balanced
Findings: 4 Medium severity · 2 Low severity

Open (6)
What changed in this PR

Adds a residue-level Conformational Change Explorer to linked structure comparisons.

Changes:

  • Computes and classifies wrapped φ/ψ displacement.
  • Adds an interactive residue track, ranking, filters, metrics, and linked selection.
  • Extends unit, browser, and user documentation coverage.
File Description
shinyRam/​R/​inspection.R Calculates displacement and display bands.
shinyRam/​app.R Integrates explorer UI and comparison behavior.
shinyRam/​www/​custom.js Handles track selections.
shinyRam/​www/​styles.css Styles the explorer.
tests/​inspection.R Tests calculations and thresholds.
tests/​ui-browser.cjs Adds browser checks for the explorer.
README.md Advertises the new comparison workflow.
docs/​inspection-user-guide.md Documents usage and interpretation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread shinyRam/app.R
Comment on lines +1582 to +1583
finite <- which(is.finite(data$angular_displacement) &
data$alignment %in% c("Match","Substitution"))
Comment thread shinyRam/app.R
finite <- which(is.finite(data$angular_displacement) &
data$alignment %in% c("Match","Substitution"))
if (!length(finite)) return(NULL)
selected <- selected_comparison()
Comment thread tests/ui-browser.cjs
Comment on lines +637 to +638
assert.ok(changeTrack.topLabels.length > 0 && changeTrack.topLabels.length <= 5,
"Explorer should expose the largest local shifts as navigation targets.");
Comment thread tests/ui-browser.cjs
Comment on lines +647 to +651
const stage = window.getNGLStage && window.getNGLStage("NGLCompare");
return cell && stage &&
stage.getRepresentationsByName("ram-compare-highlight-a").list.length === 1 &&
stage.getRepresentationsByName("ram-compare-highlight-b").list.length === 1 &&
document.querySelector(".ram-compare-selection-pair");
Comment thread shinyRam/app.R
band_class(data$shift_band[[i]]),
if (!is.null(selected) && identical(data$row_id[[i]],selected))
"is-selected" else ""),
"data-row-id"=data$row_id[[i]],
Comment thread shinyRam/app.R
Comment on lines +1617 to +1618
"aria-label"=sprintf(
"Inspect aligned residue pair with %.1f degree backbone shift",shift)
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