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
24 changes: 24 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

## 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)

Expand Down Expand Up @@ -282,6 +285,27 @@ 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,
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
seeding of interaction sites**

Predict short RNA pairs or evaluate supplied structures locally with the [browser interface](https://backofenlab.github.io/IntaRNA/gui/).
Computed runs stay in separate, foldable sessions in the current tab. Name and select sessions to restore their inputs and compare results; editing or resetting parameters keeps earlier runs.
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
176 changes: 133 additions & 43 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])];
}
46 changes: 38 additions & 8 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 Down Expand Up @@ -35,11 +36,11 @@ 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. Use **Show results** (or **Restore
inputs** after editing), or select its output area, to restore that session’s
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 results** folds the output. Each session
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.

Expand All @@ -60,8 +61,14 @@ JSON explicitly records that version information is unavailable.
## Reset and examples

Reset clears the editable sequences, interactions and uploaded files and restores
prediction defaults. Previously computed sessions remain available. Empty FASTA
fields show the short demonstration sequences as placeholders only. The Example disclosure menu sits to the left of Reset.
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 @@ -73,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 Down Expand Up @@ -117,3 +128,22 @@ pending file read, so delayed reads cannot replace newer input.
`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.
45 changes: 30 additions & 15 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 Down
11 changes: 8 additions & 3 deletions gui/examples/evaluation.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@
"schema": "IntaRNA-parameters-v1",
"parameters": {
"personality": "IntaRNAeval",
"query": {"text": ">query\nGGGAGGAGGG\n"},
"target": {"text": ">target\nCCCUCCUCCC\n"},
"rri": "1||||||||||&1||||||||||"
"query": {
"text": ">query\nGGGAGGAGGG\n"
},
"target": {
"text": ">target\nCCCUCCUCCC\n"
},
"rri": "1||||||||||&1||||||||||",
"outCsvCols": "id1,start1,end1,id2,start2,end2,subseqDP,hybridDP,E,Etotal,ED1,ED2,E_init,E_loops,E_dangleL,E_dangleR,E_endL,E_endR,E_hybrid,E_norm,E_hybridNorm,E_add,Eall,Eall1,Eall2,EallTotal,seedE,seedED1,seedED2"
}
}
}
10 changes: 8 additions & 2 deletions gui/examples/prediction.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@
"configuration": {
"schema": "IntaRNA-parameters-v1",
"parameters": {
"query": {"text": ">query\nGGGAGGAGGG\n"},
"target": {"text": ">target\nCCCUCCUCCC\n"}
"query": {
"text": ">query\nGGGAGGAGGG\n"
},
"target": {
"text": ">target\nCCCUCCUCCC\n"
},
"outNumber": 10,
"outCsvCols": "id1,start1,end1,id2,start2,end2,subseqDP,hybridDP,E,ED1,ED2,seedE,seedStart1,seedStart2"
}
}
}
Loading
Loading