Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@

## Interface and handling

- reorganize GUI parameters, add conditional seed/accessibility controls and
grouped CSV defaults, expand FASTA limits and refine result headers (PR #299)

- retain computed GUI runs as named, foldable sessions with JSON input restoration,
independent outputs, per-session ZIP export and deletion (PR #297 review)

- permit clearing inherited CSV sorting when replaying JSON as text reports;
validate JSON/GUI behavior in native release/debug and real browsers (#287)

Expand Down Expand Up @@ -279,6 +285,40 @@ energies, restricted partition sums, and trackers.
################################################################################
################################################################################

261024 Alexander Mitrofanov
* gui/{app,options,columns}.js, gui/{index.html,styles.css}
* organize tabs/rows as Sequences, Seed, Output, Model & Energy, Query,
Target and CLI-only; align wrapped labels and place Compute first
+ add a three-way seed selector, synchronized accessibility flags and
mode-dependent input availability; place SHAPE beside accessibility
* group compact CSV choices with descriptions and group selection actions;
default to 10 predictions and expanded task-specific energy columns,
explicitly preserving browser defaults in native-compatible JSON
* gui/{protocol,uploads,parameter-file}.js, gui/examples/
* accept 50 FASTA records per strand of 2-5,000 nt each, with longest
selected query x longest selected target <= 1,000,000; allow 1 MB FASTA
+ warn about ignored FASTA header descriptions while using first-token IDs
* gui/{sessions,results}.js
* select results from the header/name, order Show/Hide before the name and
ZIP/delete actions, compact table headings and distinguish selected rows
* gui/tests/, scripts/wasm/test-browser.py, README.md, gui/docs/
+ cover limits, native JSON replay/defaults, dependent controls, grouped CSV
choices, desktop/mobile alignment and result header selection
* address https://github.com/BackofenLab/IntaRNA/pull/299#issuecomment-6375752155

261023 Alexander Mitrofanov
* gui/{app,sessions,results,visualization}.js, gui/{index.html,styles.css}
+ retain successful runs in browser memory with unique IDs, editable names,
independent results/diagnostics and JSON snapshots of their computed inputs
* restore inputs and fold other output areas on selection; preserve sessions
across edits, reset, imports, failures and aborts; unload folded viewers
+ export each session's original JSON/outputs from its header and delete it
without overwriting editable inputs; keep controls keyboard accessible
* scripts/wasm/{stage.sh,test-browser.py}, README.md, gui/docs/
* stage the sessions module, exercise session lifetime and archive isolation
in real browsers, and document temporary storage and updated reset behavior
* follow-up to https://github.com/BackofenLab/IntaRNA/pull/297#issuecomment-6367326708

261023 Alexander Mitrofanov
* .gitattributes, gui/docs/json-workflow.md
+ Preserve exact upstream license whitespace and mark the JSON header and
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
seeding of interaction sites**

Predict short RNA pairs or evaluate supplied structures locally with the [browser interface](https://backofenlab.github.io/IntaRNA/gui/).
Select an interaction to view it in vaRRI, or download a ZIP with inputs, compiled versions, reproducible parameters and all outputs.
The browser accepts up to 50 records per strand, 2–5,000 nucleotides each, with longest selected query × longest selected target at most 1,000,000. Prediction defaults to 10 interactions per pair and includes opening and seed energies; evaluation selects all energy columns.
Computed runs stay in separate, foldable sessions under Results in the current tab. Name and select sessions to restore their inputs and compare results; editing or resetting parameters keeps earlier runs.
Select an interaction to view it in vaRRI, or download a session’s ZIP with inputs, compiled versions, reproducible parameters and all outputs. Sessions are temporary and are cleared when the page is reloaded.
See the [WebAssembly build instructions](gui/docs/step1-wasm-compilation.md) and
[interface/deployment notes](gui/docs/step4-results-and-deployment.md).

Expand Down
224 changes: 146 additions & 78 deletions gui/app.js

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions gui/columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,3 +313,23 @@ export const CSV_CATALOG = [
"numeric": true
}
];

// Every native column appears once. Ensemble energies and their components are
// grouped with probabilities so users can see the cost/meaning of those outputs.
export const CSV_GROUPS = [
{ label: 'Energy', keys: ['E', 'ED1', 'ED2', 'E_init', 'E_loops', 'E_dangleL', 'E_dangleR', 'E_endL', 'E_endR', 'E_hybrid', 'E_norm', 'E_hybridNorm', 'E_add', 'seedE', 'seedED1', 'seedED2'] },
{ label: 'Output', keys: ['subseqDP', 'subseqDB', 'hybridDP', 'hybridDB', 'hybridDPfull', 'hybridDBfull', 'bpList'] },
{ label: 'Sequence', keys: ['id1', 'id2', 'seq1', 'seq2', 'subseq1', 'subseq2'] },
{ label: 'Interaction', keys: ['start1', 'end1', 'start2', 'end2', 'seedStart1', 'seedEnd1', 'seedStart2', 'seedEnd2'] },
{ label: 'Partition Function', keys: ['Pu1', 'Pu2', 'seedPu1', 'seedPu2', 'w', 'Etotal', 'Eall', 'Eall1', 'Eall2', 'Zall', 'Zall1', 'Zall2', 'EallTotal', 'P_E', 'RT'] },
];

export function defaultColumns(task) {
const context = ['id1', 'start1', 'end1', 'id2', 'start2', 'end2', 'subseqDP', 'hybridDP', 'E'];
// Seed energies remain available in evaluation, where native output is NAN.
// List them explicitly: seedEnd1/2 are coordinates, not energy columns.
const extra = task === 'evaluation'
? [...CSV_CATALOG.filter(({ key }) => key.startsWith('E')).map(({ key }) => key), 'seedE', 'seedED1', 'seedED2']
: ['ED1', 'ED2', 'seedE', 'seedStart1', 'seedStart2'];
return [...new Set([...context, ...extra])];
}
93 changes: 87 additions & 6 deletions gui/docs/json-workflow.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# JSON settings and reproducible runs

Load and Store sit to the right of Reset parameters. Store downloads
The action bar starts with Compute/Evaluate, followed by Input Parameters:
Examples, Store, Load and Reset. Store downloads
`parameter.json` containing non-default settings and embedded input text in the
[native JSON format](../../doc/json-parameters.md). `_comment` records compiled
tool/library versions and executable reproduction commands. It is JSON metadata,
Expand All @@ -26,11 +27,48 @@ and CSV-only settings while retaining the same inputs and analysis settings.
Reports run independently, matching the worker. The WASM integration test
replays the JSON in fresh engines and compares every output byte.

## Computed sessions

Each successful computation, including a run with no interaction rows, creates a
new session with a unique ID within the page and a default name such as
`Prediction 1` or `Evaluation 2`. The session retains the computed inputs in JSON,
CSV output, additional files and diagnostics. Editing parameters, Load, examples,
Reset, invalid inputs, failed computations and cancellation preserve prior
sessions. Failed or aborted computations do not create a session.

The newest session opens automatically under **Results**. Use **Show**, select
its header/name, or select its output area to restore that session’s
computed inputs and fold the other sessions. The task, sequence text, signed
indices, SHAPE/accessibility text, CSV selection/order and additional output
selection are restored together. **Hide** folds the output. Each session
keeps its own filter, sorting and visible columns; folded vaRRI frames are unloaded
and restored when their session is reopened.

Edit **Session name** directly in the header. Names are plain text; an empty name
returns to the default. **Download ZIP** remains available while folded and always
archives that session’s original JSON and complete outputs, regardless of the
current form or table filters. The session name supplies a safe download filename;
ZIP members remain `parameter.json` and output files. The garbage-bin button
removes only its session and releases its output; it does not change form inputs.

Sessions exist only in the current page’s browser memory. They are not written to
browser storage or uploaded. Reloading or closing the page discards them; use ZIP
exports to retain results. Memory use grows with the runs kept open, so delete
sessions that are no longer needed. Store continues to save the editable form.
If compiled metadata cannot be fetched, a completed run is still retained and its
JSON explicitly records that version information is unavailable.

## Reset and examples

Reset clears sequences, interactions, uploaded files and results and restores
prediction defaults. Empty FASTA fields show the short demonstration sequences
as placeholders only. The Example disclosure menu sits to the left of Reset.
Reset clears the editable sequences, interactions and uploaded files and restores
prediction defaults (10 interactions per pair, expanded energy/seed columns).
Evaluation defaults select all energy columns. These GUI defaults are written
explicitly in JSON when they differ from the CLI; importing existing JSON still
uses native defaults for omitted parameters. Inactive controls keep their edits
in the form for switching modes, but their values are omitted from executed and
stored settings. Previously computed sessions remain available. Empty FASTA
fields show the short demonstration sequences as placeholders only. The Examples
disclosure menu follows the Input Parameters label.

Maintainers edit `gui/examples/index.json` (an array of local JSON filenames).
Each listed file contains `name`, `description`, and `configuration`, where the
Expand All @@ -42,9 +80,13 @@ examples show an error in the menu; they never overwrite the form.
## Local FASTA files

Each strand has an Upload button and accepts a text-file drop into its textarea.
Files are read locally (at most 60 KB), validated with the same FASTA checks as
Files are read locally (at most 1 MB), validated with the same FASTA checks as
manual entry, and replace only that strand after successful validation. Prediction
accepts multi-FASTA; evaluation requires one record. Invalid files leave the
accepts up to 50 FASTA records per strand, each 2–5,000 nt; evaluation requires
one record. The longest selected query × longest selected target must be at most
1,000,000. Names end at the first whitespace; ignored header descriptions produce
a warning below the corresponding field. Both FASTA fields scroll horizontally
and vertically. Invalid files leave the
previous input intact. A later edit, reset, import or computation discards any
pending file read, so delayed reads cannot replace newer input.

Expand All @@ -66,3 +108,42 @@ pending file read, so delayed reads cannot replace newer input.
- Embedded ViennaRNA energy-parameter text matched native file input. Existing
dependency-download and ViennaRNA-release tests, shell syntax, workflow YAML,
source-distribution contents, vendor checksums and `git diff --check` passed.

## Session follow-up validation (2026-10-23)

- `npm test --prefix gui`: all 18 Node tests passed.
- `scripts/wasm/test-browser.py` passed in Chromium and Firefox with real WASM
at nested URLs. Session checks cover input/JSON restoration, task changes,
signed indices, SHAPE text, CSV order, reports, independent filters/columns,
edits/reset/imports, failed/aborted runs, keyboard selection, safe renaming,
folded-session archives, deletion, stale file reads and page reload.
- Desktop screenshots were inspected; session controls remain accessible at a
390 px viewport without document overflow.
- `node scripts/wasm/smoke-protocol.mjs` passed native-reference checks and
byte-identical archive replay. Browser checks reused the parent branch’s
compiled Emscripten 4.0.23 / ViennaRNA 2.7.2 assets with their original metadata;
this follow-up changes no C++ code or worker protocol.
- A fresh GCC 14 release build passed `make tests -j2`: all nine native API/CLI
groups passed. Tracked fixtures were linked into the out-of-tree build’s
`tests/data` directory for the existing CLI harness.
- Static staging (including the new session module and engine digest checks),
shell syntax and `git diff --check` passed.

## PR #299 review validation (2026-10-24)

- `npm test --prefix gui`: all 20 tests passed, including FASTA limits, header
warnings, complete column grouping and explicit browser-default JSON replay.
- `scripts/wasm/test-browser.py` passed with real WASM in Chromium and Firefox.
It covers the reordered panels, aligned controls, shared accessibility flags,
seed/accessibility/helix modes, inactive values, explicit-seed Load/Store,
group selection, FASTA scrolling/warnings and result header/name selection,
plus the existing prediction/evaluation, ZIP, abort and session checks.
- Desktop and 390 px mobile screenshots were inspected. All seven panels have
no document overflow; table contents retain their own horizontal scrolling.
- `node scripts/wasm/smoke-protocol.mjs <staged-engine>` passed native-reference
checks and byte-identical JSON archive replay. The unchanged engine uses the
parent branch's Emscripten 4.0.23 / ViennaRNA 2.7.2 assets and original metadata.
- A fresh GCC 14 release build passed `make tests -j2`: all nine API/CLI groups.
Existing CLI fixtures were linked into the out-of-tree `tests/data` directory.
- Static staging with engine digest validation, JavaScript/Python syntax checks,
shell syntax and `git diff --check` passed.
49 changes: 32 additions & 17 deletions gui/docs/step3-frontend-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,26 @@ the group website. Footer and table notes use the available width, wrapping only
when the viewport requires it.

```text
Group logo IntaRNA / RNA–RNA interaction analysis University logo
Group logo IntaRNA package / RNA–RNA interaction analysis University logo
RNA–RNA interactions Computations stay on your device
Task: Prediction / Evaluation Load example
[ Sequence input | Query | Target | Seed | Helix | SHAPE | Energy | Output | General ]
Task: Prediction / Evaluation
[ Sequences | Seed | Output | Model & Energy | Query | Target | CLI-only ]
[ Active panel: e.g. query + target, start indices, evaluation structures ]
Reset parameters Compute
Interactions / search / show-hide columns / CSV + ZIP download
Compute Input Parameters: Examples / Store / Load / Reset
Results / Show-Hide / name / ZIP download / delete
Interactions / search / show-hide columns / CSV download
Selected interaction / embedded vaRRI
Additional output files / diagnostics / compiled versions
```

Every CLI group has a tab with one visible panel. Sequence input is selected
Every CLI group has a tab with one visible panel. Sequences is selected
initially. Tabs expose `aria-selected`, `aria-controls` and roving focus; Left/Right
move between available tabs, and Home/End select the first/last. Tab names wrap
on narrow screens. Prediction-only tabs and controls are disabled/hidden during
evaluation; if the selected tab becomes unavailable, Sequence input is selected.
Changing task resets parameters to their CLI defaults while preserving sequence text; Load example also restores the
complementary pair. The native default output count is one; browser users can
request 0–100 interactions per pair. Zero enables accessibility-only output.
evaluation; if the selected tab becomes unavailable, Sequences is selected.
Changing task resets parameters to their task defaults while preserving sequence text; Load example also restores the
complementary pair. The browser defaults to 10 interactions per pair (the native default remains
one), and accepts 0–100. Zero enables accessibility-only output.

## Inputs, defaults and validation

Expand All @@ -53,15 +54,29 @@ CSV uses a fixed semicolon delimiter.
Process settings (threads, file/log paths, parameter files, help/version commands)
are replaced by the worker lifecycle, local data inputs, downloads and displayed
compiled versions. The base-pair maximization energy model is intentionally
excluded. The helix-block interaction model B is supported.
excluded. The helix-block interaction model B is supported, with helix controls at the end
of Model & Energy, enabled only for model B. Seed constraint offers Disable,
Explicit seed and Identify seeds, enabling only the relevant controls. Query and
Target include their own accessibility/SHAPE columns and synchronized copies of
the two shared accessibility flags. Ignore disables accessibility controls;
import modes disable window/span and enable the data input. Disabled settings
remain editable when re-enabled but do not enter the request. Explicit row grids
align inputs even when their labels wrap.

Prediction accepts plain sequence or up to 20 FASTA records per strand.
CSV columns are grouped as Energy, Output, Sequence, Interaction and Partition
Function, with per-group selection actions and name-only labels with description
tooltips. Prediction adds ED1, ED2, seedE, seedStart1 and seedStart2 to the native
CSV columns; evaluation selects all energy outputs. JSON records these browser
defaults explicitly so native replay retains the same output.

Prediction accepts plain sequence or up to 50 FASTA records per strand.
Evaluation requires one query and target and 1–100 predefined structures.
Wrapped/lowercase sequence text and DNA T normalize to uppercase RNA U. A/C/G/U/N
are accepted. Each record is 2–2,000 nt; seed predictions additionally require
are accepted. Each record is 2–5,000 nt; seed predictions additionally require
at least `seedBP` nucleotides. FASTA IDs end at the first whitespace, matching the CLI. Duplicate IDs (including collisions after
native CSV semicolon replacement) are rejected. The total selected all-vs-all
query length × target length, or sum of pairwise products, is capped at 1,000,000.
native CSV semicolon replacement) are rejected. Ignored header descriptions are reported below the input. The longest selected
query length × longest selected target length is capped at 1,000,000, including
pairwise mode; the cap is not summed over records.
The per-strand start index applies to all records and defaults to one. Negative
indices skip zero, matching `RnaSequence`; output coordinates remain inclusive.

Expand All @@ -78,7 +93,7 @@ accessibility text can be pasted or loaded from a local file (up to 1 MB). Data
are written to fixed MEMFS paths, never used as user-provided CLI arguments.
Native diagnostics remain available for model-specific failures.

Inputs/results clear on edits; the form disables during execution. Abort and
Escape terminate the worker during startup or C++ execution. Status, errors,
Edits update the form while completed sessions retain their inputs and results;
the form disables during execution. Abort and Escape terminate the worker during startup or C++ execution. Status, errors,
empty output and diagnostic text have dedicated regions. Keyboard focus,
reduced motion and mobile overflow are covered by real browser tests.
Loading
Loading