A shiny app which provides a dashboard to https://huggingface.co/collections/BrentLab/yeastresources
Project description
TFBPShiny
A Shiny web application for exploring transcription factor binding and perturbation data from the Brent Lab yeast collection.
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
Run the app:
This will download the necessary datasets from huggingface into a cache directory
that is created in your current working directory. By default, it is called
./tfbpshiny_hf_cache. When you run the app again, if you launch it from the same
location it will verify that the cache is up to date, and use it, without
re-downloading. You can also specify a custom cache directory with --cache-dir.
python -m tfbpshiny launch
To install the latest development version from GitHub, use:
python -m pip install git+https://github.com/BrentLab/tfbpshiny@dev
For production deployment (EC2/Docker) and shinyapps.io 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
Create a .env file in the repo root to override defaults:
# Optional — only needed for private HuggingFace datasets
HF_TOKEN=<your_huggingface_token>
# Optional — override the VirtualDB config path
VIRTUALDB_CONFIG=/path/to/custom_config.yaml
Running the app
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
- Switch to
dev:git switch dev - Branch from
dev— notmain:git switch -c my-feature - Keep branches small and focused to make review easier
- Rebase onto
devperiodically:git rebase dev - When ready, open a pull request targeting the BrentLab
devbranch — notmain
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tfbpshiny-1.0.0.tar.gz.
File metadata
- Download URL: tfbpshiny-1.0.0.tar.gz
- Upload date:
- Size: 341.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c426d9d78bf3f300d558ab9a9726473da0901f64c988e075255c3b566cf34667
|
|
| MD5 |
056c82709793f0cd3c6eb9ab00faaa6e
|
|
| BLAKE2b-256 |
f0d14524cc639582d13262a26033d7267a9d083e18d08c30f32913f713b526ff
|
Provenance
The following attestation bundles were made for tfbpshiny-1.0.0.tar.gz:
Publisher:
publish.yml on BrentLab/tfbpshiny
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tfbpshiny-1.0.0.tar.gz -
Subject digest:
c426d9d78bf3f300d558ab9a9726473da0901f64c988e075255c3b566cf34667 - Sigstore transparency entry: 1803897901
- Sigstore integration time:
-
Permalink:
BrentLab/tfbpshiny@9c2236ffa2064378346c12493f7a3cac768241d2 -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/BrentLab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9c2236ffa2064378346c12493f7a3cac768241d2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file tfbpshiny-1.0.0-py3-none-any.whl.
File metadata
- Download URL: tfbpshiny-1.0.0-py3-none-any.whl
- Upload date:
- Size: 358.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
164ae02a75cc34b8003966904e1e07625585ddc1ac50a7275ff001ed9d864bc9
|
|
| MD5 |
ae092711b6b200f35942488303d94e57
|
|
| BLAKE2b-256 |
6a34889bcf9da51efa5ee36cec5dd0159a45438d56386b4f9cac9f9289d03f44
|
Provenance
The following attestation bundles were made for tfbpshiny-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on BrentLab/tfbpshiny
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tfbpshiny-1.0.0-py3-none-any.whl -
Subject digest:
164ae02a75cc34b8003966904e1e07625585ddc1ac50a7275ff001ed9d864bc9 - Sigstore transparency entry: 1803898056
- Sigstore integration time:
-
Permalink:
BrentLab/tfbpshiny@9c2236ffa2064378346c12493f7a3cac768241d2 -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/BrentLab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9c2236ffa2064378346c12493f7a3cac768241d2 -
Trigger Event:
release
-
Statement type: