Skip to main content

Genomic Epidemiology platform for disease X

Project description

Gen-EpiX Logo

tests sonarqube coverage


Gen-EpiX: Genomic Epidemiology platform for disease X (beta version)

Gen-EpiX is a platform for visualizing and analyzing genomic epidemiology data. It has fine-grained access controls for collaboration between multiple organizations.

The platform is currently at the beta release stage and as such not yet usable for production. We are currently working to get the platform released, for use in the Netherlands as the official national platform for laboratory-based surveillance of infectious diseases. Feel free to contact us here if you are interested.

This repository contains the code for the backend and is one of several that together comprise the platform. See https://github.com/RIVM-bioinformatics/gen-epix for an overview of the repositories.

Key Features

  • Visualisation: Visualize cases by time, place, person and also by genome through a phylogenetic tree coupled to the cases.
  • Fine-grained access: Give different organizations different access rights per disease, down to individual variables. Organizations can manage access of their own users by themselves.
  • Search: Search and filter cases, including on genetic similarity.
  • Signal detection: Detect, define and share sets of cases, signals and outbreaks. Detection can be manual through the web application, or through your own algorithm using the API.
  • Disease X: Any disease and corresponding analysis variables can be added.
  • Data: Adheres to the Medallion data architecture design pattern. The silver layer consists of normalized and standardized patient or subject data compliant with the OMOP Common Data Model, and a dedicated database for genetic sequence data and computation of phylogenetic trees. The gold layer consists of case data ready for analysis in the form of a single row of data per case.
  • Tech: OpenAPI compliant API, deployable on cloud or on-premise, support for multiple authentication providers. Python/FastAPI backend and default TypeScript/React frontend available from gen-epix-web.

Deliberately not in scope

  • Disease-specific knowledge: Every organization has their own variables that are important for analysis, as well as their own bioinformatics to process genetic sequence data. We therefore avoided any disease-specific code both for the generation of these data and for the analysis variables that can be defined. Only the results are stored.
  • Collaboration-specific knowledge: Every collaboration or country (e.g. for public health surveillance of diseases) has their own specifics in terms of access rights and any relevant geographic regions. We therefore avoided any country-specific code, both for the type of organizations that have access, and for any geographic data.

Installation

  1. Install ODBC development headers:

    # Linux
    sudo apt-get update
    sudo apt-get install -y unixodbc-dev
    
  2. Create and activate a conda environment:

    conda create --name gen-epix python=3.13
    conda activate gen-epix
    
  3. Install dependencies*:

    pip install -r requirements.txt
    pip install --no-binary :all: pyodbc==5.2.*
    

    Some hardware architectures (especially Apple M1/M2/M3 chips) require pyodbc to be compiled from source for compatibility*

  4. For development, add testing tools:

    pip install -r dev-requirements.txt
    

SSL Certificate Setup

  1. Install mkcert:

    # Linux
    sudo apt install mkcert
    
    # macOS
    brew install mkcert
    
  2. Generate certificates:

    mkcert -install
    mkcert -key-file key.pem -cert-file cert.pem localhost 127.0.0.1
    
  3. Copy the generated files:

    cp key.pem cert.pem /path/to/project/cert/
    
  4. For WSL users: Run the commands in Windows PowerShell and copy files to both the project cert directory and your WSL home directory.


Usage

Starting the API

  1. Activate the conda environment:
conda activate gen-epix
  1. Run the application:
python run.py [service] [app_type] [env_name] [idp_config]
  • service: The service to run (api, etl)
  • app_type: Specific configuration for an app type (casedb, seqdb, omopbd)
  • env_name: Name of the environment.
  • idp_config: Which authentication setting to use (idps, mock_idps, debug)

Example

conda activate gen-epix
python run.py api casedb local idps
Example documentation screenshot

Dependencies

Gen-EpiX relies on several Python packages to provide its functionality:

Core Dependencies

  • fastapi - Modern, high-performance web framework
  • sqlalchemy - SQL toolkit and Object-Relational Mapping (ORM) library
  • pydantic - Data validation and settings management
  • biopython - Tools for computational molecular biology

Database Connectors

  • pyodbc - ODBC database adapter

Development Tools

  • pytest - Testing framework
  • black - Code formatter
  • pylint - Static code analyzer
  • mypy - Static type checker

For a complete list of dependencies, refer to:

Python Version Gen-EpiX requires Python 3.13 or higher.

Funding

This work was funded by the European Union under the EU4Health Programme (EU4H), project IDs 101102070 (UNITED4Surveillance) and 101113520 (NLWGSHERA2).

EU Funding Logo

Disclaimer: Funded by the European Union. Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or Health and Digital Executive Agency. Neither the European Union nor the granting authority can be held responsible for them.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gen_epix-7.1.0.tar.gz (341.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gen_epix-7.1.0-py3-none-any.whl (469.8 kB view details)

Uploaded Python 3

File details

Details for the file gen_epix-7.1.0.tar.gz.

File metadata

  • Download URL: gen_epix-7.1.0.tar.gz
  • Upload date:
  • Size: 341.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gen_epix-7.1.0.tar.gz
Algorithm Hash digest
SHA256 09e9829e98c041dd52599dadf1cc002873e75684b35fc26a470840535ec97083
MD5 7ecdd39c809fde9e74d7c56de33bf024
BLAKE2b-256 6f5597b8c2b30bf227d486711cae712a3b5d8d66cdc16b0f09278848061877f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for gen_epix-7.1.0.tar.gz:

Publisher: release.yaml on RIVM-bioinformatics/gen-epix-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gen_epix-7.1.0-py3-none-any.whl.

File metadata

  • Download URL: gen_epix-7.1.0-py3-none-any.whl
  • Upload date:
  • Size: 469.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gen_epix-7.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dfe63eea8a2159a9bc5d3c3ab9ddf5245a70372bcea59067eab46cf2c30015c1
MD5 55f87b1301331d9e1e1e36e15ae032bc
BLAKE2b-256 53a69f89098fc15a2dcbd42d0eb40b9c99b35bb69f13527e9dac39573d16442a

See more details on using hashes here.

Provenance

The following attestation bundles were made for gen_epix-7.1.0-py3-none-any.whl:

Publisher: release.yaml on RIVM-bioinformatics/gen-epix-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page