The repository or configuration that created this release differ from a previous release. View details.
draw_rna
Generate quick secondary structures of nucleic acids via jupyter notebook or command line.
Dependencies
The default behavior is to output the secondary structure visualization to both svg and png. The png requires Inkscape, whose directory must be set by environmental variable INKSCAPEDIR.
Install
draw_rna is available on PyPI.
pip install draw_rna
Alternatively, clone the Github repository to your hard drive as follows:
git clone git@github.com:eternagame/draw_rna.git
Warning if you see errors in using the repository, it may be due to your draw_rna directory sitting in a folder like src/ which already is in your Python Path. in that case, rename draw_rna to draw_rna_directory and/or move it to another spot in your system.
Basic Usage
Jupyter notebook
See example_files/demo.ipynb for more. In brief:
from draw_rna.ipynb_draw import draw_struct
draw_struct('GGGGAAAACCCC', '((((....))))')
Input file
An input file is used to specify the sequence, secondary structure, and coloring of the desired drawing. The format is as follows
filename # image will be written to filename.svg
GTGANNNNNTCAC # nucleic acid sequence
((((.....)))) # nucleic acid secondary structure in dot-bracket notation
rrrrbbbbbgggg # optional: coloring of each base (e.g. r for red, g for green, b for blue)
Multiple sequences can be specified in one file as in example_input.txt.
Execution
The draw script can be run with
python src/draw_rna/draw_all.py example_files/command_line/example_input.txt
You'll get files example_contours.svg, example_sequence_colors.svg, example_specific_colors.svg. Example output available in example_files/command_line/.
Sample secondary structure diagrams:
Notes on usage
Multistrand drawing
At the moment, current practice is to include blanks between strands such as:
filename
GTGANN NNTCAC
((((.....))))
rrrrbbwbbgggg
And then remove nucleotides corresponding to blanks afterwards. (This would be a quick fix.)
Extended options
Draw a large thing with linear exterior loop and with a custom color vector:
python draw_all.py covid19_5primeUTR.txt --large_mode --color_values perc_conserved_5UTR.txt --png
If you use --color_values with an input file with multiple structures, the same colors will be applied to all the structures.
Draw from RDAT file containing reactivity
Requires RDATkit to be in working python path. Example command:
python src/draw_rna/draw_from_rdat.py ETERNA_R69_0000.rdat 297 --png
Movie mode
More coming eventually. For now, if you generate a bunch of stills, say from a cotranscriptional simulation, can string them together with ImageMagick:
convert -delay 25 my_stills_*.png my_great_trajectory.gif
Metadata
Release files for draw-rna 0.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Change of provenance
The repository or configuration that created these release files differ from that of a previous release.
We recommend inspecting the repository and configuration before proceeding. View details.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| draw_rna-0.4.3.tar.gz | 15.2 kB | With provenance | Details for draw_rna-0.4.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| draw_rna-0.4.3-py3-none-any.whl | Python 3 | none | any | Details for draw_rna-0.4.3-py3-none-any.whl |
Total release size: 31.5 kB
Release files / draw_rna-0.4.3.tar.gz
Change of provenance
This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.
We recommend inspecting the repository and configuration before proceeding. View details.
| Download URL | draw_rna-0.4.3.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fccadcc1d98ad71db1410cc0e5bc23f435a923ababc826cfaa482e63e814eded
|
|
BLAKE2b-256 checksum How to use checksums |
9acf0e8448cd2aff50c2ee181582b23652ea5631378fc1f88f10661704c8dc17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 24, 2025.
Transparency logRelease files / draw_rna-0.4.3-py3-none-any.whl
Change of provenance
This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.
We recommend inspecting the repository and configuration before proceeding. View details.
| Download URL | draw_rna-0.4.3-py3-none-any.whl |
|---|---|
| Size | 16.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1eb7d31ffab85cad0c23d08ed43995dddcd8f307ab90265b0e9e7c8e0c7b1c97
|
|
BLAKE2b-256 checksum How to use checksums |
dfde0426ca34925fb4daeaa7ff89ceb16b62ee5fb582f687b9ee52b1d93b9d24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 24, 2025.
Transparency logSecurity for draw-rna 0.4.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Change of provenance
The repository and configuration that created this release differ from a previous release.
While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.
Repository
- Removed 0.4.2 github.com/DasLab/draw_rna
- Added 0.4.3 github.com/eternagame/draw_rna
Attestation for draw_rna-0.4.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 24, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.