Skip to content

About

Full-stack platform for variant analysis submission and visualization

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Variant Platform

Full-stack platform for variant analysis submission and visualization.

Variant Platform centralizes patient registration, genomic analysis submission, execution tracking, and variant visualization. The project combines a FastAPI backend, a PostgreSQL database, and a React/Vite frontend designed for clinical analysis workflows and variant data exploration.

The FASTQ processing engine used by this platform is available in a separate repository: fastq_engine.

Platform Preview

Use the fields below to add screenshots of the application. Save the images in docs/screenshots/ and uncomment the matching image line.

Login and registration

Login screen

Home / dashboard

Home screen

Patient list

Patient list

Patient registration

Patient registration

Analysis submission

Analysis submission

Analysis tracking

Analysis tracking

Variant visualization

Variant visualization

Key Features

  • User authentication with registration, login, and Bearer tokens.
  • Patient registration and listing.
  • Analysis submission with patient data and FASTQ file paths.
  • Tracking of submitted analyses by patient.
  • Visualization of variants associated with a patient.
  • Filters by chromosome, gene, classification, and phenotypes.
  • Chromosome-level variant distribution chart.
  • Automatically generated FastAPI documentation at /docs.
  • Docker environment with backend, frontend, main database, and test database.

Tech Stack

Layer Technologies
Frontend React, Vite, React Router, Axios, Recharts, React Table
Backend FastAPI, SQLAlchemy, Pydantic, Uvicorn
Database PostgreSQL
Authentication OAuth2 Password Flow, JWT
DevOps Docker, Docker Compose
Quality Pytest

Running With Docker

1. Configure environment variables

Create or update the .env file in the project root:

POSTGRES_USER=your_user
POSTGRES_PASSWORD=your_password
POSTGRES_DB=variant_platform
POSTGRES_HOST=db

For tests, use .env.test:

TEST_POSTGRES_USER=test_user
TEST_POSTGRES_PASSWORD=test_password
TEST_POSTGRES_DB=test_db
TEST_POSTGRES_HOST=test_db

2. Start the application

docker compose up --build

After startup:

  • Frontend: http://localhost:5173
  • Backend: http://localhost:8080
  • Swagger/OpenAPI: http://localhost:8080/docs
  • Health check: http://localhost:8080/health

Main API Routes

Method Route Description
GET /health Checks whether the API is online
POST /auth/register/ Creates a new account
POST /auth/login/ Authenticates a user and returns a token
GET /subjects/ Lists patients
POST /subjects/ Registers a patient
GET /subjects/{subject_id}/ Gets a patient by ID
PATCH /subjects/{subject_id}/add_variants/ Associates a variant with a patient
GET /subjects/{subject_id}/variants/ Lists patient variants with filters
GET /variants/ Lists variants
POST /variants/ Creates a variant
GET /variants/{variant_id} Gets a variant by ID

Project Structure

.
|-- app/
|   |-- auth/          # authentication and tokens
|   |-- crud/          # persistence logic
|   |-- db/            # SQLAlchemy session and connection
|   |-- dtos/          # Pydantic schemas
|   |-- infra/         # infrastructure/domain models
|   |-- routes/        # FastAPI routes
|   `-- main.py        # API entrypoint
|-- frontend/
|   |-- src/           # React application
|   `-- vite.config.js
|-- tests/             # integration tests
|-- docker-compose.yml
|-- Dockerfile
|-- Makefile
`-- requirements.txt

Notes

  • The main API runs on localhost:8080.
  • The frontend also calls an external engine on localhost:8000 for analysis submission (/submit_task).
  • Do not commit real credentials in .env files.
  • Platform screenshots can be placed in docs/screenshots/ using the suggested names in the preview section.

About

Full-stack platform for variant analysis submission and visualization

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages