<p>... . I know both aspects of this question and I'm not aware of an interactive Python package using e.g. iPython magic commands that will do this. The thing you could try is  <code>draw_RNA</code> <a href="https://github.com/DasLab/draw_rna" rel="nofollow noreferrer">https://github.com/DasLab/draw_rna</a></p>
<p><code>draw_RNA</code> will operate on Jupyter, but I've not tried it.</p>
<p>A very, very good package is <a href="https://varna.lri.fr" rel="nofollow noreferrer">VARNA</a> (its Java BTW). The <code>VARNA</code> group make further recommendations from there for complex structures. I would vouch for this package for complex structures.</p>
<p>A good approach is to output in Stockholm 1.0 format. It then just drops and drags into <code>VARNA</code>. <code>Dot-bracket</code> format also works and I would assume <code>ct</code> format works too.</p>
<p>A good reason why in-line graph imaging isn't the best solution for complex structures, i.e. the in-line graphs in a Python debugger or Jupiter is complex RNA structures need to be interactive because you need to move them: they &quot;clump&quot; together and have to manually separate them.</p>
<p>As a final note <a href="http://rna.tbi.univie.ac.at/forna/" rel="nofollow noreferrer">Forna</a> may be of benefit,</p>

CC BY-SA 4.0
2022-09-22T18:27:31.393Z
2022-09-23T10:52:48.613Z
2022-09-23T10:52:48.613Z
M__
<p>I would like to visualize the secondary structure of co-folded RNA strands in Python, preferably in a Jupyter notebook.
What are the recommended tools? Can anyone provide an example?</p>

<python><visualization><rna><secondary-structure><jupyter>
Visualize RNA co-folded secondary structure with Python
# Visualize RNA co-folded secondary structure with Python

(Asked by: username_0 on 2022-09-22)

I would like to visualize the secondary structure of co-folded RNA strands in Python, preferably in a Jupyter notebook.
What are the recommended tools? Can anyone provide an example?

**Tags:** python, visualization, rna, secondary-structure, jupyter

---

## 1 answers

### Answer by username_1 on 2022-09-22. Score: 1

... . I know both aspects of this question and I'm not aware of an interactive Python package using e.g. iPython magic commands that will do this. The thing you could try is `draw_RNA` <https://github.com/DasLab/draw_rna>

`draw_RNA` will operate on Jupyter, but I've not tried it.

A very, very good package is [VARNA](https://varna.lri.fr) (its Java BTW). The `VARNA` group make further recommendations from there for complex structures. I would vouch for this package for complex structures.

A good approach is to output in Stockholm 1.0 format. It then just drops and drags into `VARNA`. `Dot-bracket` format also works and I would assume `ct` format works too.

A good reason why in-line graph imaging isn't the best solution for complex structures, i.e. the in-line graphs in a Python debugger or Jupiter is complex RNA structures need to be interactive because you need to move them: they "clump" together and have to manually separate them.

As a final note [Forna](http://rna.tbi.univie.ac.at/forna/) may be of benefit,


---

