# biogrammatics/snapgene_work architecture

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

- Interactive diagram: https://gitdiagram.com/biogrammatics/snapgene_work
- Repository: https://github.com/biogrammatics/snapgene_work

## Overview

This repository is a collection of command-line tools for working with SnapGene plasmid files: generating and parsing `.dna` files, converting Twist synthesis output, exporting sequences to FASTA, and analyzing plasmid features and display settings. The main construct workflow is described as taking Twist CSV data and a backbone `.dna` file to produce a construct `.dna` file; the parser and generator also support standalone file operations. The README is empty, so capabilities and relationships here are based on the provided source excerpts and file tree.

Main entry points: [`twist_to_snapgene.py`](https://github.com/biogrammatics/snapgene_work/blob/main/twist_to_snapgene.py) (Twist converter), [`generate_minimal_dna.py`](https://github.com/biogrammatics/snapgene_work/blob/main/generate_minimal_dna.py) (DNA generator), [`snapgene_to_fasta.py`](https://github.com/biogrammatics/snapgene_work/blob/main/snapgene_to_fasta.py) (FASTA exporter), [`analyze_features.py`](https://github.com/biogrammatics/snapgene_work/blob/main/analyze_features.py) (Feature analyzer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_construct["Construct creation"]
  node_twist_converter["Twist converter"]
end

subgraph group_snapgene["SnapGene files"]
  node_dna_generator["DNA generator"]
  node_dna_parser["DNA parser<br/>[parse_snapgene.py]"]
end

subgraph group_export["Sequence export"]
  node_fasta_exporter["FASTA exporter"]
end

subgraph group_analysis["Plasmid analysis"]
  node_feature_analyzer["Feature analyzer"]
  node_type13_analyzer["Display analyzer<br/>[analyze_type13.py]"]
end

node_twist_csv["Twist CSV"]
node_backbone_dna["Backbone file"]
node_construct_dna["Construct file"]
node_dna_input["SnapGene input"]
node_fasta_file["FASTA output"]
node_analysis_results["Analysis results"]

node_twist_csv -->|"provides input"| node_twist_converter
node_backbone_dna -->|"provides backbone"| node_twist_converter
node_twist_converter -->|"generates"| node_construct_dna
node_dna_input -->|"provides source"| node_dna_generator
node_dna_generator -->|"verifies output"| node_dna_parser
node_dna_input -->|"scans files"| node_fasta_exporter
node_fasta_exporter -->|"writes sequences"| node_fasta_file
node_dna_input -->|"reads files"| node_feature_analyzer
node_feature_analyzer -->|"writes report"| node_analysis_results
node_dna_input -->|"reads files"| node_type13_analyzer
node_type13_analyzer -->|"reports settings"| node_analysis_results

click node_twist_converter "https://github.com/biogrammatics/snapgene_work/blob/main/twist_to_snapgene.py"
click node_dna_generator "https://github.com/biogrammatics/snapgene_work/blob/main/generate_minimal_dna.py"
click node_dna_parser "https://github.com/biogrammatics/snapgene_work/blob/main/parse_snapgene.py"
click node_fasta_exporter "https://github.com/biogrammatics/snapgene_work/blob/main/snapgene_to_fasta.py"
click node_feature_analyzer "https://github.com/biogrammatics/snapgene_work/blob/main/analyze_features.py"
click node_type13_analyzer "https://github.com/biogrammatics/snapgene_work/blob/main/analyze_type13.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_twist_converter toneBlue
class node_dna_generator,node_dna_parser toneAmber
class node_fasta_exporter toneMint
class node_feature_analyzer,node_type13_analyzer toneRose
class node_twist_csv,node_backbone_dna,node_construct_dna,node_dna_input,node_fasta_file,node_analysis_results toneIndigo
```

## Components

### Construct creation

- [Twist converter](https://github.com/biogrammatics/snapgene_work/blob/main/twist_to_snapgene.py): `twist_to_snapgene.py`

### SnapGene files

- [DNA generator](https://github.com/biogrammatics/snapgene_work/blob/main/generate_minimal_dna.py): `generate_minimal_dna.py`
- [DNA parser](https://github.com/biogrammatics/snapgene_work/blob/main/parse_snapgene.py): `parse_snapgene.py`

### Sequence export

- [FASTA exporter](https://github.com/biogrammatics/snapgene_work/blob/main/snapgene_to_fasta.py): `snapgene_to_fasta.py`

### Plasmid analysis

- [Feature analyzer](https://github.com/biogrammatics/snapgene_work/blob/main/analyze_features.py): `analyze_features.py`
- [Display analyzer](https://github.com/biogrammatics/snapgene_work/blob/main/analyze_type13.py): `analyze_type13.py`

### Other components

- **Twist CSV**
- **Backbone file**
- **Construct file**
- **SnapGene input**
- **FASTA output**
- **Analysis results**

## Connections

- Twist CSV → Twist converter: provides input (evidence: `twist_to_snapgene.py`)
- Backbone file → Twist converter: provides backbone (evidence: `twist_to_snapgene.py`)
- Twist converter → Construct file: generates (evidence: `twist_to_snapgene.py`)
- SnapGene input → DNA generator: provides source (evidence: `generate_minimal_dna.py`)
- DNA generator → DNA parser: verifies output (evidence: `generate_minimal_dna.py`)
- SnapGene input → FASTA exporter: scans files (evidence: `snapgene_to_fasta.py`)
- FASTA exporter → FASTA output: writes sequences (evidence: `snapgene_to_fasta.py`)
- SnapGene input → Feature analyzer: reads files (evidence: `analyze_features.py`)
- Feature analyzer → Analysis results: writes report (evidence: `analyze_features.py`)
- SnapGene input → Display analyzer: reads files (evidence: `analyze_type13.py`)
- Display analyzer → Analysis results: reports settings (evidence: `analyze_type13.py`)
