Skip to main content

TFBPShiny

A Shiny web application for exploring transcription factor binding and perturbation data from the Brent Lab yeast collection.

Table of contents


Resource Requirements

This app requires the following minimum resources to run:

  • 4GB storage on disk
  • 8GB RAM (10GB or more is recommended for better performance)

Quick start

If you wish to keep the app separated from your local environment, you should first create a virtual environment. You can do this with venv. cd to the directory where you want the virtual environment to be created, and run:

python -m venv tfbpshiny_env
source tfbpshiny_env/bin/activate

Install

python -m pip install tfbpshiny

Build the database, then run the app

The app reads a single pre-built DuckDB file. Build it once (this pulls every dataset from HuggingFace and runs the cross-dataset analyses; about twenty minutes), then launch. The collection config ships inside the installed package:

CONFIG=$(python -c "import pathlib, tfbpshiny; print(pathlib.Path(tfbpshiny.__file__).parent / 'brentlab_yeast_collection.yaml')")
python -m tfbpshiny materialize --config "$CONFIG" --output brentlab_yeast.duckdb
python -m tfbpshiny launch --db-path brentlab_yeast.duckdb

Re-run materialize whenever the upstream datasets change. See docs/development.md for what the build produces.

To install the latest development version from GitHub, use:

python -m pip install git+https://github.com/BrentLab/tfbpshiny@dev

For shinyapps.io / Posit Connect deployment instructions, see docs/development.md.


Contributing

Setup

git clone https://github.com/BrentLab/tfbpshiny.git
cd tfbpshiny
poetry install
pre-commit install
# First-time Playwright setup (required for E2E tests)
poetry run playwright install chromium

Plotly JS bundle

The app loads Plotly from a local bundle (tfbpshiny/www/plotly-3.5.0.min.js) rather than a CDN to avoid race conditions when multiple outputs initialize simultaneously. This file is gitignored due to its size (~4.8 MB). After cloning, download it once:

curl -fsSL https://cdn.plot.ly/plotly-3.5.0.min.js \
    -o tfbpshiny/www/plotly-3.5.0.min.js

If the plotly Python package is upgraded, check the new JS version it expects:

python -c "
import re, plotly.graph_objects as go
from plotly.io import to_html
m = re.search(r'plotly-([\d.]+)\.min\.js', to_html(go.Figure(), include_plotlyjs='cdn'))
print(m.group(0))
"

Then download the matching version and update the src in tfbpshiny/app.py.

Environment variables

HF_TOKEN is read by materialize (or pass --token) and is only needed for private HuggingFace datasets. HF_HOME controls where the downloads are cached. The app itself reads TFBPSHINY_DB_PATH, which launch --db-path sets for you.

Running the app

poetry run python -m tfbpshiny materialize \
    --config tfbpshiny/brentlab_yeast_collection.yaml \
    --output tfbpshiny/brentlab_yeast.duckdb   # once; the launch default path
poetry run python -m tfbpshiny --log-level DEBUG launch \
    --port 8010 --host 127.0.0.1 --debug

Running tests

poetry run pytest tests/unit/      # unit tests
poetry run pytest tests/e2e/       # end-to-end
poetry run pytest                   # all tests

Code quality

pre-commit run --all-files

Branching

  1. Switch to dev: git switch dev
  2. Branch from dev — not main: git switch -c my-feature
  3. Keep branches small and focused to make review easier
  4. Rebase onto dev periodically: git rebase dev
  5. When ready, open a pull request targeting the BrentLab dev branch — not main

Further documentation

Metadata

Release files for tfbpshiny 1.2.0

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

Source distribution (sdist)

Source distribution for tfbpshiny 1.2.0
File Size Uploaded
tfbpshiny-1.2.0.tar.gz 411.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tfbpshiny 1.2.0
File Interpreter ABI Platform
tfbpshiny-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 867.5 kB

Release files / tfbpshiny-1.2.0.tar.gz

Download URL tfbpshiny-1.2.0.tar.gz
Size 411.6 kB
Tags Source
SHA-256 checksum
How to use checksums
125eadf0f0d0f29119e69f75bca3626a0cc9a4bc7805e85b2bb5837efa3380c9
BLAKE2b-256 checksum
How to use checksums
747783a8c85ee90ef9d101b76a32ef4af7123818be9f411b1cfb74f89e6cc8ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / tfbpshiny-1.2.0-py3-none-any.whl

Download URL tfbpshiny-1.2.0-py3-none-any.whl
Size 455.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0d57dcb31ff56895c816713852a5511f92c099398c2dc1b5ce03246c70ad0dd
BLAKE2b-256 checksum
How to use checksums
2f502788ac010ed2ce6c2e468d1e58eabdea0cbf4b517899ebb15f5c96160a18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release history Release notifications | RSS feed

1.2.1

2 release files

This release

1.2.0 This release

2 release files

1.0.0

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