Skip to main content

DNA, RNA, and protein sequence viewer

Project description

Streamlit SeqViz

Streamlit SeqViz 🧬 brings the powerful SeqViz DNA/RNA/protein viewer to Streamlit. It allows you to visualize and explore biological sequences interactively inside your Streamlit apps with support for annotations, primers, restriction sites, translations, and more.

Demo

Open in Streamlit

SeqViz demo

Installation

pip install st-seqviz

Usage

import streamlit as st

from st_seqviz import SeqViz

sv = SeqViz(
    seq="TTGACGGCTAGCTCAGTCCTAGGTACAGTGCTAGC",
    name="J23100",
    annotations=[
        {"name": "promoter", "start": 0, "end": 34, "direction": 1, "color": "blue"}
    ],
)

st.json(sv)

➡️ See the /demo folder for more complex examples (annotations, enzymes, translations, highlights, etc.).

API Reference

Parameters

Name Type Default Description
seq str DNA, RNA, or amino acid sequence to render.
viewer "linear", "circular", "both", "both_flip" "both" Viewer layout and orientation.
name str "" Name of the sequence or plasmid.
annotations list[dict] [] Sequence annotations (start, end, name, direction).
primers list[dict] [] Primer regions (same structure as annotations).
translations list[dict] [] Sequence ranges to translate and display as amino acids.
enzymes list[str | dict] [] Restriction enzymes or custom recognition sites.
highlights list[dict] [] Sequence ranges to visually highlight.
zoom_linear int 50 Linear viewer zoom level (0–100).
colors list [] Custom color palette.
bp_colors dict {} Map of base pairs (A/T/G/C or index) to colors.
style dict {"height": "70vh", "width": "100%"} Custom CSS sizing and layout.
search dict {} Predefined search query.
show_complement bool True Display complement strand.
rotate_on_scroll bool True Enable circular rotation on scroll.
disable_external_fonts bool False Disable loading of external fonts.
show_index bool True Show sequence index ticks.
key str or None None Unique Streamlit key.

Returns

A dict containing:

  • selection: the current selected sequence region (if any)
  • search: the current search matches and metadata

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_seqviz-0.1.3.tar.gz (155.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

st_seqviz-0.1.3-py3-none-any.whl (156.0 kB view details)

Uploaded Python 3

File details

Details for the file st_seqviz-0.1.3.tar.gz.

File metadata

  • Download URL: st_seqviz-0.1.3.tar.gz
  • Upload date:
  • Size: 155.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for st_seqviz-0.1.3.tar.gz
Algorithm Hash digest
SHA256 0f22ecc4669cb6c9422ee4be33ffe0bc1a0b6ac2a72b8e35c263b0012a488344
MD5 9047ac121d50a9eb846fdf7529d9135a
BLAKE2b-256 bda5a51c60ba24492002c28fde588919a9de02b90a2c5a89a52c87bdd84f415c

See more details on using hashes here.

File details

Details for the file st_seqviz-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: st_seqviz-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 156.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for st_seqviz-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 91b07b8b584a6fe6d4ea8a0570649506cb94d8eeca874fe5563fcbc38f1a10a9
MD5 170d0795b324be4ff153ce12fdfd0208
BLAKE2b-256 b1773c62ea443b7161681bcfab3bce8ca300bbf644ce42e9aec480bb0bb8745d

See more details on using hashes here.

Supported by

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