# ilmn-mouse-cecal/ribozap architecture

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

- Interactive diagram: https://gitdiagram.com/ilmn-mouse-cecal/ribozap
- Repository: https://github.com/ilmn-mouse-cecal/ribozap

## Overview

RiboZAP is a containerized metatranscriptomics workflow for designing RNaseH probes against rRNA regions in mixed samples, with a separate mode for testing supplied probes. The user supplies a sample sheet and reads; the CLI validates and rewrites sample paths, then launches Nextflow in Docker. The tree and excerpts identify analysis utilities for coverage blocks, sequence similarity, and probe-region handling, but do not show how `main.nf` wires those tools together. Those utilities are therefore shown as capabilities without inferred pipeline connections.

Main entry points: [`src/ribozap/cli.py`](https://github.com/ilmn-mouse-cecal/ribozap/blob/main/src/ribozap/cli.py) (CLI options), [`src/ribozap/docker_launcher.py`](https://github.com/ilmn-mouse-cecal/ribozap/blob/main/src/ribozap/docker_launcher.py) (Docker launcher), [`src/ribozap/rewrite.py`](https://github.com/ilmn-mouse-cecal/ribozap/blob/main/src/ribozap/rewrite.py) (Sample rewrite), [`main.nf`](https://github.com/ilmn-mouse-cecal/ribozap/blob/main/main.nf) (Nextflow workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Inputs and launch"]
  node_cli["CLI options<br/>[cli.py]"]
  node_rewrite["Sample rewrite<br/>[rewrite.py]"]
  node_docker["Docker launcher<br/>[docker_launcher.py]"]
  node_nextflow["Nextflow workflow<br/>[main.nf]"]
end

subgraph group_design["Probe design tools"]
  node_coverage["Read percentages"]
  node_blocks["Coverage blocks<br/>[identify_blocks.py]"]
  node_nearby["Merge nearby blocks"]
  node_tiling["Probe tiling BED"]
  node_blast["Region BLAST<br/>[blast.py]"]
  node_nonredundant["Select regions"]
  node_merge_top["Merge top regions"]
end

subgraph group_validation["Probe validation tools"]
  node_validation["In-silico validation<br/>[test_probes.nf]"]
  node_padding["Pad alignments"]
  node_deplete["Merge deplete regions"]
  node_summaries["Probe summaries"]
end

node_user(("Researcher"))

node_user -->|"configures run"| node_cli
node_cli -->|"rewrites sample sheet"| node_rewrite
node_cli -->|"launches container"| node_docker
node_docker -->|"runs workflow"| node_nextflow
node_user -->|"supplies probes"| node_validation

click node_cli "https://github.com/ilmn-mouse-cecal/ribozap/blob/main/src/ribozap/cli.py"
click node_rewrite "https://github.com/ilmn-mouse-cecal/ribozap/blob/main/src/ribozap/rewrite.py"
click node_docker "https://github.com/ilmn-mouse-cecal/ribozap/blob/main/src/ribozap/docker_launcher.py"
click node_nextflow "https://github.com/ilmn-mouse-cecal/ribozap/blob/main/main.nf"
click node_coverage "https://github.com/ilmn-mouse-cecal/ribozap/blob/main/bin/add_read_percent.py"
click node_blocks "https://github.com/ilmn-mouse-cecal/ribozap/blob/main/bin/identify_blocks.py"
click node_nearby "https://github.com/ilmn-mouse-cecal/ribozap/blob/main/bin/merge_close_by_blocks.py"
click node_tiling "https://github.com/ilmn-mouse-cecal/ribozap/blob/main/bin/generate_tiling_bed.py"
click node_blast "https://github.com/ilmn-mouse-cecal/ribozap/blob/main/bin/blast.py"
click node_nonredundant "https://github.com/ilmn-mouse-cecal/ribozap/blob/main/bin/identify_heatmap_blocks_v2.py"
click node_merge_top "https://github.com/ilmn-mouse-cecal/ribozap/blob/main/bin/merge_overlapping_regions_top.py"
click node_validation "https://github.com/ilmn-mouse-cecal/ribozap/blob/main/subworkflows/test_probes.nf"
click node_padding "https://github.com/ilmn-mouse-cecal/ribozap/blob/main/bin/filter_add_padding.py"
click node_deplete "https://github.com/ilmn-mouse-cecal/ribozap/blob/main/bin/merge_candeplete_regions.py"
click node_summaries "https://github.com/ilmn-mouse-cecal/ribozap/blob/main/bin/summarize_probes.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_cli,node_rewrite,node_docker,node_nextflow toneBlue
class node_coverage,node_blocks,node_nearby,node_tiling,node_blast,node_nonredundant,node_merge_top toneAmber
class node_validation,node_padding,node_deplete,node_summaries toneMint
class node_user toneIndigo
```

## Components

### Inputs and launch

- [CLI options](https://github.com/ilmn-mouse-cecal/ribozap/blob/main/src/ribozap/cli.py): `src/ribozap/cli.py`
- [Sample rewrite](https://github.com/ilmn-mouse-cecal/ribozap/blob/main/src/ribozap/rewrite.py): `src/ribozap/rewrite.py`
- [Docker launcher](https://github.com/ilmn-mouse-cecal/ribozap/blob/main/src/ribozap/docker_launcher.py): `src/ribozap/docker_launcher.py`
- [Nextflow workflow](https://github.com/ilmn-mouse-cecal/ribozap/blob/main/main.nf): `main.nf`

### Probe design tools

- [Read percentages](https://github.com/ilmn-mouse-cecal/ribozap/blob/main/bin/add_read_percent.py): `bin/add_read_percent.py`
- [Coverage blocks](https://github.com/ilmn-mouse-cecal/ribozap/blob/main/bin/identify_blocks.py): `bin/identify_blocks.py`
- [Merge nearby blocks](https://github.com/ilmn-mouse-cecal/ribozap/blob/main/bin/merge_close_by_blocks.py): `bin/merge_close_by_blocks.py`
- [Probe tiling BED](https://github.com/ilmn-mouse-cecal/ribozap/blob/main/bin/generate_tiling_bed.py): `bin/generate_tiling_bed.py`
- [Region BLAST](https://github.com/ilmn-mouse-cecal/ribozap/blob/main/bin/blast.py): `bin/blast.py`
- [Select regions](https://github.com/ilmn-mouse-cecal/ribozap/blob/main/bin/identify_heatmap_blocks_v2.py): `bin/identify_heatmap_blocks_v2.py`
- [Merge top regions](https://github.com/ilmn-mouse-cecal/ribozap/blob/main/bin/merge_overlapping_regions_top.py): `bin/merge_overlapping_regions_top.py`

### Probe validation tools

- [In-silico validation](https://github.com/ilmn-mouse-cecal/ribozap/blob/main/subworkflows/test_probes.nf): `subworkflows/test_probes.nf`
- [Pad alignments](https://github.com/ilmn-mouse-cecal/ribozap/blob/main/bin/filter_add_padding.py): `bin/filter_add_padding.py`
- [Merge deplete regions](https://github.com/ilmn-mouse-cecal/ribozap/blob/main/bin/merge_candeplete_regions.py): `bin/merge_candeplete_regions.py`
- [Probe summaries](https://github.com/ilmn-mouse-cecal/ribozap/blob/main/bin/summarize_probes.py): `bin/summarize_probes.py`

### Other components

- **Researcher**

## Connections

- Researcher → CLI options: configures run (evidence: `README.md`)
- CLI options → Sample rewrite: rewrites sample sheet (evidence: `src/ribozap/cli.py`)
- CLI options → Docker launcher: launches container (evidence: `src/ribozap/cli.py`)
- Docker launcher → Nextflow workflow: runs workflow
- Researcher → In-silico validation: supplies probes (evidence: `README.md`)
