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

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 '&'

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

Uploaded Source

Built Distribution

st_forna_component-0.0.1-py3-none-any.whl (160.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: st_forna_component-0.0.1.tar.gz
  • Upload date:
  • Size: 159.0 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-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ba39c256320092db1384e667d895b76e9411c8dae664dffa5b595543ab79e47d
MD5 3e69c8a2ce47cd6bcbb02355910f04a0
BLAKE2b-256 ebacb429616fc2af96183b7d0df1dcab16a7ee6de166da587ecf18482bd1b35f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for st_forna_component-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 695fb97799149649f260314213ad62d7bf2fdf6c13f7cce56160bae73f96a139
MD5 5f2011e561a09661372c695aa7e314d7
BLAKE2b-256 0e4c73c120067705cb783cad6803dea11bc5ed18916ed794bf0c59e6e99e005b

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