# pharminfovienna/off-target-p-ml architecture

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

- Interactive diagram: https://gitdiagram.com/pharminfovienna/off-target-p-ml
- Repository: https://github.com/pharminfovienna/off-target-p-ml

## Overview

OfftargetP-ML is a research toolkit for developing binary small-molecule off-target classifiers and predicting activity profiles from molecular structures. The documented workflow starts with compound/target/activity data, curates SMILES and calculates ECFP4 fingerprints, then trains models by target and evaluates their predictions. The repository also includes saved neural-network models and a script for applying models to new structures. The README documents neural-network and random-forest workflows, but their training scripts are absent from this tree; the sampled AutoGluon scripts show training and evaluation code directly. Connections for undocumented or unsampled workflows are therefore omitted or marked unverified.

Main entry points: [`AutoGluon/autogluon_models.py`](https://github.com/pharminfovienna/off-target-p-ml/blob/main/AutoGluon/autogluon_models.py) (AutoGluon models), [`NeuralNetworks`](https://github.com/pharminfovienna/off-target-p-ml/tree/main/NeuralNetworks) (Neural-network training), [`Models/Off-targetP_ML.R`](https://github.com/pharminfovienna/off-target-p-ml/blob/main/Models/Off-targetP_ML.R) (Structure prediction), [`Datasets`](https://github.com/pharminfovienna/off-target-p-ml/tree/main/Datasets) (Compound datasets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_curated_data[("Compound datasets")]
  node_fingerprints["Fingerprint preparation"]
  node_ag_prep["AutoGluon preparation"]
end

subgraph group_models["Model development"]
  node_autogluon_train["AutoGluon models"]
  node_autosklearn_train["Auto-Sklearn models<br/>[Auto-Sklearn.py]"]
  node_neural_train["Neural-network training"]
  node_random_forest["Random-forest training"]
end

subgraph group_prediction["Prediction"]
  node_saved_models[("Saved neural models")]
  node_model_predictor["Structure prediction<br/>[Off-targetP_ML.R]"]
  node_domain_check["Applicability domain"]
end

subgraph group_assessment["Assessment"]
  node_evaluation["Neural evaluation<br/>[evaluation.R]"]
  node_ag_metrics["AutoGluon metrics"]
  node_ask_metrics["Auto-Sklearn metrics<br/>[Auto-Sklearn.py]"]
end

node_researcher(("Researcher"))

node_researcher -.->|"provides data"| node_curated_data
node_curated_data -.->|"curates and encodes"| node_fingerprints
node_fingerprints -.->|"supplies features"| node_neural_train
node_fingerprints -.->|"supplies features"| node_autogluon_train
node_researcher -.->|"runs training"| node_autogluon_train
node_researcher -.->|"runs training"| node_autosklearn_train
node_researcher -.->|"runs training"| node_neural_train
node_researcher -.->|"runs training"| node_random_forest
node_autogluon_train -->|"calculates metrics"| node_ag_metrics
node_autosklearn_train -->|"calculates metrics"| node_ask_metrics
node_researcher -.->|"submits structures"| node_model_predictor
node_saved_models -.->|"loads models"| node_model_predictor
node_model_predictor -.->|"checks applicability"| node_domain_check
node_researcher -.->|"evaluates models"| node_evaluation
node_neural_train -.->|"produces models"| node_saved_models

click node_curated_data "https://github.com/pharminfovienna/off-target-p-ml/tree/main/Datasets"
click node_ag_prep "https://github.com/pharminfovienna/off-target-p-ml/blob/main/AutoGluon/autogluon_filesprep.R"
click node_autogluon_train "https://github.com/pharminfovienna/off-target-p-ml/blob/main/AutoGluon/autogluon_models.py"
click node_autosklearn_train "https://github.com/pharminfovienna/off-target-p-ml/blob/main/Auto-Sklearn/Auto-Sklearn.py"
click node_neural_train "https://github.com/pharminfovienna/off-target-p-ml/tree/main/NeuralNetworks"
click node_random_forest "https://github.com/pharminfovienna/off-target-p-ml/tree/main/RandomForest"
click node_saved_models "https://github.com/pharminfovienna/off-target-p-ml/tree/main/Models"
click node_model_predictor "https://github.com/pharminfovienna/off-target-p-ml/blob/main/Models/Off-targetP_ML.R"
click node_domain_check "https://github.com/pharminfovienna/off-target-p-ml/blob/main/Applicability_domain.R"
click node_evaluation "https://github.com/pharminfovienna/off-target-p-ml/blob/main/NeuralNetworks/evaluation.R"
click node_ag_metrics "https://github.com/pharminfovienna/off-target-p-ml/blob/main/AutoGluon/autogluon_models.py"
click node_ask_metrics "https://github.com/pharminfovienna/off-target-p-ml/blob/main/Auto-Sklearn/Auto-Sklearn.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_curated_data,node_fingerprints,node_ag_prep toneBlue
class node_autogluon_train,node_autosklearn_train,node_neural_train,node_random_forest toneAmber
class node_saved_models,node_model_predictor,node_domain_check toneMint
class node_evaluation,node_ag_metrics,node_ask_metrics toneRose
class node_researcher toneIndigo
```

## Components

### Data preparation

- [Compound datasets](https://github.com/pharminfovienna/off-target-p-ml/tree/main/Datasets): `Datasets`
- **Fingerprint preparation**
- [AutoGluon preparation](https://github.com/pharminfovienna/off-target-p-ml/blob/main/AutoGluon/autogluon_filesprep.R): `AutoGluon/autogluon_filesprep.R`

### Model development

- [AutoGluon models](https://github.com/pharminfovienna/off-target-p-ml/blob/main/AutoGluon/autogluon_models.py): `AutoGluon/autogluon_models.py`
- [Auto-Sklearn models](https://github.com/pharminfovienna/off-target-p-ml/blob/main/Auto-Sklearn/Auto-Sklearn.py): `Auto-Sklearn/Auto-Sklearn.py`
- [Neural-network training](https://github.com/pharminfovienna/off-target-p-ml/tree/main/NeuralNetworks): `NeuralNetworks`
- [Random-forest training](https://github.com/pharminfovienna/off-target-p-ml/tree/main/RandomForest): `RandomForest`

### Prediction

- [Saved neural models](https://github.com/pharminfovienna/off-target-p-ml/tree/main/Models): `Models`
- [Structure prediction](https://github.com/pharminfovienna/off-target-p-ml/blob/main/Models/Off-targetP_ML.R): `Models/Off-targetP_ML.R`
- [Applicability domain](https://github.com/pharminfovienna/off-target-p-ml/blob/main/Applicability_domain.R): `Applicability_domain.R`

### Assessment

- [Neural evaluation](https://github.com/pharminfovienna/off-target-p-ml/blob/main/NeuralNetworks/evaluation.R): `NeuralNetworks/evaluation.R`
- [AutoGluon metrics](https://github.com/pharminfovienna/off-target-p-ml/blob/main/AutoGluon/autogluon_models.py): `AutoGluon/autogluon_models.py`
- [Auto-Sklearn metrics](https://github.com/pharminfovienna/off-target-p-ml/blob/main/Auto-Sklearn/Auto-Sklearn.py): `Auto-Sklearn/Auto-Sklearn.py`

### Other components

- **Researcher**

## Connections

- Researcher → Compound datasets: provides data
- Compound datasets → Fingerprint preparation: curates and encodes
- Fingerprint preparation → Neural-network training: supplies features
- Fingerprint preparation → AutoGluon models: supplies features
- Researcher → AutoGluon models: runs training
- Researcher → Auto-Sklearn models: runs training
- Researcher → Neural-network training: runs training
- Researcher → Random-forest training: runs training
- AutoGluon models → AutoGluon metrics: calculates metrics (evidence: `AutoGluon/autogluon_models.py`)
- Auto-Sklearn models → Auto-Sklearn metrics: calculates metrics (evidence: `Auto-Sklearn/Auto-Sklearn.py`)
- Researcher → Structure prediction: submits structures
- Saved neural models → Structure prediction: loads models
- Structure prediction → Applicability domain: checks applicability
- Researcher → Neural evaluation: evaluates models
- Neural-network training → Saved neural models: produces models
