# innocentsado/early-detection architecture

> Architecture diagram of the GitHub repository innocentsado/early-detection, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/innocentsado/early-detection
- Repository: https://github.com/innocentsado/early-detection

## Overview

This repository is a notebook-based research project for detecting cancer as an anomaly in transcriptomic data. Its documented workflow uses TCGA and GTEx data to train a variational autoencoder (VAE), then applies anomaly detection; it reports results across six cancer types. Separate notebooks cover data exploration and anomaly detection for those types. The README documents the overall workflow but no notebook-level calls or data handoffs, so the graph keeps those relationships at the documented level.

Main entry points: [`anomaly detection avec vae breast _ Le bon.ipynb`](https://github.com/innocentsado/early-detection/blob/main/anomaly%20detection%20avec%20vae%20breast%20_%20Le%20bon.ipynb) (Breast detection), [`anomaly detection avec vae liver _ Le bon.ipynb`](https://github.com/innocentsado/early-detection/blob/main/anomaly%20detection%20avec%20vae%20liver%20_%20Le%20bon.ipynb) (Liver detection), [`anomaly detection avec vae lung _ Le bon.ipynb`](https://github.com/innocentsado/early-detection/blob/main/anomaly%20detection%20avec%20vae%20lung%20_%20Le%20bon.ipynb) (Lung detection), [`anomaly detection avec vae prostate _ Le bon.ipynb`](https://github.com/innocentsado/early-detection/blob/main/anomaly%20detection%20avec%20vae%20prostate%20_%20Le%20bon.ipynb) (Prostate detection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_exploration["Data exploration"]
  node_explore_breast["Breast exploration"]
  node_explore_liver["Liver exploration"]
  node_explore_lung["Lung exploration"]
  node_explore_prostate["Prostate exploration"]
  node_explore_stomach["Stomach exploration"]
  node_explore_thyroid["Thyroid exploration"]
end

subgraph group_detection["Anomaly detection"]
  node_vae["VAE model"]
  node_anomaly["Anomaly scoring"]
  node_detect_breast["Breast detection"]
  node_detect_liver["Liver detection"]
  node_detect_lung["Lung detection"]
  node_detect_prostate["Prostate detection"]
  node_detect_stomach["Stomach detection"]
  node_detect_thyroid["Thyroid detection"]
end

node_researcher(("Researcher"))
node_tcga[("TCGA data")]
node_gtex[("GTEx data")]

node_researcher -->|"runs notebook"| node_detect_breast
node_researcher -->|"runs notebook"| node_detect_liver
node_researcher -->|"runs notebook"| node_detect_lung
node_researcher -->|"runs notebook"| node_detect_prostate
node_researcher -->|"runs notebook"| node_detect_stomach
node_researcher -->|"runs notebook"| node_detect_thyroid
node_tcga -->|"trains on"| node_vae
node_gtex -->|"trains on"| node_vae
node_vae -->|"scores outputs"| node_anomaly

click node_explore_breast "https://github.com/innocentsado/early-detection/blob/main/dataexploration_breast.ipynb"
click node_explore_liver "https://github.com/innocentsado/early-detection/blob/main/dataexploration_liver.ipynb"
click node_explore_lung "https://github.com/innocentsado/early-detection/blob/main/dataexploration_lung.ipynb"
click node_explore_prostate "https://github.com/innocentsado/early-detection/blob/main/dataexploration_prostate.ipynb"
click node_explore_stomach "https://github.com/innocentsado/early-detection/blob/main/dataexploration_stomach.ipynb"
click node_explore_thyroid "https://github.com/innocentsado/early-detection/blob/main/dataexploration_thyroid.ipynb"
click node_detect_breast "https://github.com/innocentsado/early-detection/blob/main/anomaly%20detection%20avec%20vae%20breast%20_%20Le%20bon.ipynb"
click node_detect_liver "https://github.com/innocentsado/early-detection/blob/main/anomaly%20detection%20avec%20vae%20liver%20_%20Le%20bon.ipynb"
click node_detect_lung "https://github.com/innocentsado/early-detection/blob/main/anomaly%20detection%20avec%20vae%20lung%20_%20Le%20bon.ipynb"
click node_detect_prostate "https://github.com/innocentsado/early-detection/blob/main/anomaly%20detection%20avec%20vae%20prostate%20_%20Le%20bon.ipynb"
click node_detect_stomach "https://github.com/innocentsado/early-detection/blob/main/anomaly%20detection%20avec%20vae%20stomach%20_%20Le%20bon.ipynb"
click node_detect_thyroid "https://github.com/innocentsado/early-detection/blob/main/anomaly%20detection%20avec%20vae%20thyroid%20_%20Le%20bon.ipynb"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_explore_breast,node_explore_liver,node_explore_lung,node_explore_prostate,node_explore_stomach,node_explore_thyroid toneBlue
class node_vae,node_anomaly,node_detect_breast,node_detect_liver,node_detect_lung,node_detect_prostate,node_detect_stomach,node_detect_thyroid,node_tcga,node_gtex toneAmber
class node_researcher toneIndigo
```

## Components

### Data exploration

- [Breast exploration](https://github.com/innocentsado/early-detection/blob/main/dataexploration_breast.ipynb): `dataexploration_breast.ipynb`
- [Liver exploration](https://github.com/innocentsado/early-detection/blob/main/dataexploration_liver.ipynb): `dataexploration_liver.ipynb`
- [Lung exploration](https://github.com/innocentsado/early-detection/blob/main/dataexploration_lung.ipynb): `dataexploration_lung.ipynb`
- [Prostate exploration](https://github.com/innocentsado/early-detection/blob/main/dataexploration_prostate.ipynb): `dataexploration_prostate.ipynb`
- [Stomach exploration](https://github.com/innocentsado/early-detection/blob/main/dataexploration_stomach.ipynb): `dataexploration_stomach.ipynb`
- [Thyroid exploration](https://github.com/innocentsado/early-detection/blob/main/dataexploration_thyroid.ipynb): `dataexploration_thyroid.ipynb`

### Anomaly detection

- **VAE model**
- **Anomaly scoring**
- [Breast detection](https://github.com/innocentsado/early-detection/blob/main/anomaly%20detection%20avec%20vae%20breast%20_%20Le%20bon.ipynb): `anomaly detection avec vae breast _ Le bon.ipynb`
- [Liver detection](https://github.com/innocentsado/early-detection/blob/main/anomaly%20detection%20avec%20vae%20liver%20_%20Le%20bon.ipynb): `anomaly detection avec vae liver _ Le bon.ipynb`
- [Lung detection](https://github.com/innocentsado/early-detection/blob/main/anomaly%20detection%20avec%20vae%20lung%20_%20Le%20bon.ipynb): `anomaly detection avec vae lung _ Le bon.ipynb`
- [Prostate detection](https://github.com/innocentsado/early-detection/blob/main/anomaly%20detection%20avec%20vae%20prostate%20_%20Le%20bon.ipynb): `anomaly detection avec vae prostate _ Le bon.ipynb`
- [Stomach detection](https://github.com/innocentsado/early-detection/blob/main/anomaly%20detection%20avec%20vae%20stomach%20_%20Le%20bon.ipynb): `anomaly detection avec vae stomach _ Le bon.ipynb`
- [Thyroid detection](https://github.com/innocentsado/early-detection/blob/main/anomaly%20detection%20avec%20vae%20thyroid%20_%20Le%20bon.ipynb): `anomaly detection avec vae thyroid _ Le bon.ipynb`

### Other components

- **Researcher**
- **TCGA data**
- **GTEx data**

## Connections

- Researcher → Breast detection: runs notebook (evidence: `README.md`)
- Researcher → Liver detection: runs notebook (evidence: `README.md`)
- Researcher → Lung detection: runs notebook (evidence: `README.md`)
- Researcher → Prostate detection: runs notebook (evidence: `README.md`)
- Researcher → Stomach detection: runs notebook (evidence: `README.md`)
- Researcher → Thyroid detection: runs notebook (evidence: `README.md`)
- TCGA data → VAE model: trains on (evidence: `README.md`)
- GTEx data → VAE model: trains on (evidence: `README.md`)
- VAE model → Anomaly scoring: scores outputs (evidence: `README.md`)
