# avans-atls/fluqc architecture

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

- Interactive diagram: https://gitdiagram.com/avans-atls/fluqc
- Repository: https://github.com/avans-atls/fluqc

## Overview

FluQC turns influenza FASTQ samples and a reference database into per-sample QC data, then loads that data into an interactive dashboard. Preprocessing assigns reads and computes summary, mapping, coverage, read-length/quality, and putative-DIP metrics; the dashboard presents these as four documented pages. The sampled CLI and modules show the main orchestration and visualization calls. Some wrapper details are partial, so only visible tool invocations and documented workflow links are shown.

Main entry points: [`fluqc/cli.py`](https://github.com/avans-atls/fluqc/blob/master/fluqc/cli.py) (CLI Workflow), [`fluqc/wrappers.py`](https://github.com/avans-atls/fluqc/blob/master/fluqc/wrappers.py) (Analysis Wrappers), [`fluqc/dashboard/layout.py`](https://github.com/avans-atls/fluqc/blob/master/fluqc/dashboard/layout.py) (Dashboard Pages), [`fluqc/samplepaths.py`](https://github.com/avans-atls/fluqc/blob/master/fluqc/samplepaths.py) (Sample Paths)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_preprocessing["Preprocessing"]
  node_cli["CLI Workflow<br/>[cli.py]"]
  node_samplepaths["Sample Paths<br/>[samplepaths.py]"]
  node_wrappers["Analysis Wrappers<br/>[wrappers.py]"]
  node_assignments["Read Assignment<br/>[wrappers.py]"]
end

subgraph group_metrics["QC Metrics"]
  node_qcdata["QC Data<br/>[figuredata.py]"]
  node_summary["Summary Metrics<br/>[figuredata.py]"]
  node_mapping["Mapping Metrics<br/>[figuredata.py]"]
  node_dip["DIP Estimates<br/>[figuredata.py]"]
  node_samplemetrics["Sample Metrics<br/>[figuredata.py]"]
  node_dashboarddata["Dashboard Data<br/>[cli.py]"]
end

subgraph group_dashboard["Dashboard"]
  node_plotter["Plot Generation<br/>[plotter.py]"]
  node_layout["Dashboard Pages<br/>[layout.py]"]
  node_texts["Page Explanations<br/>[texts.py]"]
end

subgraph group_integrations["External Tools"]
  node_minimap["Minimap2"]
  node_samtools["Samtools"]
  node_seqtk["Seqtk"]
end

node_user(("Operator"))
node_fastq["FASTQ Samples"]
node_reference["Reference Database"]
node_browser(("Local Browser"))

node_user -->|"runs"| node_cli
node_fastq -->|"analyzed by"| node_cli
node_reference -->|"supplied to"| node_cli
node_cli -->|"creates paths"| node_samplepaths
node_cli -->|"runs analysis"| node_wrappers
node_wrappers -->|"maps reads"| node_minimap
node_wrappers -->|"runs coverage"| node_samtools
node_samplepaths -->|"subsamples with"| node_seqtk
node_wrappers -->|"assigns reads"| node_assignments
node_cli -->|"collects results"| node_qcdata
node_cli -->|"appends DIP metrics"| node_dip
node_cli -->|"appends coverage metrics"| node_mapping
node_cli -->|"appends sample metrics"| node_samplemetrics
node_cli -->|"appends summary"| node_summary
node_cli -->|"serializes"| node_dashboarddata
node_dashboarddata -->|"loaded by"| node_cli
node_cli -->|"launches dashboard"| node_layout
node_layout -->|"creates plots"| node_plotter
node_plotter -->|"reads metrics"| node_qcdata
node_layout -->|"uses explanations"| node_texts
node_layout -->|"serves dashboard"| node_browser

click node_cli "https://github.com/avans-atls/fluqc/blob/master/fluqc/cli.py"
click node_samplepaths "https://github.com/avans-atls/fluqc/blob/master/fluqc/samplepaths.py"
click node_wrappers "https://github.com/avans-atls/fluqc/blob/master/fluqc/wrappers.py"
click node_assignments "https://github.com/avans-atls/fluqc/blob/master/fluqc/wrappers.py"
click node_qcdata "https://github.com/avans-atls/fluqc/blob/master/fluqc/figuredata.py"
click node_summary "https://github.com/avans-atls/fluqc/blob/master/fluqc/figuredata.py"
click node_mapping "https://github.com/avans-atls/fluqc/blob/master/fluqc/figuredata.py"
click node_dip "https://github.com/avans-atls/fluqc/blob/master/fluqc/figuredata.py"
click node_samplemetrics "https://github.com/avans-atls/fluqc/blob/master/fluqc/figuredata.py"
click node_dashboarddata "https://github.com/avans-atls/fluqc/blob/master/fluqc/cli.py"
click node_plotter "https://github.com/avans-atls/fluqc/blob/master/fluqc/plotter.py"
click node_layout "https://github.com/avans-atls/fluqc/blob/master/fluqc/dashboard/layout.py"
click node_texts "https://github.com/avans-atls/fluqc/blob/master/fluqc/dashboard/texts.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_cli,node_samplepaths,node_wrappers,node_assignments,node_browser toneBlue
class node_qcdata,node_summary,node_mapping,node_dip,node_samplemetrics,node_dashboarddata,node_reference toneAmber
class node_plotter,node_layout,node_texts toneMint
class node_minimap,node_samtools,node_seqtk toneRose
class node_user,node_fastq toneIndigo
```

## Components

### Preprocessing

- [CLI Workflow](https://github.com/avans-atls/fluqc/blob/master/fluqc/cli.py): `fluqc/cli.py`
- [Sample Paths](https://github.com/avans-atls/fluqc/blob/master/fluqc/samplepaths.py): `fluqc/samplepaths.py`
- [Analysis Wrappers](https://github.com/avans-atls/fluqc/blob/master/fluqc/wrappers.py): `fluqc/wrappers.py`
- [Read Assignment](https://github.com/avans-atls/fluqc/blob/master/fluqc/wrappers.py): `fluqc/wrappers.py`

### QC Metrics

- [QC Data](https://github.com/avans-atls/fluqc/blob/master/fluqc/figuredata.py): `fluqc/figuredata.py`
- [Summary Metrics](https://github.com/avans-atls/fluqc/blob/master/fluqc/figuredata.py): `fluqc/figuredata.py`
- [Mapping Metrics](https://github.com/avans-atls/fluqc/blob/master/fluqc/figuredata.py): `fluqc/figuredata.py`
- [DIP Estimates](https://github.com/avans-atls/fluqc/blob/master/fluqc/figuredata.py): `fluqc/figuredata.py`
- [Sample Metrics](https://github.com/avans-atls/fluqc/blob/master/fluqc/figuredata.py): `fluqc/figuredata.py`
- [Dashboard Data](https://github.com/avans-atls/fluqc/blob/master/fluqc/cli.py): `fluqc/cli.py`

### Dashboard

- [Plot Generation](https://github.com/avans-atls/fluqc/blob/master/fluqc/plotter.py): `fluqc/plotter.py`
- [Dashboard Pages](https://github.com/avans-atls/fluqc/blob/master/fluqc/dashboard/layout.py): `fluqc/dashboard/layout.py`
- [Page Explanations](https://github.com/avans-atls/fluqc/blob/master/fluqc/dashboard/texts.py): `fluqc/dashboard/texts.py`

### External Tools

- **Minimap2**
- **Samtools**
- **Seqtk**

### Other components

- **Operator**
- **FASTQ Samples**
- **Reference Database**
- **Local Browser**

## Connections

- Operator → CLI Workflow: runs (evidence: `README.md`)
- FASTQ Samples → CLI Workflow: analyzed by (evidence: `README.md`)
- Reference Database → CLI Workflow: supplied to (evidence: `README.md`)
- CLI Workflow → Sample Paths: creates paths (evidence: `fluqc/cli.py`)
- CLI Workflow → Analysis Wrappers: runs analysis (evidence: `fluqc/cli.py`)
- Analysis Wrappers → Minimap2: maps reads (evidence: `fluqc/wrappers.py`)
- Analysis Wrappers → Samtools: runs coverage (evidence: `fluqc/wrappers.py`)
- Sample Paths → Seqtk: subsamples with (evidence: `fluqc/samplepaths.py`)
- Analysis Wrappers → Read Assignment: assigns reads (evidence: `fluqc/wrappers.py`)
- CLI Workflow → QC Data: collects results (evidence: `fluqc/cli.py`)
- CLI Workflow → DIP Estimates: appends DIP metrics (evidence: `fluqc/cli.py`)
- CLI Workflow → Mapping Metrics: appends coverage metrics (evidence: `fluqc/cli.py`)
- CLI Workflow → Sample Metrics: appends sample metrics (evidence: `fluqc/cli.py`)
- CLI Workflow → Summary Metrics: appends summary (evidence: `fluqc/cli.py`)
- CLI Workflow → Dashboard Data: serializes (evidence: `fluqc/cli.py`)
- Dashboard Data → CLI Workflow: loaded by (evidence: `fluqc/cli.py`)
- CLI Workflow → Dashboard Pages: launches dashboard (evidence: `fluqc/cli.py`)
- Dashboard Pages → Plot Generation: creates plots (evidence: `fluqc/dashboard/layout.py`)
- Plot Generation → QC Data: reads metrics (evidence: `fluqc/plotter.py`)
- Dashboard Pages → Page Explanations: uses explanations (evidence: `fluqc/dashboard/layout.py`)
- Dashboard Pages → Local Browser: serves dashboard (evidence: `README.md`)
