# gszabo-bfx/m_pipeline architecture

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

- Interactive diagram: https://gitdiagram.com/gszabo-bfx/m_pipeline
- Repository: https://github.com/gszabo-bfx/m_pipeline

## Overview

This repository provides a command-line amplicon metagenomics workflow: users supply paired-end Illumina FASTQ files, the control script handles inputs and launches the MOTHUR batch workflow, and the workflow produces abundance and richness tables. A separate Python utility converts a MOTHUR taxonomy summary table into Krona XML. The shell and batch implementations were not sampled, so their internal stages and detailed data flow are not shown; those links reflect README statements.

Main entry points: [`mothur_control.sh`](https://github.com/gszabo-bfx/m_pipeline/blob/main/mothur_control.sh) (Workflow controller), [`mothur_one.batch`](https://github.com/gszabo-bfx/m_pipeline/blob/main/mothur_one.batch) (MOTHUR pipeline), [`mothur_krona_XML_gy.py`](https://github.com/gszabo-bfx/m_pipeline/blob/main/mothur_krona_XML_gy.py) (Krona XML converter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Amplicon workflow"]
  node_control["Workflow controller<br/>[mothur_control.sh]"]
  node_cutadapt["Read trimming"]
  node_batch["MOTHUR pipeline<br/>[mothur_one.batch]"]
end

subgraph group_outputs["Analysis outputs"]
  node_tables["Abundance and richness tables"]
end

subgraph group_visualization["Krona conversion"]
  node_taxonomy["Taxonomy summary table"]
  node_converter["Krona XML converter"]
  node_xml["Krona XML"]
end

node_user(("Analyst"))
node_fastq["Paired-end FASTQ"]
node_mothur["MOTHUR"]

node_user -->|"runs"| node_control
node_user -->|"provides"| node_fastq
node_control -->|"runs trimming"| node_cutadapt
node_control -->|"launches"| node_batch
node_batch -->|"runs workflow"| node_mothur
node_batch -->|"produces"| node_tables
node_user -.->|"runs"| node_converter
node_taxonomy -->|"provides input"| node_converter
node_converter -->|"writes"| node_xml

click node_control "https://github.com/gszabo-bfx/m_pipeline/blob/main/mothur_control.sh"
click node_batch "https://github.com/gszabo-bfx/m_pipeline/blob/main/mothur_one.batch"
click node_converter "https://github.com/gszabo-bfx/m_pipeline/blob/main/mothur_krona_XML_gy.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_control,node_cutadapt,node_batch toneBlue
class node_tables toneAmber
class node_taxonomy,node_converter,node_xml toneMint
class node_user,node_fastq,node_mothur toneIndigo
```

## Components

### Amplicon workflow

- [Workflow controller](https://github.com/gszabo-bfx/m_pipeline/blob/main/mothur_control.sh): `mothur_control.sh`
- **Read trimming**
- [MOTHUR pipeline](https://github.com/gszabo-bfx/m_pipeline/blob/main/mothur_one.batch): `mothur_one.batch`

### Analysis outputs

- **Abundance and richness tables**

### Krona conversion

- **Taxonomy summary table**
- [Krona XML converter](https://github.com/gszabo-bfx/m_pipeline/blob/main/mothur_krona_XML_gy.py): `mothur_krona_XML_gy.py`
- **Krona XML**

### Other components

- **Analyst**
- **Paired-end FASTQ**
- **MOTHUR**

## Connections

- Analyst → Workflow controller: runs (evidence: `README.md`)
- Analyst → Paired-end FASTQ: provides (evidence: `README.md`)
- Workflow controller → Read trimming: runs trimming (evidence: `README.md`)
- Workflow controller → MOTHUR pipeline: launches (evidence: `README.md`)
- MOTHUR pipeline → MOTHUR: runs workflow (evidence: `README.md`)
- MOTHUR pipeline → Abundance and richness tables: produces (evidence: `README.md`)
- Analyst → Krona XML converter: runs
- Taxonomy summary table → Krona XML converter: provides input (evidence: `mothur_krona_XML_gy.py`)
- Krona XML converter → Krona XML: writes (evidence: `mothur_krona_XML_gy.py`)
