Three things we made along the way that future teams can use.
Teams must document their contribution and explain why their effort is a contribution to fellow iGEMers. There is no single definition of what a contribution should be. We invite teams to be creative and generous in the knowledge, data or tools they may provide to the community.
On this page Guide → RNA Vizualizer → Registry Parts → Engineering →
Our route to designing RNA switches, shared: a guide, a visualization tool and our parts.
While building CERNAL, we realized that what we learned could give future teams designing RNA switches a strong starting point. We compiled it into a guide to ViennaRNA and NUPACK that covers the basics and gets a reader to running code. We also share RNA Vizualizer, the tool we used to present our designs to both halves of the team: intuitive for our biologists, with everything our engineers needed. Finally, our own parts are in the iGEM Registry for future teams to build on.
RNA Folding from Scratch · a guide by the CERNAL team
A complete beginner's guide to folding RNA on a computer: from what a base pair is to designing a switch, with runnable code in both ViennaRNA and NUPACK.
ViennaRNA and NUPACK are the two standard programs for predicting how an RNA sequence folds, and nearly every RNA design project ends up asking them the same three questions: what shape does my sequence take, is this region open or buried, and will these two sequences stick to each other. The guide teaches how to ask those questions and how to read the answers, starting from the pairing rules and assuming no computational background.
It is deliberately practical. Every code block is given twice, once per tool, so the same idea can be seen in both. Four widgets run a small folding engine in the browser, so the central idea - that a sequence is a population of structures, not one - can be watched rather than taken on trust. And it is upfront about the limits: these tools predict secondary structure, not 3D shape, mostly miss pseudoknots, and are far better at comparing candidates than at absolute claims.
Why RNA folds, how to read dot-bracket notation, and what a free energy in kcal/mol means.
The difference between the single MFE structure and the whole ensemble, and why base-pair probabilities are the output to work from. Three live widgets.
Which tool to use for what, then installing ViennaRNA and NUPACK on macOS, Linux and Windows (through WSL).
Paste-and-run code, shown in both tools: a first fold, two-strand binding, accessibility of a region, and sequence design.
Nine mistakes that produce a wrong answer and no error message, and where to go next.
Read parts one and two in order: they carry the ideas everything else depends on, and the guide itself says that if you read only three chapters, they should be 4 to 6. Part three is a one-time setup. Parts four and five are reference: come back to the code when you need it, and read the list of silent mistakes in chapter 14 before trusting a result. The web version has the live widgets; the PDF is the same text for printing or reading offline.
RNA Vizualizer is an internal utility we built for our own work and are releasing because it was useful to us, and we believe it'll prove useful for others. It is not our Best Software entry. That is CERNAL itself, described on the Software page.
Our contribution to future iGEM teams is RNA Vizualizer: a tool for designing and inspecting RNA structures, released under the Apache-2.0 license. It does three things that an RNA circuit designer needs in one place: predict a secondary structure, quantify how strongly two strands bind, and edit a sequence and immediately see the consequence.
Every thermodynamic number it reports comes from the ViennaRNA package [1][2], so the predictions are the field's standard ones. What we built is the layer above: an interface in which the design question, does my trigger open my switch, and which nucleotides decide that?, is answered by looking, and a library that answers the same question inside a script.
Two ways in, one engine behind both. rnaviz serve opens the viewer in a browser;
from cernal_rnaviz import fold, cofold gives a pipeline the same folding code
with no server involved. A team that wants only the application never has to read the
library; a team that wants only the library never has to run the application.
| Item | Detail |
|---|---|
| What it is | Web application and Python library for RNA secondary structure and two-strand interaction analysis |
| Engine | ViennaRNA [1]; dimers via the heterodimer partition function [2] |
| Install | pip install cernal-rnaviz; no separate ViennaRNA build step |
| Interfaces | Browser app, Python API, command line, HTTP JSON API with an OpenAPI schema |
| License | Apache-2.0 (ViennaRNA is installed as a dependency, not redistributed) |
| Tests | 70 automated tests: folding, API contract, output parity, 18 browser tests |
| Platform | Python 3.10 and newer; runs locally, no account and no upload of sequences to a third party |
CERNAL designs RNA logic gates: a switch strand that stays closed until a trigger RNA appears. Whether a design works is decided by structure: whether the switch is locked when it should be, whether the trigger can open it, and whether the right nucleotides are exposed. During the design of our toehold switches [3], our CRISPR iSBH-sgRNA guide [4] and our other gates, we were asking that question many times a day.
Answering it with the tools we had meant moving between them. A folding server returned a picture of one strand. Checking the pair meant a second tool and a second format. Changing one nucleotide meant editing a text file, re-submitting, and comparing two static images by eye – and then losing track of which region of the sequence was the spacer and which was the toehold, because nothing carried that annotation from one fold to the next.
The loop itself was the bottleneck, not the prediction. So we built the loop: fold, look, select, mutate, refold, in one view, with the strand's regions named once and marked on every structure afterwards.
We make no claim to better thermodynamics. The predictions are ViennaRNA's, unchanged. The contribution is the workflow around them, and the fact that the same engine is importable.
Excellent RNA tools already exist, and we use them. They divide, roughly, into engines that compute and viewers that draw. The gap we found sits between the two: the designer's edit loop, and two-strand binding reported as a single number next to the drawing that explains it.
| Tool | What it does | What we still needed |
|---|---|---|
| ViennaRNA command line [1] | Folds, co-folds, computes partition functions. The engine we build on. | A picture to read, and an edit loop that does not go through files |
| forna [5] | Draws a given sequence and structure in the browser, interactively | Prediction from sequence, and the two-strand case |
| VARNA [6] | Draws and annotates given structures; several layouts; many export formats | Prediction from sequence, and refolding after an edit |
| NUPACK [7] | Equilibrium analysis and design of multi-strand complexes | A local, scriptable loop over many small edits |
One command installs everything, ViennaRNA included. It arrives as a pre-built wheel, so there is no compiler step and no separate installation. Python 3.10 or newer is the only requirement.
pip install cernal-rnaviz, or
pip install git+https://gitlab.igem.org/2026/software/tau-israel/rna-vizualizer.git for the
development version.
rnaviz serve, then open
http://localhost:8000. --port and --host change
where it listens.
rnaviz fold <sequence> prints the
structure and the energy; --json prints the full result for a script to read.
Installing the package into an empty environment and running rnaviz serve
reproduces the application exactly as shown in the figures below; the front end ships inside
the installed package, so no build step and no internet connection are needed to run it.
The window has two halves: the controls on the left, the structure on the right. The mode toggle at the top switches between folding one strand and analyzing a pair.
Paste a sequence and press Fold RNA. The diagram, the minimum free energy and the dot-bracket string appear together. Nucleotides are colored by base, the backbone runs 5′ to 3′, and dashed lines are base pairs.
A dot-bracket constraint of the same length as the sequence forces part of the fold:
. leaves a position free, x forces it unpaired, and
( with ) forces a pair. This answers the conditional
question: what does this strand look like if this helix is held open – which is how a
locked and an opened state can be compared directly.
Temperature is set in °C or K, whichever is more convenient; the two fields stay in step. Folding at the temperature of the intended host, rather than the 37 °C default, matters for any design that will not be used in a mammalian cell.
The ↓ SVG button saves the current diagram as a standalone
SVG: colors and fonts are written into the file, so it
opens correctly in a vector editor and can be relabeled for a poster or a paper
without being redrawn. Highlight bands and name tags are included; the selection
outline is not, since it is interface state rather than structure.
Nucleotides can be selected four ways: click one on the diagram, click a character in the sequence strip, drag a lasso across the canvas, or highlight text in the input box. All four drive the same selection, so the diagram and the sequence always agree about what is selected.
With a selection made, a small panel appears. Pressing A, C, G or U replaces every selected nucleotide and refolds immediately; typing a sequence overwrites the selected positions one by one. This is the loop the tool exists for: a point mutation and its structural consequence are one click apart.
A functional region is easy to lose in a structure diagram. Enter a name and a sub-sequence once and the tool finds it in every structure folded afterwards, drawing a colored band along the matching nucleotides, a name tag beside them, and a matching band in the sequence strip. The list is kept in the browser, so it is still there the next day.
In interaction mode, two strands are entered: switch and trigger, or lock and key. The tool folds the pair together and each strand on its own, and reports all four energies: ΔGcomplex = ΔGseq1 + ΔGseq2 + ΔGbinding. The binding term is the one that matters, and it is colored by sign: a negative value means the complex is favored over the two strands folded apart.
Computing all three folds is the point. A strand that is already heavily structured pays to open before it can bind, and that cost is invisible if only the complex is folded.
Ticking Compute base-pair probabilities runs the partition function as well as the minimum free energy fold. Two things then change: each base pair is drawn with an opacity equal to its probability in the ensemble, so a pair that is real but unlikely looks unlikely; and each nucleotide gains a ring colored by accessibility: the probability that it is unpaired. Green is exposed, red is buried.
For a switch, this is the readout that matters: the region a trigger must nucleate on has to be accessible in the closed state, and a glance at the rings says whether it is.
Everything the application does is available as a Python call. The folding layer imports nothing from the web layer, so adding this package to a pipeline does not drag a web server into it.
fold() and cofold() return objects, not text to be parsed:
structure, energies, per-nucleotide accessibility, the base pairs, and the 2D coordinates
of each nucleotide.
result.structure, result.mfe: dot-bracket and energypair.binding_energy: ΔGcomplex − ΔGseq1 −
ΔGseq2pair.inter_links: only the base pairs that cross between the strandsresult.accessibility: per-nucleotide probability of being unpairedresult.to_dict(): the same payload the browser receives, ready to write to a fileErrors are typed rather than printed: an invalid base raises an error carrying the position that caused it, so a sweep can report which candidate failed and where.
rnaviz fold and rnaviz cofold print a summary, or the full result
as JSON with --json. Both accept
--temperature, a dot-bracket constraint, and --probabilities to
include the partition function. This is the quickest way to put folding into a shell script
or a Makefile without writing Python.
The running server exposes POST /api/fold, POST /api/cofold and
GET /api/health, all speaking JSON, with
interactive documentation and a machine-readable
OpenAPI schema at /docs. A tool written in any
language can call it, and create_app() lets the
API be mounted inside a larger service or served without the
front end.
This is how CERNAL uses it. Our gate design code imports the folding layer directly and reads
binding_energy and accessibility for each candidate, while the same
numbers can be inspected by hand in the browser when a candidate behaves unexpectedly. One
engine, so the screen and the pipeline can never disagree.
We used the tool throughout the design of our gates: the toehold switches, the CRISPR iSBH-sgRNA guide [4], and the other gate architectures in the platform. It served as the inspection step: a candidate that a script had scored was opened in the viewer to see why it scored that way, which is how a wrong assumption gets caught before it reaches the bench.
The specific designs we inspected this way, and the design decisions that came out of it, are recorded on our Engineering and Results pages as those experiments conclude. This section describes the workflow, not the outcomes; no experimental validation of the tool's predictions is claimed here.
A tool is only a contribution if someone else can run it, trust it and change it. We tried to make all three true.
One install command, one command to start, and no account, no upload and no internet connection once installed. Sequences stay on the machine they were typed into, which matters for unpublished designs. It runs on Linux, macOS and Windows under Python 3.10 or newer.
The thermodynamics are ViennaRNA's, not ours. Around them we keep 70 automated tests: that folding reproduces known structures, that the API returns what it promises, that the output has not drifted from the version we validated, and 18 browser tests that drive the real interface and check that selecting, mutating, switching views and exporting still behave. They run on every change, on two Python versions.
The code is organized so that the parts a team is likely to replace are separable: the folding layer, the HTTP layer and the front end are distinct, and the dependency direction runs one way, from the web towards the science and never back. A new quantity (a different energy model, another ensemble measure) is added in the folding layer and reaches the interface through one serialization function. The repository carries a contributor guide that says where each kind of change belongs.
If your project involves a strand that must bind another strand (a toehold switch, an antisense regulator, a sensing guide RNA, a riboswitch) the question "does it bind, where, and how strongly" is the one you will ask most often. That question is what this tool answers in a few seconds, by hand or in a script.
We built the tool around our issues (visualizations and analysis), meaning it is limited to the following.
We have not yet measured how long a typical design sweep takes through the library, and the page gives no runtime figures for that reason. A measurement on our own candidate sets is planned.
The source, the installation instructions, the contributor guide and a worked example of calling the library from a pipeline are in the repository, under the Apache-2.0 license. ViennaRNA carries its own license terms and is installed as a dependency rather than redistributed.
We added our designs to the iGEM Registry: mCherry-responsive toehold switches tested in prokaryotes, AND-gate and antisense NOT-gate designs for E. coli, antisense NOT-gate switches for human cells, and single-guide RNA (sgRNA) switches tested in yeast.
The first family is five single-guide RNA (sgRNA) parts for Saccharomyces cerevisiae. Each carries a hygromycin-targeting spacer and a sequence that folds back on the guide. Three of the five designs build on Pelea et al. (2025) [4], and Closed C24 and Switch S24 are TAU-Israel original designs. The set follows the project's switch logic for a dCas9 transcriptional activator (CRISPRa, CRISPR activation): Closed 1 is designed to block the spacer, Closed C24 (its second generation) is designed to also block the scaffold, Open 1 is designed to fold without blocking and serves as the control, mCherry Switch 1 is designed to open when mCherry RNA is present, and Switch S24, its second generation, uses an anti-scaffold sequence designed to block both the spacer and the nexus area of the scaffold. Our design reasoning and build-and-test notes for Closed C24 are on its Registry page.
The second family is six toehold switches for Escherichia coli BL21, all TAU-Israel original designs. Each is designed to hold the ribosome binding site (RBS) in a hairpin until an mCherry mRNA trigger binds and opens it, and a constant linker after the switch allows a payload to be added downstream.
The third family is three AND-gate toehold switches for E. coli BL21. Each is designed with two hairpins, so that downstream translation starts only when both trigger RNAs are present. The fourth family is three antisense translational NOT gates for E. coli BL21: an engineered mRNA whose region around the RBS and start codon is designed to pair with a trigger RNA and stop translation. The fifth family is two antisense NOT-gate switches for human cells (Homo sapiens), our eukaryotic NOT gates. Each is an antisense element placed in the 5' UTR of a reporter gene: when the matching trigger RNA is present, it is designed to base-pair across the translation initiation region and block ribosome access to the start codon, so the reporter is off, and with no trigger translation proceeds and the reporter is on. We tested both switches in HEK293T cells, and the results are on the Results page.
| Part | Name | Length | Host | What it does |
|---|---|---|---|---|
BBa_26LK236E |
Self-folding closed sgRNA internal name: Closed 1 |
74 bp | S. cerevisiae | Hygromycin-targeting spacer with a self-folding sequence designed to block the spacer, so that the guide is designed to be non-functional (first generation). |
BBa_262Z5MP8 |
Self-folding sgRNA, 2nd
generation internal name: Closed C24 |
98 bp | S. cerevisiae | Second-generation closed guide with an anti-scaffold sequence that is designed to block both spacer and scaffold. |
BBa_267J7BC3 |
Self-folding sgRNA, spacer
available internal name: Open 1 |
74 bp | S. cerevisiae | Self-folding sequence designed to leave the spacer free; the control for Closed 1. |
BBa_26HH7DB5 |
Conditional self-folding
sgRNA internal name: mCherry Switch 1 |
74 bp | S. cerevisiae | Designed to block its spacer and to pair preferentially with mCherry transcripts, so that it opens in their presence. |
BBa_2683JEBZ |
Conditional self-folding sgRNA,
2nd generation internal name: Switch S24 |
178 bp | S. cerevisiae | Second generation of the sgRNA mCherry Switch, with a hygromycin-targeting spacer extended by a sequence designed to self-fold and block the spacer and the nexus area of the scaffold. |
BBa_2625BEP6 |
mCherry toehold switch, version 1 (1st gen) | 93 bp | E. coli BL21 | Toehold switch designed to hide the ribosome binding site (RBS) in a hairpin until the mCherry mRNA trigger binds and opens it; a constant linker allows a downstream payload to be added. |
BBa_26LFCHI9 |
mCherry toehold switch, version
2 (1st gen) internal name: R4-2 |
96 bp | E. coli BL21 | First-generation topology variant 2 of the mCherry toehold switch (BBa_2625BEP6). |
BBa_268CDWHF |
mCherry toehold switch, version
3 (1st gen) internal name: R4-3 |
97 bp | E. coli BL21 | First-generation topology variant 3 of the mCherry toehold switch (BBa_2625BEP6). |
BBa_26ETF8CK |
mCherry toehold switch, version
1 (2nd gen) internal name: R5-21 |
119 bp | E. coli BL21 | Second-generation counterpart of the mCherry toehold switch, topology variant 1. |
BBa_260SXTTA |
mCherry toehold switch, version
2 (2nd gen) internal name: R5-22 |
119 bp | E. coli BL21 | Second-generation counterpart of the mCherry toehold switch, topology variant 2. |
BBa_26H6ILKH |
mCherry toehold switch, version
3 (2nd gen) internal name: R5-23 |
110 bp | E. coli BL21 | Second-generation counterpart of the mCherry toehold switch, topology variant 3. |
BBa_26TFFS90 |
AND-gate toehold switch, variant 1 | 158 bp | E. coli BL21 | Dual-hairpin AND gate designed so that a main A' trigger binding section is revealed once a secondary B' trigger binds, so that downstream translation happens only when both triggers are present. |
BBa_26H4V1K8 |
AND-gate toehold switch, variant 2 | 158 bp | E. coli BL21 | Topology variant 2 of the AND-gate toehold switch (BBa_26TFFS90). |
BBa_26YX1Z3H |
AND-gate toehold switch, variant 3 | 158 bp | E. coli BL21 | Topology variant 3 of the AND-gate toehold switch (BBa_26TFFS90). |
BBa_269WD6UK |
Antisense translational NOT gate, variant 1 | 80 bp | E. coli BL21 | Engineered mRNA that is normally translated, with the region around the ribosome binding site (RBS) and start codon designed to be complementary to a trigger RNA, so that hybridization stops translation of the switch. |
BBa_26WLBPBL |
Antisense translational NOT gate, variant 2 | 130 bp | E. coli BL21 | Topology variant 2 of the antisense translational NOT gate (BBa_269WD6UK). |
BBa_26E5A6GQ |
Antisense translational NOT gate, variant 3 | 80 bp | E. coli BL21 | Topology variant 3 of the antisense translational NOT gate (BBa_269WD6UK). |
BBa_26TPH340 |
not_SELE-1 Switch | 50 bp | Homo sapiens (HEK293T) | Antisense element placed in the 5' UTR of a reporter gene: when the matching trigger RNA is present, it base-pairs across the translation initiation region and blocks ribosome access to the start codon, so the reporter is off. With no trigger, translation proceeds and the reporter is on. |
BBa_265OP0PA |
not_SELE-2 Switch | 70 bp | Homo sapiens (HEK293T) | Second antisense NOT-gate switch (BBa_26TPH340) with the same mechanism, placed in the 5' UTR of a reporter gene: the matching trigger RNA blocks ribosome access to the start codon, so the reporter is off; with no trigger the reporter is on. |