# andrewdmr/databioanalytic architecture

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

- Interactive diagram: https://gitdiagram.com/andrewdmr/databioanalytic
- Repository: https://github.com/andrewdmr/databioanalytic

## Overview

DataBioAnalytic explores and simulates perturbations in breast-cancer protein interaction networks. Users select a biological pathway and network thresholds, then inspect the graph, protein details, connectivity/MST, signaling routes, maximum flow, or knockout effects. The browser’s App coordinates requests to the FastAPI API; API handlers build filtered graphs with the loader and dispatch analysis to graph algorithms. The README documents all major analysis capabilities. Some underlying code is unsampled, so the graph limits internal links to those shown in excerpts or explicitly documented.

Main entry points: [`frontend/src/App.tsx`](https://github.com/andrewdmr/databioanalytic/blob/main/frontend/src/App.tsx) (App state), [`backend/loader.py`](https://github.com/andrewdmr/databioanalytic/blob/main/backend/loader.py) (Graph construction), [`backend/main.py`](https://github.com/andrewdmr/databioanalytic/blob/main/backend/main.py) (REST endpoints), [`frontend/src/components/TopBar.tsx`](https://github.com/andrewdmr/databioanalytic/blob/main/frontend/src/components/TopBar.tsx) (Filters and search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Interactive explorer"]
  node_app["App state<br/>[App.tsx]"]
  node_topbar["Filters and search<br/>[TopBar.tsx]"]
  node_leftpanel["Analysis controls<br/>[LeftPanel.tsx]"]
  node_graphcanvas["Network canvas<br/>[GraphCanvas.tsx]"]
  node_rightpanel["Protein and knockout<br/>[RightPanel.tsx]"]
  node_httpclient["HTTP client<br/>[api.ts]"]
end

subgraph group_api["API orchestration"]
  node_fastapi["REST endpoints<br/>[main.py]"]
end

subgraph group_network["Network data and analysis"]
  node_graphbuild["Graph construction<br/>[loader.py]"]
  node_graphalgorithms["Graph algorithms<br/>[algoritmos.py]"]
  node_cache[("Interaction cache<br/>[links_400.npz]")]
end

subgraph group_sources["Biological data"]
  node_proteininfo["Protein identifiers"]
  node_opentargets["Disease associations"]
  node_stringlinks["STRING interactions"]
end

node_user(("Researcher"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_topbar
node_app -->|"renders"| node_leftpanel
node_app -->|"renders"| node_graphcanvas
node_app -->|"renders"| node_rightpanel
node_topbar -->|"sets filters"| node_app
node_leftpanel -->|"sets analysis"| node_app
node_rightpanel -->|"sets knockout"| node_app
node_app -->|"requests data"| node_httpclient
node_httpclient -->|"calls endpoints"| node_fastapi
node_fastapi -->|"builds subgraph"| node_graphbuild
node_fastapi -->|"dispatches analysis"| node_graphalgorithms
node_graphbuild -->|"maps identifiers"| node_proteininfo
node_graphbuild -->|"ranks associations"| node_opentargets
node_graphbuild -->|"loads interactions"| node_cache
node_stringlinks -.->|"interaction source"| node_graphbuild
node_user -.->|"requests analysis"| node_graphalgorithms

click node_app "https://github.com/andrewdmr/databioanalytic/blob/main/frontend/src/App.tsx"
click node_topbar "https://github.com/andrewdmr/databioanalytic/blob/main/frontend/src/components/TopBar.tsx"
click node_leftpanel "https://github.com/andrewdmr/databioanalytic/blob/main/frontend/src/components/LeftPanel.tsx"
click node_graphcanvas "https://github.com/andrewdmr/databioanalytic/blob/main/frontend/src/components/GraphCanvas.tsx"
click node_rightpanel "https://github.com/andrewdmr/databioanalytic/blob/main/frontend/src/components/RightPanel.tsx"
click node_httpclient "https://github.com/andrewdmr/databioanalytic/blob/main/frontend/src/api.ts"
click node_fastapi "https://github.com/andrewdmr/databioanalytic/blob/main/backend/main.py"
click node_graphbuild "https://github.com/andrewdmr/databioanalytic/blob/main/backend/loader.py"
click node_graphalgorithms "https://github.com/andrewdmr/databioanalytic/blob/main/backend/algoritmos.py"
click node_cache "https://github.com/andrewdmr/databioanalytic/blob/main/backend/cache/links_400.npz"
click node_proteininfo "https://github.com/andrewdmr/databioanalytic/blob/main/datos_originales/9606.protein.info.v12.0.txt"
click node_opentargets "https://github.com/andrewdmr/databioanalytic/blob/main/datos_originales/opentargets_cancer_mama.tsv"

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_app,node_topbar,node_leftpanel,node_graphcanvas,node_rightpanel,node_httpclient toneBlue
class node_fastapi toneAmber
class node_graphbuild,node_graphalgorithms,node_cache toneMint
class node_proteininfo,node_opentargets,node_stringlinks toneRose
class node_user toneIndigo
```

## Components

### Interactive explorer

- [App state](https://github.com/andrewdmr/databioanalytic/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Filters and search](https://github.com/andrewdmr/databioanalytic/blob/main/frontend/src/components/TopBar.tsx): `frontend/src/components/TopBar.tsx`
- [Analysis controls](https://github.com/andrewdmr/databioanalytic/blob/main/frontend/src/components/LeftPanel.tsx): `frontend/src/components/LeftPanel.tsx`
- [Network canvas](https://github.com/andrewdmr/databioanalytic/blob/main/frontend/src/components/GraphCanvas.tsx): `frontend/src/components/GraphCanvas.tsx`
- [Protein and knockout](https://github.com/andrewdmr/databioanalytic/blob/main/frontend/src/components/RightPanel.tsx): `frontend/src/components/RightPanel.tsx`
- [HTTP client](https://github.com/andrewdmr/databioanalytic/blob/main/frontend/src/api.ts): `frontend/src/api.ts`

### API orchestration

- [REST endpoints](https://github.com/andrewdmr/databioanalytic/blob/main/backend/main.py): `backend/main.py`

### Network data and analysis

- [Graph construction](https://github.com/andrewdmr/databioanalytic/blob/main/backend/loader.py): `backend/loader.py`
- [Graph algorithms](https://github.com/andrewdmr/databioanalytic/blob/main/backend/algoritmos.py): `backend/algoritmos.py`
- [Interaction cache](https://github.com/andrewdmr/databioanalytic/blob/main/backend/cache/links_400.npz): `backend/cache/links_400.npz`

### Biological data

- [Protein identifiers](https://github.com/andrewdmr/databioanalytic/blob/main/datos_originales/9606.protein.info.v12.0.txt): `datos_originales/9606.protein.info.v12.0.txt`
- [Disease associations](https://github.com/andrewdmr/databioanalytic/blob/main/datos_originales/opentargets_cancer_mama.tsv): `datos_originales/opentargets_cancer_mama.tsv`
- **STRING interactions**

### Other components

- **Researcher**

## Connections

- Researcher → App state: uses (evidence: `README.md`)
- App state → Filters and search: renders (evidence: `frontend/src/App.tsx`)
- App state → Analysis controls: renders (evidence: `frontend/src/App.tsx`)
- App state → Network canvas: renders (evidence: `frontend/src/App.tsx`)
- App state → Protein and knockout: renders (evidence: `frontend/src/App.tsx`)
- Filters and search → App state: sets filters (evidence: `frontend/src/App.tsx`)
- Analysis controls → App state: sets analysis (evidence: `frontend/src/App.tsx`)
- Protein and knockout → App state: sets knockout (evidence: `frontend/src/App.tsx`)
- App state → HTTP client: requests data (evidence: `frontend/src/App.tsx`)
- HTTP client → REST endpoints: calls endpoints (evidence: `frontend/src/api.ts`)
- REST endpoints → Graph construction: builds subgraph (evidence: `backend/main.py`)
- REST endpoints → Graph algorithms: dispatches analysis (evidence: `backend/main.py`)
- Graph construction → Protein identifiers: maps identifiers (evidence: `backend/loader.py`)
- Graph construction → Disease associations: ranks associations (evidence: `backend/loader.py`)
- Graph construction → Interaction cache: loads interactions (evidence: `backend/loader.py`)
- STRING interactions → Graph construction: interaction source (evidence: `README.md`)
- Researcher → Graph algorithms: requests analysis (evidence: `README.md`)
