# kleberpointexe/cancerdrugrepo-ic architecture

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

- Interactive diagram: https://gitdiagram.com/kleberpointexe/cancerdrugrepo-ic
- Repository: https://github.com/kleberpointexe/cancerdrugrepo-ic

## Overview

This repository analyzes drug–cancer associations using protein-interaction networks and matrix factorization. Its main result paths are network proximity scoring or NMF-based scoring, followed by per-cancer rankings and evaluation against RepoDB ground truth; it also provides graph diffusion, feature-matrix construction, and plotting. The README is empty, and the excerpts do not show a top-level workflow wiring these modules together, so the graph preserves supported local calls without inferring cross-module orchestration.

Main entry points: [`models/GuneyModel.py`](https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/models/GuneyModel.py) (Pair proximity), [`features/matrices.py`](https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/features/matrices.py) (Feature matrices), [`models/nmf.py`](https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/models/nmf.py) (Two-matrix NMF), [`evaluation/metrics.py`](https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/evaluation/metrics.py) (Evaluation metrics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data and graph"]
  node_loader["Data loader<br/>[loader.py]"]
  node_raw_data["Input datasets"]
  node_graph_diffusion["Graph diffusion<br/>[diffusion.py]"]
  node_feature_matrices["Feature matrices<br/>[matrices.py]"]
end

subgraph group_proximity["Network proximity"]
  node_proximity_pipeline["Proximity scoring<br/>[GuneyModel.py]"]
  node_distance_precompute["Distance precompute<br/>[GuneyModel.py]"]
  node_pair_proximity["Pair proximity<br/>[GuneyModel.py]"]
end

subgraph group_nmf["Matrix factorization"]
  node_nmf_model["Two-matrix NMF<br/>[nmf.py]"]
  node_pair_builder["Pair enumeration"]
end

subgraph group_evaluation["Ranking and evaluation"]
  node_ranking["Drug rankings<br/>[ranking.py]"]
  node_ground_truth["Ground truth<br/>[ground_truth.py]"]
  node_metrics["Evaluation metrics<br/>[metrics.py]"]
end

subgraph group_support["Utilities and plots"]
  node_plots["Result plots<br/>[plots.py]"]
  node_io["Experiment I/O<br/>[io.py]"]
  node_pickle["Pickle storage<br/>[pickle.py]"]
end

node_feature_matrices -->|"uses perturbation"| node_feature_matrices
node_proximity_pipeline -->|"precomputes distances"| node_distance_precompute
node_proximity_pipeline -->|"processes pairs"| node_pair_proximity
node_pair_proximity -->|"measures distance"| node_pair_proximity
node_nmf_model -->|"trains each k"| node_nmf_model
node_metrics -->|"scores AUC"| node_metrics
node_io -->|"uses pickle helpers"| node_pickle

click node_loader "https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/data/loader.py"
click node_raw_data "https://github.com/kleberpointexe/cancerdrugrepo-ic/tree/main/data/dadosOriginais"
click node_graph_diffusion "https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/graph/diffusion.py"
click node_feature_matrices "https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/features/matrices.py"
click node_proximity_pipeline "https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/models/GuneyModel.py"
click node_distance_precompute "https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/models/GuneyModel.py"
click node_pair_proximity "https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/models/GuneyModel.py"
click node_nmf_model "https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/models/nmf.py"
click node_pair_builder "https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/features/pairDrugCancerGuney.py"
click node_ranking "https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/evaluation/ranking.py"
click node_ground_truth "https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/evaluation/ground_truth.py"
click node_metrics "https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/evaluation/metrics.py"
click node_plots "https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/visualization/plots.py"
click node_io "https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/utils/io.py"
click node_pickle "https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/utils/pickle.py"

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_loader,node_raw_data,node_graph_diffusion,node_feature_matrices toneBlue
class node_proximity_pipeline,node_distance_precompute,node_pair_proximity toneAmber
class node_nmf_model,node_pair_builder toneMint
class node_ranking,node_ground_truth,node_metrics toneRose
class node_plots,node_io,node_pickle toneIndigo
```

## Components

### Data and graph

- [Data loader](https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/data/loader.py): `data/loader.py`
- [Input datasets](https://github.com/kleberpointexe/cancerdrugrepo-ic/tree/main/data/dadosOriginais): `data/dadosOriginais`
- [Graph diffusion](https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/graph/diffusion.py): `graph/diffusion.py`
- [Feature matrices](https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/features/matrices.py): `features/matrices.py`

### Network proximity

- [Proximity scoring](https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/models/GuneyModel.py): `models/GuneyModel.py`
- [Distance precompute](https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/models/GuneyModel.py): `models/GuneyModel.py`
- [Pair proximity](https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/models/GuneyModel.py): `models/GuneyModel.py`

### Matrix factorization

- [Two-matrix NMF](https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/models/nmf.py): `models/nmf.py`
- [Pair enumeration](https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/features/pairDrugCancerGuney.py): `features/pairDrugCancerGuney.py`

### Ranking and evaluation

- [Drug rankings](https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/evaluation/ranking.py): `evaluation/ranking.py`
- [Ground truth](https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/evaluation/ground_truth.py): `evaluation/ground_truth.py`
- [Evaluation metrics](https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/evaluation/metrics.py): `evaluation/metrics.py`

### Utilities and plots

- [Result plots](https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/visualization/plots.py): `visualization/plots.py`
- [Experiment I/O](https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/utils/io.py): `utils/io.py`
- [Pickle storage](https://github.com/kleberpointexe/cancerdrugrepo-ic/blob/main/utils/pickle.py): `utils/pickle.py`

## Connections

- Feature matrices → Feature matrices: uses perturbation (evidence: `features/matrices.py`)
- Proximity scoring → Distance precompute: precomputes distances (evidence: `models/GuneyModel.py`)
- Proximity scoring → Pair proximity: processes pairs (evidence: `models/GuneyModel.py`)
- Pair proximity → Pair proximity: measures distance (evidence: `models/GuneyModel.py`)
- Two-matrix NMF → Two-matrix NMF: trains each k (evidence: `models/nmf.py`)
- Evaluation metrics → Evaluation metrics: scores AUC (evidence: `evaluation/metrics.py`)
- Experiment I/O → Pickle storage: uses pickle helpers (evidence: `utils/io.py`)
