# cidgoh/bacpaq architecture

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

- Interactive diagram: https://gitdiagram.com/cidgoh/bacpaq
- Repository: https://github.com/cidgoh/bacpaq

## Overview

BACPAQ is a Nextflow pipeline for bacterial whole-genome sequencing analysis of Illumina and Oxford Nanopore reads. Its documented user-to-result path spans read quality control, taxonomy and de-hosting, assembly and assembly quality assessment, then annotation and antimicrobial-resistance analysis. The graph preserves these domain stages and the samplesheet validator. Workflow relationships are based on the README; workflow source was not sampled, so the diagram does not assert additional implementation-level calls.

Main entry points: [`main.nf`](https://github.com/cidgoh/bacpaq/blob/master/main.nf) (BACPAQ pipeline), [`workflows`](https://github.com/cidgoh/bacpaq/tree/master/workflows) (Raw-read QC), [`modules/nf-core`](https://github.com/cidgoh/bacpaq/tree/master/modules/nf-core) (Read QC tools)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Pipeline"]
  node_pipeline["BACPAQ pipeline<br/>[main.nf]"]
  node_samplesheet["Samplesheet validation"]
end

subgraph group_readqc["Read QC"]
  node_rawqc["Raw-read QC"]
  node_taxonomy["Taxonomy QC"]
  node_qc_tools["Read QC tools"]
  node_taxonomy_tools["Classification tools"]
end

subgraph group_assembly["Assembly QC"]
  node_assembly_workflow["Genome assembly"]
  node_assembly_qc["Assembly assessment"]
  node_assembly_tools["Assembly tools"]
  node_assembly_assessment_tools["Assembly QC tools"]
end

subgraph group_annotation["Annotation"]
  node_gene_prediction["Gene prediction"]
  node_annotation_tools["Annotation tools"]
end

subgraph group_amr["AMR Analysis"]
  node_amr_workflow["AMR detection"]
  node_amr_tools["AMR tools"]
end

node_user(("Sequencing user"))

node_user -->|"runs"| node_pipeline
node_pipeline -->|"runs QC"| node_rawqc
node_pipeline -->|"runs classification"| node_taxonomy
node_pipeline -->|"runs assembly"| node_assembly_workflow
node_pipeline -->|"runs assessment"| node_assembly_qc
node_pipeline -->|"runs prediction"| node_gene_prediction
node_pipeline -->|"runs AMR"| node_amr_workflow
node_rawqc -->|"uses"| node_qc_tools
node_taxonomy -->|"uses"| node_taxonomy_tools
node_assembly_workflow -->|"uses"| node_assembly_tools
node_assembly_qc -->|"uses"| node_assembly_assessment_tools
node_gene_prediction -->|"uses"| node_annotation_tools
node_amr_workflow -->|"uses"| node_amr_tools

click node_pipeline "https://github.com/cidgoh/bacpaq/blob/master/main.nf"
click node_samplesheet "https://github.com/cidgoh/bacpaq/blob/master/bin/check_samplesheet.py"
click node_rawqc "https://github.com/cidgoh/bacpaq/tree/master/workflows"
click node_taxonomy "https://github.com/cidgoh/bacpaq/tree/master/workflows"
click node_assembly_workflow "https://github.com/cidgoh/bacpaq/tree/master/workflows"
click node_assembly_qc "https://github.com/cidgoh/bacpaq/tree/master/workflows"
click node_gene_prediction "https://github.com/cidgoh/bacpaq/tree/master/workflows"
click node_amr_workflow "https://github.com/cidgoh/bacpaq/tree/master/workflows"
click node_qc_tools "https://github.com/cidgoh/bacpaq/tree/master/modules/nf-core"
click node_taxonomy_tools "https://github.com/cidgoh/bacpaq/tree/master/modules/nf-core"
click node_assembly_tools "https://github.com/cidgoh/bacpaq/tree/master/modules/nf-core"
click node_assembly_assessment_tools "https://github.com/cidgoh/bacpaq/tree/master/modules/nf-core"
click node_annotation_tools "https://github.com/cidgoh/bacpaq/tree/master/modules/nf-core"
click node_amr_tools "https://github.com/cidgoh/bacpaq/tree/master/modules/nf-core"

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_pipeline,node_samplesheet,node_user toneBlue
class node_rawqc,node_taxonomy,node_qc_tools,node_taxonomy_tools toneAmber
class node_assembly_workflow,node_assembly_qc,node_assembly_tools,node_assembly_assessment_tools toneMint
class node_gene_prediction,node_annotation_tools toneRose
class node_amr_workflow,node_amr_tools toneIndigo
```

## Components

### Pipeline

- [BACPAQ pipeline](https://github.com/cidgoh/bacpaq/blob/master/main.nf): `main.nf`
- [Samplesheet validation](https://github.com/cidgoh/bacpaq/blob/master/bin/check_samplesheet.py): `bin/check_samplesheet.py`

### Read QC

- [Raw-read QC](https://github.com/cidgoh/bacpaq/tree/master/workflows): `workflows`
- [Taxonomy QC](https://github.com/cidgoh/bacpaq/tree/master/workflows): `workflows`
- [Read QC tools](https://github.com/cidgoh/bacpaq/tree/master/modules/nf-core): `modules/nf-core`
- [Classification tools](https://github.com/cidgoh/bacpaq/tree/master/modules/nf-core): `modules/nf-core`

### Assembly QC

- [Genome assembly](https://github.com/cidgoh/bacpaq/tree/master/workflows): `workflows`
- [Assembly assessment](https://github.com/cidgoh/bacpaq/tree/master/workflows): `workflows`
- [Assembly tools](https://github.com/cidgoh/bacpaq/tree/master/modules/nf-core): `modules/nf-core`
- [Assembly QC tools](https://github.com/cidgoh/bacpaq/tree/master/modules/nf-core): `modules/nf-core`

### Annotation

- [Gene prediction](https://github.com/cidgoh/bacpaq/tree/master/workflows): `workflows`
- [Annotation tools](https://github.com/cidgoh/bacpaq/tree/master/modules/nf-core): `modules/nf-core`

### AMR Analysis

- [AMR detection](https://github.com/cidgoh/bacpaq/tree/master/workflows): `workflows`
- [AMR tools](https://github.com/cidgoh/bacpaq/tree/master/modules/nf-core): `modules/nf-core`

### Other components

- **Sequencing user**

## Connections

- Sequencing user → BACPAQ pipeline: runs (evidence: `README.md`)
- BACPAQ pipeline → Raw-read QC: runs QC (evidence: `README.md`)
- BACPAQ pipeline → Taxonomy QC: runs classification (evidence: `README.md`)
- BACPAQ pipeline → Genome assembly: runs assembly (evidence: `README.md`)
- BACPAQ pipeline → Assembly assessment: runs assessment (evidence: `README.md`)
- BACPAQ pipeline → Gene prediction: runs prediction (evidence: `README.md`)
- BACPAQ pipeline → AMR detection: runs AMR (evidence: `README.md`)
- Raw-read QC → Read QC tools: uses (evidence: `README.md`)
- Taxonomy QC → Classification tools: uses (evidence: `README.md`)
- Genome assembly → Assembly tools: uses (evidence: `README.md`)
- Assembly assessment → Assembly QC tools: uses (evidence: `README.md`)
- Gene prediction → Annotation tools: uses (evidence: `README.md`)
- AMR detection → AMR tools: uses (evidence: `README.md`)
