A Streamlit component for the Forna RNA visualization tool
Project description
Forna Component
RNA Secondary Structure Visualization Using a Force Directed Graph Layout
This is a simple component that renders a forna diagram. It is a wrapper around the forna container.
Installation
pip install st_forna_component
Example
Look at the example for a simple example:
Usage
import streamlit as st
from st_forna_component import forna_component
return_value = forna_component(
structure = '((((....))))', # RNA structure
sequence = 'AAAAUUCGUUUU', # RNA sequence
height = 400, # height of the component
animation = animation, # boolean to enable animation/interactivity
zoomable = zoomable, # boolean to enable zooming
label_interval = label_interval, # interval for numbering the nucleotides
node_label = node_label, # boolean to enable node labeling
editable = editable, # boolean to enable editing
color_scheme = color_scheme, # color scheme for the nucleotides: options are 'structure', 'sequence', 'positions', 'custom'
colors = colors, # custom colors for the nucleotides: string with space separated index:color pairs
)
st.write("Received value:", return_value)
# Returns None if no changes were made.
# When clicked on the component, it returns the current structure and sequence
# In case of cofold, it return a unique string without the separator '&'
How to cite:
Please include this citation if the Forna Component is used in an academic study:
Lucandia. Lucandia/st_forna_component; Zenodo, 2024. https://zenodo.org/doi/10.5281/zenodo.11181680.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
st_forna_component-0.0.3.tar.gz
(232.5 kB
view details)
Built Distribution
File details
Details for the file st_forna_component-0.0.3.tar.gz
.
File metadata
- Download URL: st_forna_component-0.0.3.tar.gz
- Upload date:
- Size: 232.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f3dbd48a905525b9a61f43702da6e49e94749c243890bdb0d1726bab7fb1929 |
|
MD5 | 08fd2b95f9665ee6239d0c693fbe8f55 |
|
BLAKE2b-256 | 3d2fb15d930a146c2837be6b2911ffe25cb99374e64a9c5f9ff080ba589fe9f2 |
File details
Details for the file st_forna_component-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: st_forna_component-0.0.3-py3-none-any.whl
- Upload date:
- Size: 235.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 828e56c950c96e70f7c504bf6c5f3767e214d8a8ea00f49198475e0b615a8f1c |
|
MD5 | 0a594a5814cbb45b538b46384913aa1c |
|
BLAKE2b-256 | de28b4d764b9c4d2534d6c546a22206f8b6c417db1154e58381fdb9782211f54 |