Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

RNA-seq Report Portal

Small FastAPI service for registering cloud RNA-seq runs and serving signed links to reports stored in S3.

This is intentionally separate from the Nextflow pipeline. The pipeline remains responsible for compute and published artefacts; the portal gives reviewers and collaborators a minimal cloud-facing surface for run status and report access.

The root route renders a small dashboard for browser review. The API remains available through /docs, /runs and /runs/{id}/artifacts.

Architecture

Nextflow AWS Batch run
  -> s3://bucket/results/<run>/
      -> pipeline_info/report.html
      -> pipeline_info/timeline.html
      -> pipeline_info/trace.txt
      -> pipeline_info/dag.dot
      -> multiqc/multiqc_report.html
  -> POST /runs into this service
  -> collaborators request signed report URLs from /runs/{id}/artifacts/{artifact}/presign

Configuration

Variable Example Purpose
DATABASE_URL postgresql+psycopg://rnaseq:change_me@db:5432/rnaseq Metadata database. Defaults to local SQLite for development.
AWS_REGION eu-west-2 Region used by the AWS SDK.
AWS credentials IAM role, env vars, or workload identity Required only for signed S3 URLs.
DEMO_RUN_ID synthetic-ci-001 Optional seed run for live demos.
DEMO_S3_PREFIX s3://bucket/results/synthetic-ci-001 Optional S3 prefix for the seeded demo run.

Local Smoke Run

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000

Open http://localhost:8000 for the dashboard or http://localhost:8000/docs for the OpenAPI UI.

Register a completed run:

curl -X POST http://localhost:8000/runs \
  -H 'content-type: application/json' \
  -d '{
    "run_id": "airway-test-001",
    "name": "Synthetic CI airway test",
    "status": "succeeded",
    "s3_prefix": "s3://my-rnaseq-bucket/results/airway-test-001"
  }'

Get a signed report URL:

curl http://localhost:8000/runs/airway-test-001/artifacts/report/presign

Container

docker build -t rnaseq-report-portal .
docker run --rm -p 8000:8000 \
  -e DATABASE_URL=postgresql+psycopg://rnaseq:change_me@host.docker.internal:5432/rnaseq \
  rnaseq-report-portal

Run the full local stack with Postgres:

docker compose up --build

The compose stack seeds a synthetic run so the dashboard has a visible record immediately.

Render Blueprint

The repository root contains render.yaml for a reproducible Render deployment:

  • Docker web service built from cloud/report-portal/Dockerfile.
  • Managed Postgres database connected through DATABASE_URL.
  • Optional demo run seeded through DEMO_RUN_ID and DEMO_S3_PREFIX.
  • AWS credentials stored as Dashboard secrets for S3 presigned URLs.

Open the Blueprint after the file is pushed:

https://dashboard.render.com/blueprint/new?repo=https://github.com/Ekin-Kahraman/rnaseq-nextflow-pipeline

Current live smoke deployment:

Tests

pip install -r requirements.txt
pytest tests