# titiianna/bioforge architecture

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

- Interactive diagram: https://gitdiagram.com/titiianna/bioforge
- Repository: https://github.com/titiianna/bioforge

## Overview

BioForge is a command-line DNA sequence processor. Its main workflow reads FASTA records, validates DNA, detects and translates ORFs across six reading frames, filters and annotates results, then writes a report and logs execution. The graph reflects the calls visible in the excerpts and documented capabilities; resource-file loading is shown as data flow, while the README describes annotation and reporting behavior beyond the sampled implementation details.

Main entry points: [`main.py`](https://github.com/titiianna/bioforge/blob/main/main.py) (Run coordinator), [`pipeline.py`](https://github.com/titiianna/bioforge/blob/main/pipeline.py) (ORF pipeline), [`parsers.py`](https://github.com/titiianna/bioforge/blob/main/parsers.py) (FASTA parser), [`models.py`](https://github.com/titiianna/bioforge/blob/main/models.py) (Data loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI orchestration"]
  node_main["Run coordinator<br/>[main.py]"]
end

subgraph group_sequence["Sequence processing"]
  node_parser["FASTA parser<br/>[parsers.py]"]
  node_dna["DNA validation<br/>[models.py]"]
  node_orf["ORF pipeline<br/>[pipeline.py]"]
  node_filters["ORF filters<br/>[filters.py]"]
end

subgraph group_resources["Data and errors"]
  node_loader["Data loader<br/>[models.py]"]
  node_codons["Codon table<br/>[codon_table.txt]"]
  node_weights["Amino weights<br/>[amino_weights.txt]"]
  node_errors["Domain errors<br/>[exceptions.py]"]
end

subgraph group_outputs["Results and logging"]
  node_report["Report writer<br/>[report.py]"]
  node_logger["Run logger<br/>[logger.py]"]
end

node_user(("CLI user"))
node_fasta["FASTA input"]
node_reportfile["Report output"]
node_logfile["Log output"]

node_user -->|"invokes"| node_main
node_main -->|"sets up"| node_logger
node_main -->|"loads resources"| node_loader
node_loader -.->|"reads"| node_codons
node_loader -.->|"reads"| node_weights
node_main -->|"parses input"| node_parser
node_fasta -->|"provides records"| node_parser
node_parser -->|"constructs"| node_dna
node_parser -->|"raises"| node_errors
node_dna -->|"raises"| node_errors
node_main -->|"processes records"| node_orf
node_main -->|"configures"| node_filters
node_main -->|"supplies tables"| node_loader
node_orf -->|"converts strands"| node_dna
node_orf -->|"applies"| node_filters
node_orf -->|"raises"| node_errors
node_main -->|"writes results"| node_report
node_report -->|"writes"| node_reportfile
node_main -->|"records events"| node_logger
node_logger -->|"appends"| node_logfile

click node_main "https://github.com/titiianna/bioforge/blob/main/main.py"
click node_parser "https://github.com/titiianna/bioforge/blob/main/parsers.py"
click node_dna "https://github.com/titiianna/bioforge/blob/main/models.py"
click node_orf "https://github.com/titiianna/bioforge/blob/main/pipeline.py"
click node_filters "https://github.com/titiianna/bioforge/blob/main/filters.py"
click node_report "https://github.com/titiianna/bioforge/blob/main/report.py"
click node_logger "https://github.com/titiianna/bioforge/blob/main/logger.py"
click node_loader "https://github.com/titiianna/bioforge/blob/main/models.py"
click node_codons "https://github.com/titiianna/bioforge/blob/main/data/codon_table.txt"
click node_weights "https://github.com/titiianna/bioforge/blob/main/data/amino_weights.txt"
click node_errors "https://github.com/titiianna/bioforge/blob/main/exceptions.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_main,node_user toneBlue
class node_parser,node_dna,node_orf,node_filters toneAmber
class node_loader,node_codons,node_weights,node_errors toneMint
class node_report,node_logger toneRose
class node_fasta,node_reportfile,node_logfile toneIndigo
```

## Components

### CLI orchestration

- [Run coordinator](https://github.com/titiianna/bioforge/blob/main/main.py): `main.py`

### Sequence processing

- [FASTA parser](https://github.com/titiianna/bioforge/blob/main/parsers.py): `parsers.py`
- [DNA validation](https://github.com/titiianna/bioforge/blob/main/models.py): `models.py`
- [ORF pipeline](https://github.com/titiianna/bioforge/blob/main/pipeline.py): `pipeline.py`
- [ORF filters](https://github.com/titiianna/bioforge/blob/main/filters.py): `filters.py`

### Data and errors

- [Data loader](https://github.com/titiianna/bioforge/blob/main/models.py): `models.py`
- [Codon table](https://github.com/titiianna/bioforge/blob/main/data/codon_table.txt): `data/codon_table.txt`
- [Amino weights](https://github.com/titiianna/bioforge/blob/main/data/amino_weights.txt): `data/amino_weights.txt`
- [Domain errors](https://github.com/titiianna/bioforge/blob/main/exceptions.py): `exceptions.py`

### Results and logging

- [Report writer](https://github.com/titiianna/bioforge/blob/main/report.py): `report.py`
- [Run logger](https://github.com/titiianna/bioforge/blob/main/logger.py): `logger.py`

### Other components

- **CLI user**
- **FASTA input**
- **Report output**
- **Log output**

## Connections

- CLI user → Run coordinator: invokes (evidence: `README.md`)
- Run coordinator → Run logger: sets up (evidence: `main.py`)
- Run coordinator → Data loader: loads resources (evidence: `main.py`)
- Data loader → Codon table: reads
- Data loader → Amino weights: reads
- Run coordinator → FASTA parser: parses input (evidence: `main.py`)
- FASTA input → FASTA parser: provides records (evidence: `README.md`)
- FASTA parser → DNA validation: constructs (evidence: `parsers.py`)
- FASTA parser → Domain errors: raises (evidence: `parsers.py`)
- DNA validation → Domain errors: raises (evidence: `models.py`)
- Run coordinator → ORF pipeline: processes records (evidence: `main.py`)
- Run coordinator → ORF filters: configures (evidence: `main.py`)
- Run coordinator → Data loader: supplies tables (evidence: `main.py`)
- ORF pipeline → DNA validation: converts strands (evidence: `pipeline.py`)
- ORF pipeline → ORF filters: applies (evidence: `pipeline.py`)
- ORF pipeline → Domain errors: raises (evidence: `pipeline.py`)
- Run coordinator → Report writer: writes results (evidence: `main.py`)
- Report writer → Report output: writes (evidence: `report.py`)
- Run coordinator → Run logger: records events (evidence: `main.py`)
- Run logger → Log output: appends (evidence: `logger.py`)
