Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MammaScope logo

MammaScope — Public Demo

Python Streamlit License Project

Public demo of MammaScope, a clinical platform for integrating and comparing immunohistochemistry (IHC) and MammaTyper® RT-qPCR results in breast cancer molecular subtyping.

🌐 Live demo: mammascope-demo.streamlit.app


What is MammaScope?

MammaScope automates the integration, processing and diagnostic concordance analysis between IHC results (from the Patwin hospital system) and MammaTyper® molecular reports (RT-qPCR). It was developed as a Bachelor's Thesis at the University of Burgos in collaboration with the Hospital Universitario de Burgos (HUBU).

The full application (private repository) includes authentication, role-based access control, audit logging and a configurable clinical settings panel. This demo exposes the full workflow with a simulated admin session and anonymized example files — no login required.


System Workflow

flowchart LR
    A[User] --> B[Demo Interface]

    B --> C1[IHC Excel - PatWin]
    B --> C2[MammaTyper® PDF]

    C1 --> D1[Validation + IHC extraction]
    C2 --> D2[Biomarker extraction from PDF]

    D1 --> E[Fusion by sample_id]
    D2 --> E

    E --> F[St. Gallen subtype classifier]
    F --> G[Concordance statistics module]
    G --> H[Automatic clinical alerts]

    H --> I[Interactive results]
    H --> J[PDF / Excel export]
    H --> K[SQLite database]
Loading

Key Features

  • Load IHC Excel files (Patwin) and multiple MammaTyper® PDFs as a single batch
  • Automatic biomarker extraction via regex over free-text clinical narratives
  • St. Gallen 2013/2015 subtype classification algorithm (Luminal A, Luminal B HER2±, HER2-enriched, Triple negative)
  • Concordance statistics: Cohen's kappa with 95% CI, McNemar test, sensitivity, specificity, PPV, NPV, diagnostic OR
  • Automatic clinical alerts: discordances, HER2-low without documented score, values near cut-off thresholds, equivocal HER2 without SISH
  • Individual PDF reports per sample with heatmaps and cut-off proximity indicators
  • Excel export (batch table + metrics dashboard)
  • Cumulative historical database with global statistics

Repository Structure

MammaScope-Demo
│
├── codigo/                       MammaScope source modules (imported by demo)
│   ├── app.py                    main controller
│   ├── extraccion.py             data extraction and normalization (Excel + PDF)
│   ├── discordancia.py           automatic clinical alerts module
│   ├── stats_biomarcadores.py    concordance statistics module
│   ├── db.py                     SQLite database management
│   ├── auth.py                   authentication and role-based access
│   ├── informes.py               individual PDF report generation
│   ├── vista_procesamiento.py    step 2 view (pipeline + progress bar)
│   ├── vista_historico.py        step 3 view (results + export)
│   ├── vista_estadistico.py      global accumulated statistics module
│   ├── ajustes.py                configuration management (settings.json)
│   ├── sync_pack.py              offline batch sync (ZIP + SHA-256)
│   ├── validacion_archivos.py    input format validation
│   ├── settings.json             operational and clinical configuration
│   └── media/                    graphical resources
│
├── demo_app/
│   ├── demo_app.py               demo entry point: injects simulated session,
│   │                             renders landing page, imports from codigo/
│   ├── demo_files/               anonymized example files for testing
│   └── tfg_mamma_demo.db         isolated SQLite database for the demo
│
├── docs/                         logo and visual assets
├── requirements.txt
└── LICENSE

Running Locally

Clone the repository:

git clone https://github.com/diegoalvrezz/MammaScope-Demo.git
cd MammaScope-Demo

Install dependencies:

pip install -r requirements.txt

Run the demo:

streamlit run demo_app/demo_app.py

The demo landing page will load automatically. Download the example files from there and follow the on-screen instructions to test the full workflow.


Demo Files

Example files are available in demo_app/demo_files/:

  • demo_patwin.xlsx — fictitious IHC report in Patwin format (ER, PR, HER2, Ki-67)
  • demo_mammatypper.pdf — simplified MammaTyper® report for the same samples

Both files share the same sample IDs so the cross-matching works end to end. One case includes an intentional discordance to demonstrate how the alert system works.


Clinical Data Disclaimer

This repository does not contain real clinical data. All files are simulated and anonymized, intended solely for demonstration purposes.

The full application operates with previously anonymized data within a hospital environment, under GDPR (EU 2016/679) and Spanish LOPDGDD (LO 3/2018) compliance, with ethics committee approval (CEIm, expediente 3536).


Author

Diego Vallina Álvarez Health Engineering Degree — University of Burgos

Bachelor's Thesis developed in collaboration with the Hospital Universitario de Burgos (HUBU), Pathology Department.

Supervisors: Antonio Jesús Canepa Oneto and Patricia Saiz Lopez.


License

Distributed under the MIT License. See LICENSE for details.

About

Public demo of MammaScope, a Streamlit-based tool for comparing immunohistochemistry (IHC) and MammaTyper molecular subtyping in breast cancer.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages