# ashwinth2k/bacterial-genome-pipeline architecture

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

- Interactive diagram: https://gitdiagram.com/ashwinth2k/bacterial-genome-pipeline
- Repository: https://github.com/ashwinth2k/bacterial-genome-pipeline

## Overview

This repository provides two implementations of a bacterial whole-genome variant-calling workflow: a linear Bash script and a config-driven Snakemake workflow. Both process reads through QC, trimming, alignment, post-alignment QC, variant calling/filtering, and QC reporting. The README documents the stages and required tools, but no source excerpts were available to verify finer-grained invocation or data wiring.

Main entry points: [`Bash/script.sh`](https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Bash/script.sh) (Variant calling), [`Snakemake/Snakefile`](https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Snakemake/Snakefile) (Variant calling), [`Snakemake/config.yml`](https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Snakemake/config.yml) (Workflow config)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_bash["Bash workflow"]
  node_bash_runner["Bash pipeline<br/>[script.sh]"]
  node_bash_raw_qc["Raw read QC<br/>[script.sh]"]
  node_bash_trim["Read trimming<br/>[script.sh]"]
  node_bash_align["Read alignment<br/>[script.sh]"]
  node_bash_post_qc["Post-alignment QC<br/>[script.sh]"]
  node_bash_variants["Variant calling<br/>[script.sh]"]
  node_bash_report["QC summary<br/>[script.sh]"]
end

subgraph group_snakemake["Snakemake workflow"]
  node_snake_runner["Snakemake pipeline"]
  node_snake_raw_qc["Raw read QC"]
  node_snake_trim["Read trimming"]
  node_snake_align["Read alignment"]
  node_snake_post_qc["Post-alignment QC"]
  node_snake_variants["Variant calling"]
  node_snake_report["QC summary"]
  node_config["Workflow config<br/>[config.yml]"]
end

subgraph group_analysis["Analysis tools"]
  node_fastqc["FastQC"]
  node_trimmomatic["Trimmomatic"]
  node_bwa["BWA"]
  node_samtools["Samtools"]
  node_bcftools["BCFtools"]
  node_multiqc["MultiQC"]
end

subgraph group_results["Pipeline outputs"]
  node_variants["Filtered variants"]
  node_summary["QC report"]
end

node_reads["Raw reads"]
node_reference["E. coli reference"]

node_reads -->|"input"| node_bash_runner
node_reference -->|"reference"| node_bash_runner
node_bash_runner -->|"runs"| node_bash_raw_qc
node_bash_raw_qc -->|"then"| node_bash_trim
node_bash_trim -->|"then"| node_bash_align
node_bash_align -->|"then"| node_bash_post_qc
node_bash_post_qc -->|"then"| node_bash_variants
node_bash_variants -->|"then"| node_bash_report
node_bash_raw_qc -->|"uses"| node_fastqc
node_bash_trim -->|"uses"| node_trimmomatic
node_bash_align -->|"uses"| node_bwa
node_bash_post_qc -->|"uses"| node_samtools
node_bash_variants -->|"uses"| node_bcftools
node_bash_report -->|"uses"| node_multiqc
node_bash_variants -->|"produces"| node_variants
node_bash_report -->|"produces"| node_summary
node_reads -->|"input"| node_snake_runner
node_reference -->|"reference"| node_snake_runner
node_config -->|"configures"| node_snake_runner
node_snake_runner -->|"runs"| node_snake_raw_qc
node_snake_raw_qc -->|"then"| node_snake_trim
node_snake_trim -->|"then"| node_snake_align
node_snake_align -->|"then"| node_snake_post_qc
node_snake_post_qc -->|"then"| node_snake_variants
node_snake_variants -->|"then"| node_snake_report
node_snake_raw_qc -->|"uses"| node_fastqc
node_snake_trim -->|"uses"| node_trimmomatic
node_snake_align -->|"uses"| node_bwa
node_snake_post_qc -->|"uses"| node_samtools
node_snake_variants -->|"uses"| node_bcftools
node_snake_report -->|"uses"| node_multiqc
node_snake_variants -->|"produces"| node_variants
node_snake_report -->|"produces"| node_summary

