# metin1558/axon architecture

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

- Interactive diagram: https://gitdiagram.com/metin1558/axon
- Repository: https://github.com/metin1558/axon

## Overview

Axon is a MEA electrophysiology toolkit that reads NWB recordings and produces activity, synchrony, burst, topology, QC, comparison, reliability, and signal-analysis results. The main workflow is recording analysis through the CLI: load NWB data, compute metrics and QC, then persist and report results. Separate documented branches cover raw-signal processing, sorting, LFP, batch/DANDI access, and the TBL1XR1 hypothesis-testing extension. Some links reflect README-described capabilities; unsampled implementation details are not inferred.

Main entry points: [`v6_3/organoid.py`](https://github.com/metin1558/axon/blob/main/v6_3/organoid.py) (Analysis CLI), [`tbl1xr1/tbl1xr1_pipeline.py`](https://github.com/metin1558/axon/blob/main/tbl1xr1/tbl1xr1_pipeline.py) (Gene Analysis), [`v6_3/organoid_signal.py`](https://github.com/metin1558/axon/blob/main/v6_3/organoid_signal.py) (Signal Processing), [`v6_3/organoid_sorting.py`](https://github.com/metin1558/axon/blob/main/v6_3/organoid_sorting.py) (Sorting Workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_analysis["Core Analysis"]
  node_cli["Analysis CLI<br/>[organoid.py]"]
  node_metrics["Spike Metrics"]
  node_qc["Quality Metrics<br/>[organoid_qc.py]"]
  node_bursts["Network Bursts"]
  node_topology["Graph Analysis<br/>[graph_analiz.py]"]
end

subgraph group_signal["Signal Processing"]
  node_lfp["LFP Analysis<br/>[organoid_lfp.py]"]
  node_signalproc["Signal Processing<br/>[organoid_signal.py]"]
  node_sorting["Sorting Workflow"]
end

subgraph group_results["Results and Comparison"]
  node_compare["Recording Comparison"]
  node_reliability["Session Reliability"]
  node_db[("SQLite Results<br/>[organoid_db.py]")]
  node_reports["Reports<br/>[organoid_output.py]"]
  node_plots["Visualizations<br/>[organoid_plot.py]"]
end

subgraph group_access["Data Access"]
  node_io["NWB Reader<br/>[organoid_io.py]"]
  node_batch["Batch Analysis<br/>[batch_analiz.py]"]
  node_dandi["DANDI Search<br/>[dandi_ara.py]"]
end

subgraph group_tbl["TBL1XR1 Extension"]
  node_tblpipeline["Gene Analysis"]
  node_tblmetrics["Genotype Statistics<br/>[tbl1xr1_metrics.py]"]
  node_tbltypes["Mutation Profiles<br/>[tbl1xr1_types.py]"]
end

node_analyst(("Analyst"))
node_nwb["NWB Recording"]
node_spikeinterface["SpikeInterface<br/>[si_sorting.py]"]

node_analyst -->|"runs analysis"| node_cli
node_cli -->|"analyzes recording"| node_nwb
node_cli -->|"reads NWB"| node_io
node_io -->|"extracts units"| node_nwb
node_cli -->|"computes metrics"| node_metrics
node_cli -->|"computes QC"| node_qc
node_cli -->|"stores results"| node_db
node_cli -->|"writes CSV"| node_reports
node_cli -->|"creates plots"| node_plots
node_analyst -->|"runs batch"| node_batch
node_batch -.->|"uses archive search"| node_dandi
node_analyst -->|"searches datasets"| node_dandi
node_analyst -->|"analyzes LFP"| node_lfp
node_nwb -.->|"provides recording"| node_lfp
node_analyst -->|"processes raw voltage"| node_signalproc
node_signalproc -.->|"feeds spike workflow"| node_sorting
node_sorting -->|"invokes sorting"| node_spikeinterface
node_analyst -->|"compares recordings"| node_compare
node_analyst -->|"assesses reliability"| node_reliability
node_analyst -->|"detects bursts"| node_bursts
node_analyst -->|"analyzes topology"| node_topology
node_tblpipeline -->|"checks quality"| node_qc
node_tblpipeline -->|"computes graph metrics"| node_topology
node_tblpipeline -->|"detects bursts"| node_bursts
node_tblpipeline -->|"compares recordings"| node_compare
node_tblpipeline -->|"tests hypotheses"| node_tblmetrics
node_tblpipeline -->|"uses profiles"| node_tbltypes
node_tblmetrics -->|"reads genotype profile"| node_tbltypes

click node_cli "https://github.com/metin1558/axon/blob/main/v6_3/organoid.py"
click node_io "https://github.com/metin1558/axon/blob/main/v6_3/organoid_io.py"
click node_metrics "https://github.com/metin1558/axon/blob/main/v6_3/organoid_metrics.py"
click node_qc "https://github.com/metin1558/axon/blob/main/v6_3/organoid_qc.py"
click node_bursts "https://github.com/metin1558/axon/blob/main/v6_3/organoid_units_analiz.py"
click node_topology "https://github.com/metin1558/axon/blob/main/axon/graph_analiz.py"
click node_compare "https://github.com/metin1558/axon/blob/main/v6_3/organoid_compare.py"
click node_reliability "https://github.com/metin1558/axon/blob/main/v6_3/organoid_replikasyon.py"
click node_lfp "https://github.com/metin1558/axon/blob/main/v6_3/organoid_lfp.py"
click node_signalproc "https://github.com/metin1558/axon/blob/main/v6_3/organoid_signal.py"
click node_sorting "https://github.com/metin1558/axon/blob/main/v6_3/organoid_sorting.py"
click node_spikeinterface "https://github.com/metin1558/axon/blob/main/v6_3/si_sorting.py"
click node_db "https://github.com/metin1558/axon/blob/main/v6_3/organoid_db.py"
click node_reports "https://github.com/metin1558/axon/blob/main/v6_3/organoid_output.py"
click node_plots "https://github.com/metin1558/axon/blob/main/v6_3/organoid_plot.py"
click node_batch "https://github.com/metin1558/axon/blob/main/axon/batch_analiz.py"
click node_dandi "https://github.com/metin1558/axon/blob/main/axon/dandi_ara.py"
click node_tblpipeline "https://github.com/metin1558/axon/blob/main/tbl1xr1/tbl1xr1_pipeline.py"
click node_tblmetrics "https://github.com/metin1558/axon/blob/main/tbl1xr1/tbl1xr1_metrics.py"
click node_tbltypes "https://github.com/metin1558/axon/blob/main/tbl1xr1/tbl1xr1_types.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_metrics,node_qc,node_bursts,node_topology toneBlue
class node_lfp,node_signalproc,node_sorting toneAmber
class node_compare,node_reliability,node_db,node_reports,node_plots toneMint
class node_io,node_batch,node_dandi toneRose
class node_tblpipeline,node_tblmetrics,node_tbltypes,node_analyst,node_nwb toneIndigo
class node_spikeinterface toneTeal
```

## Components

### Core Analysis

- [Analysis CLI](https://github.com/metin1558/axon/blob/main/v6_3/organoid.py): `v6_3/organoid.py`
- [Spike Metrics](https://github.com/metin1558/axon/blob/main/v6_3/organoid_metrics.py): `v6_3/organoid_metrics.py`
- [Quality Metrics](https://github.com/metin1558/axon/blob/main/v6_3/organoid_qc.py): `v6_3/organoid_qc.py`
- [Network Bursts](https://github.com/metin1558/axon/blob/main/v6_3/organoid_units_analiz.py): `v6_3/organoid_units_analiz.py`
- [Graph Analysis](https://github.com/metin1558/axon/blob/main/axon/graph_analiz.py): `axon/graph_analiz.py`

### Signal Processing

- [LFP Analysis](https://github.com/metin1558/axon/blob/main/v6_3/organoid_lfp.py): `v6_3/organoid_lfp.py`
- [Signal Processing](https://github.com/metin1558/axon/blob/main/v6_3/organoid_signal.py): `v6_3/organoid_signal.py`
- [Sorting Workflow](https://github.com/metin1558/axon/blob/main/v6_3/organoid_sorting.py): `v6_3/organoid_sorting.py`

### Results and Comparison

- [Recording Comparison](https://github.com/metin1558/axon/blob/main/v6_3/organoid_compare.py): `v6_3/organoid_compare.py`
- [Session Reliability](https://github.com/metin1558/axon/blob/main/v6_3/organoid_replikasyon.py): `v6_3/organoid_replikasyon.py`
- [SQLite Results](https://github.com/metin1558/axon/blob/main/v6_3/organoid_db.py): `v6_3/organoid_db.py`
- [Reports](https://github.com/metin1558/axon/blob/main/v6_3/organoid_output.py): `v6_3/organoid_output.py`
- [Visualizations](https://github.com/metin1558/axon/blob/main/v6_3/organoid_plot.py): `v6_3/organoid_plot.py`

### Data Access

- [NWB Reader](https://github.com/metin1558/axon/blob/main/v6_3/organoid_io.py): `v6_3/organoid_io.py`
- [Batch Analysis](https://github.com/metin1558/axon/blob/main/axon/batch_analiz.py): `axon/batch_analiz.py`
- [DANDI Search](https://github.com/metin1558/axon/blob/main/axon/dandi_ara.py): `axon/dandi_ara.py`

### TBL1XR1 Extension

- [Gene Analysis](https://github.com/metin1558/axon/blob/main/tbl1xr1/tbl1xr1_pipeline.py): `tbl1xr1/tbl1xr1_pipeline.py`
- [Genotype Statistics](https://github.com/metin1558/axon/blob/main/tbl1xr1/tbl1xr1_metrics.py): `tbl1xr1/tbl1xr1_metrics.py`
- [Mutation Profiles](https://github.com/metin1558/axon/blob/main/tbl1xr1/tbl1xr1_types.py): `tbl1xr1/tbl1xr1_types.py`

### Other components

- **Analyst**
- **NWB Recording**
- [SpikeInterface](https://github.com/metin1558/axon/blob/main/v6_3/si_sorting.py): `v6_3/si_sorting.py`

## Connections

- Analyst → Analysis CLI: runs analysis (evidence: `README.md`)
- Analysis CLI → NWB Recording: analyzes recording (evidence: `README.md`)
- Analysis CLI → NWB Reader: reads NWB (evidence: `v6_3/organoid.py`)
- NWB Reader → NWB Recording: extracts units (evidence: `v6_3/organoid_io.py`)
- Analysis CLI → Spike Metrics: computes metrics (evidence: `v6_3/organoid.py`)
- Analysis CLI → Quality Metrics: computes QC (evidence: `v6_3/organoid.py`)
- Analysis CLI → SQLite Results: stores results (evidence: `v6_3/organoid.py`)
- Analysis CLI → Reports: writes CSV (evidence: `v6_3/organoid.py`)
- Analysis CLI → Visualizations: creates plots (evidence: `v6_3/organoid.py`)
- Analyst → Batch Analysis: runs batch (evidence: `README.md`)
- Batch Analysis → DANDI Search: uses archive search
- Analyst → DANDI Search: searches datasets (evidence: `README.md`)
- Analyst → LFP Analysis: analyzes LFP (evidence: `README.md`)
- NWB Recording → LFP Analysis: provides recording
- Analyst → Signal Processing: processes raw voltage (evidence: `README.md`)
- Signal Processing → Sorting Workflow: feeds spike workflow
- Sorting Workflow → SpikeInterface: invokes sorting (evidence: `README.md`)
- Analyst → Recording Comparison: compares recordings (evidence: `README.md`)
- Analyst → Session Reliability: assesses reliability (evidence: `README.md`)
- Analyst → Network Bursts: detects bursts (evidence: `README.md`)
- Analyst → Graph Analysis: analyzes topology (evidence: `README.md`)
- Gene Analysis → Quality Metrics: checks quality (evidence: `tbl1xr1/tbl1xr1_pipeline.py`)
- Gene Analysis → Graph Analysis: computes graph metrics (evidence: `tbl1xr1/tbl1xr1_pipeline.py`)
- Gene Analysis → Network Bursts: detects bursts (evidence: `tbl1xr1/tbl1xr1_pipeline.py`)
- Gene Analysis → Recording Comparison: compares recordings (evidence: `tbl1xr1/tbl1xr1_pipeline.py`)
- Gene Analysis → Genotype Statistics: tests hypotheses (evidence: `tbl1xr1/tbl1xr1_pipeline.py`)
- Gene Analysis → Mutation Profiles: uses profiles (evidence: `tbl1xr1/tbl1xr1_pipeline.py`)
- Genotype Statistics → Mutation Profiles: reads genotype profile (evidence: `tbl1xr1/tbl1xr1_metrics.py`)
