Desktop toolkit for validating DeepLabCut zebrafish CSVs, generating JSON configs, running kinematic calculations, and rendering Plotly graphs through a PyQt UI.
- Python 3.10+
- Git
- System packages for Qt (Windows: included with PyQt5 wheels; macOS/Linux may need Qt libraries)
conda env create -f environment.yml
conda activate cvzebrafish
environment.ymldeclares Python 3.10 and all app/test dependencies; prefer this over ad-hoc pip installs.
python app.pyThe flow walks through CSV/JSON selection, validation, config generation, calculations, and graph viewing.
pytestapp.py # PyQt entry point (adds src/ to sys.path)
assets/
├── images/ # UI icons / art
└── sample_data/ # Example configs/CSVs (paired with data/samples)
data/
└── samples/
├── csv/ # DLC CSV fixtures used by UI/tests
└── jsons/ # BaseConfig + generated config examples
docs/
├── architecture/ # Calculation/graph design notes
├── howtos/ # UI + validation how-tos
└── product/ # Product summary, presentations, meeting minutes
legacy/ # Bruce pipeline for regression comparisons
src/
├── app_platform/paths.py # Writable paths/utilities
├── core/
│ ├── calculations/ # Metrics, driver, exports
│ ├── config/configSetup.py # Config discovery/merging
│ ├── graphs/ # Loader, runner, Plotly plotters (fin/tail, spines)
│ ├── parsing/Parser.py # DLC CSV parser
│ └── validation/ # CSV/JSON validators + config generator
├── data/ # DB ingestion helpers
├── session/ # Session persistence for the UI
└── ui/
├── components/ # Shared widgets (sliders, checks, etc.)
└── scenes/ # Landing, CSV/JSON input, Config Generator, Calculation, Graph Viewer, Verify
tests/
└── unit/ # Core + UI unit tests (pytest)
- Validation: CSV/JSON verifiers with structural and likelihood checks.
- Config generation: UI scene builds configs from detected body parts and saves JSON.
- Calculations: Fin/tail angles, yaw, spine metrics, bout/peak detection, enriched exports.
- Graphs: Modular Plotly plotters (fin-tail timelines, spine snapshots) with Kaleido PNG rendering.
- UI: Multi-scene PyQt flow with session save/load to resume work.
- Legacy parity: Legacy pipeline kept under
legacy/for comparison.
- No dependency lockfile; add
requirements.txt/conda-lockif needed. - No CI or lint/type tooling; add GitHub Actions to run pytest.