click node_bash_runner "https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Bash/script.sh"
click node_bash_raw_qc "https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Bash/script.sh"
click node_bash_trim "https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Bash/script.sh"
click node_bash_align "https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Bash/script.sh"
click node_bash_post_qc "https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Bash/script.sh"
click node_bash_variants "https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Bash/script.sh"
click node_bash_report "https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Bash/script.sh"
click node_snake_runner "https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Snakemake/Snakefile"
click node_snake_raw_qc "https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Snakemake/Snakefile"
click node_snake_trim "https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Snakemake/Snakefile"
click node_snake_align "https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Snakemake/Snakefile"
click node_snake_post_qc "https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Snakemake/Snakefile"
click node_snake_variants "https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Snakemake/Snakefile"
click node_snake_report "https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Snakemake/Snakefile"
click node_config "https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Snakemake/config.yml"

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_bash_runner,node_bash_raw_qc,node_bash_trim,node_bash_align,node_bash_post_qc,node_bash_variants,node_bash_report toneBlue
class node_snake_runner,node_snake_raw_qc,node_snake_trim,node_snake_align,node_snake_post_qc,node_snake_variants,node_snake_report,node_config toneAmber
class node_fastqc,node_trimmomatic,node_bwa,node_samtools,node_bcftools,node_multiqc toneMint
class node_variants,node_summary toneRose
class node_reads,node_reference toneIndigo
```

## Components

### Bash workflow

- [Bash pipeline](https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Bash/script.sh): `Bash/script.sh`
- [Raw read QC](https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Bash/script.sh): `Bash/script.sh`
- [Read trimming](https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Bash/script.sh): `Bash/script.sh`
- [Read alignment](https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Bash/script.sh): `Bash/script.sh`
- [Post-alignment QC](https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Bash/script.sh): `Bash/script.sh`
- [Variant calling](https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Bash/script.sh): `Bash/script.sh`
- [QC summary](https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Bash/script.sh): `Bash/script.sh`

### Snakemake workflow

- [Snakemake pipeline](https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Snakemake/Snakefile): `Snakemake/Snakefile`
- [Raw read QC](https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Snakemake/Snakefile): `Snakemake/Snakefile`
- [Read trimming](https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Snakemake/Snakefile): `Snakemake/Snakefile`
- [Read alignment](https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Snakemake/Snakefile): `Snakemake/Snakefile`
- [Post-alignment QC](https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Snakemake/Snakefile): `Snakemake/Snakefile`
- [Variant calling](https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Snakemake/Snakefile): `Snakemake/Snakefile`
- [QC summary](https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Snakemake/Snakefile): `Snakemake/Snakefile`
- [Workflow config](https://github.com/ashwinth2k/bacterial-genome-pipeline/blob/main/Snakemake/config.yml): `Snakemake/config.yml`

### Analysis tools

- **FastQC**
- **Trimmomatic**
- **BWA**
- **Samtools**
- **BCFtools**
- **MultiQC**

### Pipeline outputs

- **Filtered variants**
- **QC report**

### Other components

- **Raw reads**
- **E. coli reference**

## Connections

- Raw reads → Bash pipeline: input
- E. coli reference → Bash pipeline: reference
- Bash pipeline → Raw read QC: runs
- Raw read QC → Read trimming: then
- Read trimming → Read alignment: then
- Read alignment → Post-alignment QC: then
- Post-alignment QC → Variant calling: then
- Variant calling → QC summary: then
- Raw read QC → FastQC: uses
- Read trimming → Trimmomatic: uses
- Read alignment → BWA: uses
- Post-alignment QC → Samtools: uses
- Variant calling → BCFtools: uses
- QC summary → MultiQC: uses
- Variant calling → Filtered variants: produces
- QC summary → QC report: produces
- Raw reads → Snakemake pipeline: input
- E. coli reference → Snakemake pipeline: reference
- Workflow config → Snakemake pipeline: configures
- Snakemake pipeline → Raw read QC: runs
- Raw read QC → Read trimming: then
- Read trimming → Read alignment: then
- Read alignment → Post-alignment QC: then
- Post-alignment QC → Variant calling: then
- Variant calling → QC summary: then
- Raw read QC → FastQC: uses
- Read trimming → Trimmomatic: uses
- Read alignment → BWA: uses
- Post-alignment QC → Samtools: uses
- Variant calling → BCFtools: uses
- QC summary → MultiQC: uses
- Variant calling → Filtered variants: produces
- QC summary → QC report: produces
