# tiagobelintani/fasta-loci-checker architecture

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

- Interactive diagram: https://gitdiagram.com/tiagobelintani/fasta-loci-checker
- Repository: https://github.com/tiagobelintani/fasta-loci-checker

## Overview

This is a single-script command-line tool for summarizing sample presence across FASTA loci. The workflow expands file or directory inputs, extracts sample and locus identities while parsing FASTA headers, optionally validates warnings in strict mode, then writes tables and a run report. The README documents additional input formats, extraction modes, and output products. The source excerpt is partial, so relationships are limited to the visible orchestration and documented capabilities.

Main entry points: [`fasta_loci_headers.py`](https://github.com/tiagobelintani/fasta-loci-checker/blob/main/fasta_loci_headers.py) (FASTA parsing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_input["Input discovery"]
  node_expand["Input expansion"]
end

subgraph group_parse["Header parsing"]
  node_parse["FASTA parsing"]
  node_extract["ID extraction"]
  node_validate["Strict validation"]
end

subgraph group_outputs["Summaries and reports"]
  node_summaries["Presence summaries"]
  node_write["Output generation"]
end

node_user(("CLI user"))
node_files["FASTA inputs"]
node_results["Summary files"]

node_user -->|"provides inputs"| node_expand
node_files -->|"scans"| node_expand
node_expand -->|"passes files"| node_parse
node_parse -->|"extracts IDs"| node_extract
node_parse -->|"builds mappings"| node_summaries
node_parse -->|"checks warnings"| node_validate
node_summaries -->|"supplies data"| node_write
node_write -->|"writes tables"| node_results
node_user -->|"chooses output"| node_write

click node_expand "https://github.com/tiagobelintani/fasta-loci-checker/blob/main/fasta_loci_headers.py"
click node_parse "https://github.com/tiagobelintani/fasta-loci-checker/blob/main/fasta_loci_headers.py"
click node_extract "https://github.com/tiagobelintani/fasta-loci-checker/blob/main/fasta_loci_headers.py"
click node_validate "https://github.com/tiagobelintani/fasta-loci-checker/blob/main/fasta_loci_headers.py"
click node_summaries "https://github.com/tiagobelintani/fasta-loci-checker/blob/main/fasta_loci_headers.py"
click node_write "https://github.com/tiagobelintani/fasta-loci-checker/blob/main/fasta_loci_headers.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_expand,node_user toneBlue
class node_parse,node_extract,node_validate toneAmber
class node_summaries,node_write toneMint
class node_files,node_results toneIndigo
```

## Components

### Input discovery

- [Input expansion](https://github.com/tiagobelintani/fasta-loci-checker/blob/main/fasta_loci_headers.py): `fasta_loci_headers.py`

### Header parsing

- [FASTA parsing](https://github.com/tiagobelintani/fasta-loci-checker/blob/main/fasta_loci_headers.py): `fasta_loci_headers.py`
- [ID extraction](https://github.com/tiagobelintani/fasta-loci-checker/blob/main/fasta_loci_headers.py): `fasta_loci_headers.py`
- [Strict validation](https://github.com/tiagobelintani/fasta-loci-checker/blob/main/fasta_loci_headers.py): `fasta_loci_headers.py`

### Summaries and reports

- [Presence summaries](https://github.com/tiagobelintani/fasta-loci-checker/blob/main/fasta_loci_headers.py): `fasta_loci_headers.py`
- [Output generation](https://github.com/tiagobelintani/fasta-loci-checker/blob/main/fasta_loci_headers.py): `fasta_loci_headers.py`

### Other components

- **CLI user**
- **FASTA inputs**
- **Summary files**

## Connections

- CLI user → Input expansion: provides inputs (evidence: `README.md`)
- FASTA inputs → Input expansion: scans (evidence: `README.md`)
- Input expansion → FASTA parsing: passes files (evidence: `fasta_loci_headers.py`)
- FASTA parsing → ID extraction: extracts IDs (evidence: `fasta_loci_headers.py`)
- FASTA parsing → Presence summaries: builds mappings (evidence: `fasta_loci_headers.py`)
- FASTA parsing → Strict validation: checks warnings (evidence: `fasta_loci_headers.py`)
- Presence summaries → Output generation: supplies data (evidence: `fasta_loci_headers.py`)
- Output generation → Summary files: writes tables (evidence: `README.md`)
- CLI user → Output generation: chooses output (evidence: `README.md`)
