RNAkit Studio is a static, GitHub Pages-ready browser workbench for RiboFlare RNA folding, ensemble analysis, structure evaluation, local-window exploration, and synonymous or segmented RNA design. Calculation stays in the browser.
Version 0.10 replaces the former linked thermodynamic dependency with an independently written Turner 2004 backend built directly into the shipped WebAssembly modules.
- exact pseudoknot-free MFE dynamic programming;
- exact partition function, sparse base-pair probabilities, centroid, MEA, ensemble diversity, and seeded stochastic traceback;
- RiboFlare
beam,beam-fast, limited-span, andspan-shiftMFE engines; - temperature and monovalent-salt adjustment;
- dangles 0, 1, 2, and 3 for exact MFE and fixed-structure evaluation;
- GU, lonely-pair, GU-closure, special-hairpin, and maximum-span switches;
- hard dot-bracket constraints and SHAPE pseudo-energies for exact folds;
- side-by-side runs of all five engines;
- MFE, centroid, MEA, BPP-consensus, and sampled-structure selectors.
- Apache-2.0 NAView geometry;
- deterministic Forna-style force refinement;
- an independent loop-tree layout;
- live layout controls for nucleotide spacing, helix factor, loop radius, pair distance, repulsion, collision radius, link strength, iteration count, seed, node scale, and label cadence;
- zoom, pan, reset, fit, base identities, pairing links, probability arcs, and reactivity coloring;
- SVG, JSON, dot-bracket, CT, BPP CSV, and design-portfolio export.
- protein-to-synonymous-mRNA design using any of the five folding oracles;
- fast, balanced, and thorough deterministic search portfolios;
- explicit population, retention, round, sweep, seed, and parallel-oracle budgets;
- top-k and observed Pareto-front output with a minimum Hamming distance;
- custom codon-frequency tables;
- an interactive segmented-construct canvas—no JSON upload required;
- fixed RNA, free RNA with a selectable alphabet, and coding/AA-constrained blocks;
- clickable named regions and single-region pairedness or cross-region binding objectives;
- a translated FLAG-tagged helical peptide as the default nontrivial target.
- scalar and SIMD single-thread WebAssembly variants;
- a fixed-memory SIMD+pthreads design variant;
- automatic scalar fallback for browsers without WebAssembly SIMD;
- longest-first scheduling across isolated Web Workers for batch records;
- ordered reconstruction of batch output;
- responsive UI because native calls never run on the main thread.
The backend implements the Turner 2004 nearest-neighbour feature model for one linear strand and planar secondary structures. Exact MFE, evaluation, partition/BPP, centroid, MEA, diversity, stochastic traceback, dangle modes, approximate engines, and design paths are covered by native-vs-WASM tests.
Deliberate current boundaries:
- cofold/multi-strand, pseudoknots, and G-quadruplex energy terms are not implemented or exposed;
- exact ensembles accept dangles 0 or 2, matching the recurrence implemented;
- approximate engines are MFE-only and use dangles 0/2 without hard or SHAPE constraints;
- “circular” is explicitly labeled experimental: it searches 32 linearized cuts, maps planar candidates back, and re-scores them; it is not a circular partition function;
- local BPP and accessibility are overlapping exact-window estimates rather than a specialized outside recurrence;
- local MFE output contains one fold per window rather than a deduplicated motif set.
These boundaries are enforced instead of silently returning unsupported results.
The yeast tRNA-Phe sequence used during development is:
GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUCUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCACCA
The independent native build and the SIMD WebAssembly build both return:
(((((((..((((........)))).(((((.......))))).....(((((.......))))))))))))....
-22.4 kcal/mol
The original pre-WASM RiboFlare executable returns the same default structure
and energy. All four approximate engines also reproduce their original
structure/energy results for this record. Exact ensemble free energy agrees to
about 1e-8 kcal/mol in the differential fixture.
One useful edge case is dangles=3: both builds choose the same tRNA structure;
the independent fixed-structure evaluator reports -23.4, which also matches
the original evaluator, while the original folding command reports -23.2 for
that same structure. The test suite records this original fold/eval
inconsistency rather than copying it into the new evaluator.
native/riboflare/PARAMETER_SOURCES.md maps every generated array to NNDB
tables and primary publications. scripts/generate-turner2004.mjs converts
the published numeric values from a sectioned parameter interchange format
into a compact C++ header; it contains no folding algorithm. Temperature
interpolation, salt equations, and SHAPE pseudo-energies are independently
implemented from the cited papers.
The WebAssembly link line contains only these five RiboFlare sources:
src/core.cpp
src/beam_mfe.cpp
src/design.cpp
src/cli.cpp
src/thermo/backend.cpp
See LICENSES.md and public/licenses/THIRD_PARTY.md for the distribution
inventory.
Requirements:
- Node.js 20 or newer;
- npm;
- Emscripten 4.x (
em++onPATH, orRIBO_EMSDK_ROOTpointing to an active emsdk checkout); - a C++20 compiler for optional native differential tests.
npm ci
RIBO_EMSDK_ROOT=/path/to/emsdk npm run build:wasm
npm run buildThe three modules are emitted to public/wasm and copied by Vite to
dist/wasm:
| Module | Purpose | Memory |
|---|---|---|
riboflare-baseline |
scalar compatibility fallback | growable from 64 MiB |
riboflare-native |
default SIMD worker module | growable from 64 MiB |
riboflare-threaded |
SIMD+pthreads design portfolio | fixed 256 MiB |
The threaded fixed heap avoids Emscripten's slow pthread memory-growth path.
npm testThe release gate covers:
- TypeScript and component unit tests;
- all three RNA layout algorithms and tunable geometry;
- rendered visualization fixtures for tRNA and the construct editor;
- exact, approximate, ensemble, constraints, evaluation, and long-sequence WASM regressions;
- worker and batch integration;
- native/WASM result parity;
- serial/threaded deterministic design parity;
- production build validation, WebAssembly validation, relative GitHub Pages paths, required license notices, and a size ceiling.
To package the full source plus tested dist site:
npm run packageThe dist directory is self-contained and uses relative asset URLs so it works
under a project subpath. .nojekyll is included. coi-serviceworker performs a
one-time reload on a secure origin to establish cross-origin isolation for the
pthread module; ordinary worker-pool folding does not depend on shared memory.
No server, API key, database, or remote compute service is required.