# mher1369/mini_project_bfp architecture

> Architecture diagram of the GitHub repository mher1369/mini_project_bfp, 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/mher1369/mini_project_bfp
- Repository: https://github.com/mher1369/mini_project_bfp

## Overview

BioForge is a command-line DNA-to-protein analysis pipeline. A user supplies a FASTA file and filtering thresholds; the application parses records, detects ORFs on both strands, translates them, filters proteins by length and molecular weight, and writes a report. The graph also shows sequence utilities, translation data, and shared logging/error support. Translation internals and their data-file loading are represented from the tree and main’s references, but their implementation was not sampled.

Main entry points: [`main.py`](https://github.com/mher1369/mini_project_bfp/blob/main/main.py) (Pipeline runner), [`Error_and_Logging/errors.py`](https://github.com/mher1369/mini_project_bfp/blob/main/Error_and_Logging/errors.py) (Domain errors), [`Filters/protein_filters.py`](https://github.com/mher1369/mini_project_bfp/blob/main/Filters/protein_filters.py) (Protein filters), [`Fasta/fasta.py`](https://github.com/mher1369/mini_project_bfp/blob/main/Fasta/fasta.py) (FASTA parsing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Pipeline workflow"]
  node_main["Pipeline runner<br/>[main.py]"]
  node_filters["Protein filters<br/>[protein_filters.py]"]
end

subgraph group_biology["Sequence analysis"]
  node_fasta["FASTA parsing<br/>[fasta.py]"]
  node_sequence_utils["Sequence utilities<br/>[fasta.py]"]
  node_forward["Forward ORFs<br/>[forward_strand.py]"]
  node_reverse["Reverse ORFs<br/>[reverse_strand.py]"]
  node_orf_model["ORF model<br/>[ORF.py]"]
  node_translator["Protein translation"]
end

subgraph group_support["Shared support"]
  node_logger["Logging setup<br/>[logger_config.py]"]
  node_errors["Domain errors<br/>[errors.py]"]
end

subgraph group_results["Results and data"]
  node_translation_data["Translation tables"]
  node_report["Analysis report<br/>[report.txt]"]
end

node_user(("User"))

node_user -->|"provides inputs"| node_main
node_main -->|"configures logging"| node_logger
node_main -->|"parses records"| node_fasta
node_main -->|"prepares sequences"| node_sequence_utils
node_main -->|"detects forward"| node_forward
node_main -->|"detects reverse"| node_reverse
node_forward -->|"creates ORFs"| node_orf_model
node_reverse -->|"creates ORFs"| node_orf_model
node_main -->|"translates ORFs"| node_translator
node_main -.->|"loads tables"| node_translation_data
node_translator -.->|"uses tables"| node_translation_data
node_main -->|"filters proteins"| node_filters
node_main -->|"writes report"| node_report
node_main -->|"handles exceptions"| node_errors
node_fasta -->|"raises validation errors"| node_errors
node_filters -->|"raises data errors"| node_errors

click node_main "https://github.com/mher1369/mini_project_bfp/blob/main/main.py"
click node_fasta "https://github.com/mher1369/mini_project_bfp/blob/main/Fasta/fasta.py"
click node_sequence_utils "https://github.com/mher1369/mini_project_bfp/blob/main/Fasta/fasta.py"
click node_forward "https://github.com/mher1369/mini_project_bfp/blob/main/ORF/forward_strand.py"
click node_reverse "https://github.com/mher1369/mini_project_bfp/blob/main/ORF/reverse_strand.py"
click node_orf_model "https://github.com/mher1369/mini_project_bfp/blob/main/ORF/ORF.py"
click node_translator "https://github.com/mher1369/mini_project_bfp/blob/main/Translation/protein_translation.py"
click node_filters "https://github.com/mher1369/mini_project_bfp/blob/main/Filters/protein_filters.py"
click node_logger "https://github.com/mher1369/mini_project_bfp/blob/main/Error_and_Logging/logger_config.py"
click node_errors "https://github.com/mher1369/mini_project_bfp/blob/main/Error_and_Logging/errors.py"
click node_translation_data "https://github.com/mher1369/mini_project_bfp/tree/main/BioForge/data"
click node_report "https://github.com/mher1369/mini_project_bfp/blob/main/Output/report.txt"

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_filters,node_user toneBlue
class node_fasta,node_sequence_utils,node_forward,node_reverse,node_orf_model,node_translator toneAmber
class node_logger,node_errors toneMint
class node_translation_data,node_report toneRose
```

## Components

### Pipeline workflow

- [Pipeline runner](https://github.com/mher1369/mini_project_bfp/blob/main/main.py): `main.py`
- [Protein filters](https://github.com/mher1369/mini_project_bfp/blob/main/Filters/protein_filters.py): `Filters/protein_filters.py`

### Sequence analysis

- [FASTA parsing](https://github.com/mher1369/mini_project_bfp/blob/main/Fasta/fasta.py): `Fasta/fasta.py`
- [Sequence utilities](https://github.com/mher1369/mini_project_bfp/blob/main/Fasta/fasta.py): `Fasta/fasta.py`
- [Forward ORFs](https://github.com/mher1369/mini_project_bfp/blob/main/ORF/forward_strand.py): `ORF/forward_strand.py`
- [Reverse ORFs](https://github.com/mher1369/mini_project_bfp/blob/main/ORF/reverse_strand.py): `ORF/reverse_strand.py`
- [ORF model](https://github.com/mher1369/mini_project_bfp/blob/main/ORF/ORF.py): `ORF/ORF.py`
- [Protein translation](https://github.com/mher1369/mini_project_bfp/blob/main/Translation/protein_translation.py): `Translation/protein_translation.py`

### Shared support

- [Logging setup](https://github.com/mher1369/mini_project_bfp/blob/main/Error_and_Logging/logger_config.py): `Error_and_Logging/logger_config.py`
- [Domain errors](https://github.com/mher1369/mini_project_bfp/blob/main/Error_and_Logging/errors.py): `Error_and_Logging/errors.py`

### Results and data

- [Translation tables](https://github.com/mher1369/mini_project_bfp/tree/main/BioForge/data): `BioForge/data`
- [Analysis report](https://github.com/mher1369/mini_project_bfp/blob/main/Output/report.txt): `Output/report.txt`

### Other components

- **User**

## Connections

- User → Pipeline runner: provides inputs (evidence: `main.py`)
- Pipeline runner → Logging setup: configures logging (evidence: `main.py`)
- Pipeline runner → FASTA parsing: parses records (evidence: `main.py`)
- Pipeline runner → Sequence utilities: prepares sequences (evidence: `main.py`)
- Pipeline runner → Forward ORFs: detects forward (evidence: `main.py`)
- Pipeline runner → Reverse ORFs: detects reverse (evidence: `main.py`)
- Forward ORFs → ORF model: creates ORFs (evidence: `ORF/forward_strand.py`)
- Reverse ORFs → ORF model: creates ORFs (evidence: `ORF/reverse_strand.py`)
- Pipeline runner → Protein translation: translates ORFs (evidence: `main.py`)
- Pipeline runner → Translation tables: loads tables
- Protein translation → Translation tables: uses tables
- Pipeline runner → Protein filters: filters proteins (evidence: `main.py`)
- Pipeline runner → Analysis report: writes report (evidence: `main.py`)
- Pipeline runner → Domain errors: handles exceptions (evidence: `main.py`)
- FASTA parsing → Domain errors: raises validation errors (evidence: `Fasta/fasta.py`)
- Protein filters → Domain errors: raises data errors (evidence: `Filters/protein_filters.py`)
