# tseemann/snippy architecture

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

- Interactive diagram: https://gitdiagram.com/tseemann/snippy
- Repository: https://github.com/tseemann/snippy

## Overview

Snippy’s main workflow takes a reference genome and sequencing reads, calls and annotates haploid variants, and writes per-sample results. Those results can feed snippy-core to produce a core SNP alignment. The README also documents optional detailed VCF reporting and several output formats. Source excerpts were unavailable, so relationships below rely on README statements; implementation details and links for other command-line utilities are not inferred.

Main entry points: [`bin/snippy`](https://github.com/tseemann/snippy/blob/master/bin/snippy) (Snippy caller), [`bin/snippy-core`](https://github.com/tseemann/snippy/blob/master/bin/snippy-core) (Core SNP analysis), [`bin/snippy-vcf_report`](https://github.com/tseemann/snippy/blob/master/bin/snippy-vcf_report) (VCF report)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_calling["Variant calling"]
  node_snippy["Snippy caller"]
  node_freebayes["Freebayes"]
  node_snpeff["snpEff annotation"]
end

subgraph group_outputs["Sample outputs"]
  node_samplefiles["Sample result files"]
end

subgraph group_comparative["Core analysis"]
  node_core["Core SNP analysis"]
  node_corefiles["Core alignment outputs"]
end

subgraph group_utilities["VCF utilities"]
  node_vcfreport["VCF report"]
  node_vcfextract["VCF substitution extraction"]
  node_vcftab["VCF to tab"]
  node_fasta2bed["FASTA to BED"]
  node_cleanaln["Alignment cleanup"]
  node_multi["Multi-sample runner"]
end

node_researcher(("Researcher"))
node_reference["Reference genome"]
node_reads["Sequencing reads"]

node_researcher -->|"runs"| node_snippy
node_reference -->|"provides reference"| node_snippy
node_reads -->|"provides reads"| node_snippy
node_snippy -->|"calls variants"| node_freebayes
node_snippy -->|"annotates consequences"| node_snpeff
node_snippy -->|"writes results"| node_samplefiles
node_researcher -->|"runs"| node_core
node_samplefiles -->|"provides results"| node_core
node_core -->|"writes alignment"| node_corefiles
node_snippy -->|"runs with report option"| node_vcfreport

click node_snippy "https://github.com/tseemann/snippy/blob/master/bin/snippy"
click node_core "https://github.com/tseemann/snippy/blob/master/bin/snippy-core"
click node_vcfreport "https://github.com/tseemann/snippy/blob/master/bin/snippy-vcf_report"
click node_vcfextract "https://github.com/tseemann/snippy/blob/master/bin/snippy-vcf_extract_subs"
click node_vcftab "https://github.com/tseemann/snippy/blob/master/bin/snippy-vcf_to_tab"
click node_fasta2bed "https://github.com/tseemann/snippy/blob/master/bin/snippy-fasta_to_bed"
click node_cleanaln "https://github.com/tseemann/snippy/blob/master/bin/snippy-clean_full_aln"
click node_multi "https://github.com/tseemann/snippy/blob/master/bin/snippy-multi"

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_snippy,node_freebayes,node_snpeff toneBlue
class node_samplefiles toneAmber
class node_core,node_corefiles toneMint
class node_vcfreport,node_vcfextract,node_vcftab,node_fasta2bed,node_cleanaln,node_multi toneRose
class node_researcher,node_reference,node_reads toneIndigo
```

## Components

### Variant calling

- [Snippy caller](https://github.com/tseemann/snippy/blob/master/bin/snippy): `bin/snippy`
- **Freebayes**
- **snpEff annotation**

### Sample outputs

- **Sample result files**

### Core analysis

- [Core SNP analysis](https://github.com/tseemann/snippy/blob/master/bin/snippy-core): `bin/snippy-core`
- **Core alignment outputs**

### VCF utilities

- [VCF report](https://github.com/tseemann/snippy/blob/master/bin/snippy-vcf_report): `bin/snippy-vcf_report`
- [VCF substitution extraction](https://github.com/tseemann/snippy/blob/master/bin/snippy-vcf_extract_subs): `bin/snippy-vcf_extract_subs`
- [VCF to tab](https://github.com/tseemann/snippy/blob/master/bin/snippy-vcf_to_tab): `bin/snippy-vcf_to_tab`
- [FASTA to BED](https://github.com/tseemann/snippy/blob/master/bin/snippy-fasta_to_bed): `bin/snippy-fasta_to_bed`
- [Alignment cleanup](https://github.com/tseemann/snippy/blob/master/bin/snippy-clean_full_aln): `bin/snippy-clean_full_aln`
- [Multi-sample runner](https://github.com/tseemann/snippy/blob/master/bin/snippy-multi): `bin/snippy-multi`

### Other components

- **Researcher**
- **Reference genome**
- **Sequencing reads**

## Connections

- Researcher → Snippy caller: runs (evidence: `README.md`)
- Reference genome → Snippy caller: provides reference (evidence: `README.md`)
- Sequencing reads → Snippy caller: provides reads (evidence: `README.md`)
- Snippy caller → Freebayes: calls variants (evidence: `README.md`)
- Snippy caller → snpEff annotation: annotates consequences (evidence: `README.md`)
- Snippy caller → Sample result files: writes results (evidence: `README.md`)
- Researcher → Core SNP analysis: runs (evidence: `README.md`)
- Sample result files → Core SNP analysis: provides results (evidence: `README.md`)
- Core SNP analysis → Core alignment outputs: writes alignment (evidence: `README.md`)
- Snippy caller → VCF report: runs with report option (evidence: `README.md`)
