Skip to main content

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

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

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-1.0.0.tar.gz (234.2 kB view details)

Uploaded Source

Built Distribution

st_forna_component-1.0.0-py3-none-any.whl (236.7 kB view details)

Uploaded Python 3

File details

Details for the file st_forna_component-1.0.0.tar.gz.

File metadata

  • Download URL: st_forna_component-1.0.0.tar.gz
  • Upload date:
  • Size: 234.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for st_forna_component-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3667a05d46063e7edcaf99ed65b9545a2162335275232fc9967f8459daa09fa3
MD5 f349bf623d213f17b74650c1773d3680
BLAKE2b-256 a84703e465cba69aa6f5b535bb6bae13b2c7a300cda53eb7cc858ab87bad9556

See more details on using hashes here.

File details

Details for the file st_forna_component-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for st_forna_component-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 259fae80a492a3bf92a2d504939621805c999ed8cda0fa0cb27c561b0638e1a7
MD5 99ed1d96613b81a0147bb4001a93a60f
BLAKE2b-256 a9ff963ebc76d36c9babc5eaba5dd3713a15de9ced6d36d8996defee6d60709d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page