# mcpalumbo/fasttarget architecture

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

- Interactive diagram: https://gitdiagram.com/mcpalumbo/fasttarget
- Repository: https://github.com/mcpalumbo/fasttarget

## Overview

FastTarget prioritizes bacterial drug targets by combining genome-derived evidence with metabolic, conservation, structural, essentiality, localization, and off-target analyses, then merging user metadata into a results table. Users configure an organism and run either the Python driver locally or the Nextflow workflow on a cluster; databases are prepared separately. The graph preserves README capabilities and core modules. Some stage wiring is documented only at pipeline level, so those edges cite the README; unsampled Nextflow internals are represented at their existing workflow/module paths.

Main entry points: [`fasttarget.py`](https://github.com/mcpalumbo/fasttarget/blob/main/fasttarget.py) (Python driver), [`nextflow/modules/merge_final_results.nf`](https://github.com/mcpalumbo/fasttarget/blob/main/nextflow/modules/merge_final_results.nf) (Results integration), [`configuration.py`](https://github.com/mcpalumbo/fasttarget/blob/main/configuration.py) (Configuration), [`nextflow/workflows/fasttarget.nf`](https://github.com/mcpalumbo/fasttarget/blob/main/nextflow/workflows/fasttarget.nf) (Nextflow workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Execution and setup"]
  node_config["Configuration<br/>[configuration.py]"]
  node_driver["Python driver<br/>[fasttarget.py]"]
  node_nextflow["Nextflow workflow<br/>[fasttarget.nf]"]
  node_dbmgr["Database preparation<br/>[databases.py]"]
  node_databases[("Reference databases")]
end

subgraph group_genome["Genome evidence"]
  node_genomeprep["Genome preparation<br/>[genome.py]"]
  node_derep["Genome dereplication<br/>[dereplication.py]"]
  node_metadata["Gene metadata<br/>[metadata.py]"]
end

subgraph group_analysis["Target analyses"]
  node_conservation["Core conservation"]
  node_metabolism["Metabolic pathways<br/>[pathways.py]"]
  node_functional["Functional annotation"]
  node_essentiality["Essentiality screening<br/>[essentiality.py]"]
  node_localization["Protein localization<br/>[genome.py]"]
  node_structures["Structure analysis<br/>[structures.py]"]
  node_alphafill["AlphaFill ligands<br/>[alphafill.py]"]
  node_chembl["ChEMBL ligands<br/>[chembl.py]"]
  node_bindingdb["BindingDB ligands<br/>[bindingdb.py]"]
  node_offtargets["Off-target screening<br/>[offtargets.py]"]
  node_microbiome["Microbiome catalogues"]
  node_pocket["Pocket overlap<br/>[pocket_overlap.py]"]
end

subgraph group_results["Integration and output"]
  node_results["Results integration"]
  node_output["Results table"]
end

node_user(("Pipeline user"))
node_services(("External bioinformatics sources"))

node_user -->|"configures"| node_config
node_user -->|"runs locally"| node_driver
node_user -->|"runs on HPC"| node_nextflow
node_user -->|"downloads databases"| node_dbmgr
node_dbmgr -->|"prepares"| node_databases
node_config -->|"configures"| node_driver
node_driver -->|"prepares genome"| node_genomeprep
node_driver -.->|"selects genomes"| node_derep
node_driver -->|"runs"| node_conservation
node_driver -->|"runs"| node_metabolism
node_driver -->|"checks essentiality"| node_essentiality
node_driver -->|"predicts localization"| node_localization
node_driver -->|"analyzes structures"| node_structures
node_driver -->|"screens off-targets"| node_offtargets
node_driver -->|"annotates metabolism"| node_functional
node_driver -->|"runs ligand analysis"| node_alphafill
node_driver -->|"runs ligand search"| node_chembl
node_driver -->|"runs ligand search"| node_bindingdb
node_offtargets -->|"uses catalogues"| node_microbiome
node_driver -->|"analyzes pocket overlap"| node_pocket
node_driver -->|"merges metadata"| node_metadata
node_driver -->|"integrates results"| node_results
node_nextflow -->|"merges results"| node_results
node_results -->|"exports table"| node_output
node_services -.->|"supplies references"| node_databases

click node_config "https://github.com/mcpalumbo/fasttarget/blob/main/configuration.py"
click node_driver "https://github.com/mcpalumbo/fasttarget/blob/main/fasttarget.py"
click node_nextflow "https://github.com/mcpalumbo/fasttarget/blob/main/nextflow/workflows/fasttarget.nf"
click node_dbmgr "https://github.com/mcpalumbo/fasttarget/blob/main/databases.py"
click node_databases "https://github.com/mcpalumbo/fasttarget/tree/main/databases"
click node_genomeprep "https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/genome.py"
click node_derep "https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/dereplication.py"
click node_metadata "https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/metadata.py"
click node_conservation "https://github.com/mcpalumbo/fasttarget/tree/main/nextflow/modules"
click node_metabolism "https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/pathways.py"
click node_functional "https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/functional_annotations.py"
click node_essentiality "https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/essentiality.py"
click node_localization "https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/genome.py"
click node_structures "https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/structures.py"
click node_alphafill "https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/alphafill.py"
click node_chembl "https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/chembl.py"
click node_bindingdb "https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/bindingdb.py"
click node_offtargets "https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/offtargets.py"
click node_microbiome "https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/microbiome_catalogues.py"
click node_pocket "https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/pocket_overlap.py"
click node_results "https://github.com/mcpalumbo/fasttarget/blob/main/nextflow/modules/merge_final_results.nf"
click node_output "https://github.com/mcpalumbo/fasttarget/tree/main/organism"

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_config,node_driver,node_nextflow,node_dbmgr,node_databases,node_user toneBlue
class node_genomeprep,node_derep,node_metadata toneAmber
class node_conservation,node_metabolism,node_functional,node_essentiality,node_localization,node_structures,node_alphafill,node_chembl,node_bindingdb,node_offtargets,node_microbiome,node_pocket toneMint
class node_results,node_output toneRose
class node_services toneIndigo
```

## Components

### Execution and setup

- [Configuration](https://github.com/mcpalumbo/fasttarget/blob/main/configuration.py): `configuration.py`
- [Python driver](https://github.com/mcpalumbo/fasttarget/blob/main/fasttarget.py): `fasttarget.py`
- [Nextflow workflow](https://github.com/mcpalumbo/fasttarget/blob/main/nextflow/workflows/fasttarget.nf): `nextflow/workflows/fasttarget.nf`
- [Database preparation](https://github.com/mcpalumbo/fasttarget/blob/main/databases.py): `databases.py`
- [Reference databases](https://github.com/mcpalumbo/fasttarget/tree/main/databases): `databases`

### Genome evidence

- [Genome preparation](https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/genome.py): `ftscripts/genome.py`
- [Genome dereplication](https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/dereplication.py): `ftscripts/dereplication.py`
- [Gene metadata](https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/metadata.py): `ftscripts/metadata.py`

### Target analyses

- [Core conservation](https://github.com/mcpalumbo/fasttarget/tree/main/nextflow/modules): `nextflow/modules`
- [Metabolic pathways](https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/pathways.py): `ftscripts/pathways.py`
- [Functional annotation](https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/functional_annotations.py): `ftscripts/functional_annotations.py`
- [Essentiality screening](https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/essentiality.py): `ftscripts/essentiality.py`
- [Protein localization](https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/genome.py): `ftscripts/genome.py`
- [Structure analysis](https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/structures.py): `ftscripts/structures.py`
- [AlphaFill ligands](https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/alphafill.py): `ftscripts/alphafill.py`
- [ChEMBL ligands](https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/chembl.py): `ftscripts/chembl.py`
- [BindingDB ligands](https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/bindingdb.py): `ftscripts/bindingdb.py`
- [Off-target screening](https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/offtargets.py): `ftscripts/offtargets.py`
- [Microbiome catalogues](https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/microbiome_catalogues.py): `ftscripts/microbiome_catalogues.py`
- [Pocket overlap](https://github.com/mcpalumbo/fasttarget/blob/main/ftscripts/pocket_overlap.py): `ftscripts/pocket_overlap.py`

### Integration and output

- [Results integration](https://github.com/mcpalumbo/fasttarget/blob/main/nextflow/modules/merge_final_results.nf): `nextflow/modules/merge_final_results.nf`
- [Results table](https://github.com/mcpalumbo/fasttarget/tree/main/organism): `organism`

### Other components

- **Pipeline user**
- **External bioinformatics sources**

## Connections

- Pipeline user → Configuration: configures (evidence: `README.md`)
- Pipeline user → Python driver: runs locally (evidence: `README.md`)
- Pipeline user → Nextflow workflow: runs on HPC (evidence: `README.md`)
- Pipeline user → Database preparation: downloads databases (evidence: `README.md`)
- Database preparation → Reference databases: prepares (evidence: `README.md`)
- Configuration → Python driver: configures (evidence: `README.md`)
- Python driver → Genome preparation: prepares genome (evidence: `README.md`)
- Python driver → Genome dereplication: selects genomes (evidence: `fasttarget.py`)
- Python driver → Core conservation: runs (evidence: `README.md`)
- Python driver → Metabolic pathways: runs (evidence: `README.md`)
- Python driver → Essentiality screening: checks essentiality (evidence: `README.md`)
- Python driver → Protein localization: predicts localization (evidence: `README.md`)
- Python driver → Structure analysis: analyzes structures (evidence: `README.md`)
- Python driver → Off-target screening: screens off-targets (evidence: `README.md`)
- Python driver → Functional annotation: annotates metabolism (evidence: `fasttarget.py`)
- Python driver → AlphaFill ligands: runs ligand analysis (evidence: `fasttarget.py`)
- Python driver → ChEMBL ligands: runs ligand search (evidence: `fasttarget.py`)
- Python driver → BindingDB ligands: runs ligand search (evidence: `fasttarget.py`)
- Off-target screening → Microbiome catalogues: uses catalogues (evidence: `ftscripts/offtargets.py`)
- Python driver → Pocket overlap: analyzes pocket overlap (evidence: `README.md`)
- Python driver → Gene metadata: merges metadata (evidence: `README.md`)
- Python driver → Results integration: integrates results (evidence: `README.md`)
- Nextflow workflow → Results integration: merges results (evidence: `README.md`)
- Results integration → Results table: exports table (evidence: `README.md`)
- External bioinformatics sources → Reference databases: supplies references
