Skip to content

duocang/PMET-Shiny-App

Repository files navigation

PMET Shiny App

www.PMET.online

PMET (Promoter Motif Enrichment Tool) identifies cooperative transcription factor (TF) activity by evaluating both homotypic and heterotypic motif combinations across promoter sets.

Project Structure

pmet-shiny-app/
├── app.R                         # Shiny entry point
├── R/                            # Shiny application code (UI, Server, modules, utils)
├── data/
│   ├── configure/                # Runtime config (email, CPU, nginx link)
│   ├── demo_*/                   # Demo datasets
│   ├── indexing/                 # Pre-computed motif hits (21 species, downloaded at build)
│   ├── genome_n_annotation.json
│   └── motif_db_meta.json
├── scripts/
│   ├── pmet/                     # Core PMET analysis scripts (shell + Python)
│   └── download_pmet_indexing.sh # Downloads indexing data from Zenodo
├── www/                          # Frontend assets (CSS, JS, images)
├── config/                       # Runtime config (mounted as volumes)
│   ├── nginx.conf                # Nginx results file server config
│   └── shiny-server.conf         # Shiny Server config (timeouts, etc.)
├── Dockerfile
├── docker-compose.yml
├── pmet.sh                       # Docker management script
├── .dockerignore
└── .env.example                  # ** THE ONLY FILE to edit for deployment **

Quick Start (Docker)

1. Configure

cp .env.example .env
# Edit .env — ports, CPU threads, SMTP credentials, server hostname.
# That's the ONLY file you need to touch.

2. Build & Run

./pmet.sh build
./pmet.sh start

Or use the interactive menu: ./pmet.sh

This will:

  1. Build the Shiny image (install R packages, compile PMET, download indexing data)
  2. Start Shiny Server on port 3838
  3. Start Nginx results server on port 3080

3. Access

Service URL
Shiny App http://localhost:3838/pmet/
Results (Nginx) http://localhost:3080/results/

Configuration

All settings are in .env:

SHINY_PORT=3838                        # Shiny host port
NGINX_PORT=3080                        # Nginx host port
NGINX_HOST=your-server.example.com     # Public hostname (for email links)
PMET_NCPU=4                            # CPU threads
SMTP_HOST=smtp.gmail.com               # Leave empty to skip email
SMTP_PORT=465
SMTP_USERNAME=you@gmail.com
SMTP_PASSWORD=app-password
SMTP_FROM=you@gmail.com

Then ./pmet.sh restart.

pmet.sh commands: build, rebuild, start, stop, restart, logs, logs-app, shell, status, clean, purge.

Architecture

┌──────────┐     ┌──────────┐
│  Shiny   │────▶│  Results  │◀──── Nginx (:80 internal, NGINX_PORT on host)
│  Server  │     │  Volume   │      (file download)
│  (:3838) │     └──────────┘
└──────────┘
└──────────┘
     User submits task
       → PMET analysis runs
         → Results saved to shared volume
           → Email sent with download link

Pre-computed Indexing Data

21 plant species with motif hits from 5 databases are downloaded during Docker build from Zenodo.

To add new species or databases, copy indexing results to data/indexing/. The app auto-detects new additions.

PMET Workflow

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors