Skip to main content

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

Alt Text

Look at the example for a simple example:

Streamlit App

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.

DOI

License

Code is licensed under the GNU General Public License v3.0 (GPL-3.0)

License: GPL-3.0

Release files for st-forna-component 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for st-forna-component 1.0.1
File Size Uploaded
st_forna_component-1.0.1.tar.gz 246.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for st-forna-component 1.0.1
File Interpreter ABI Platform
st_forna_component-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 495.7 kB

Release files / st_forna_component-1.0.1.tar.gz

Download URL st_forna_component-1.0.1.tar.gz
Size 246.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9e19b2c9e90af79cdda168346f79fd3fa98f9f6411eb3c0180b7b14067d054c8
BLAKE2b-256 checksum
How to use checksums
c0a37589a7ead73f781c4c51c02492c702ccee206aa0f218850ca9f2e3ece4a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release files / st_forna_component-1.0.1-py3-none-any.whl

Download URL st_forna_component-1.0.1-py3-none-any.whl
Size 248.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77b88c745b2011e91a9748438b7afb08d4f1eb5e3250068d6bc8eb0dfef803da
BLAKE2b-256 checksum
How to use checksums
9b15a6ab140b7d13940b7993a37ea70d9a916b5fdf1622ad54c7cb353bef33f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page