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?
1 Answer
... . 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 (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 may be of benefit,