How aminforqani/eeg-analysis-pipeline works
This is a config-driven rodent EEG analysis application. A user invokes the CLI with recordings, optional group metadata, and a configuration; the pipeline loads recordings, filters and epochs them, rejects artefacts, extracts per-animal spectral features, optionally compares groups, and writes figures and a report. A separate simulator generates demo recordings with a planted effect. The README documents capabilities such as EDF input, QC exclusions, animal-level inference, and FDR correction; edges follow the sampled pipeline and explicit README workflow, not unsampled internals.
Main entry points: pipeline.py Pipeline runner · config.py Run configuration · run_pipeline.py Pipeline CLI · simulate.py EEG simulator
Components 15
Run orchestration
- Pipeline CLI
scripts/run_pipeline.py - Run configuration
src/eegpipe/config.py - Pipeline runner
src/eegpipe/pipeline.py
Signal processing
- Recording loaders
src/eegpipe/io.py - Filter and QC
src/eegpipe/preprocess.py
Feature analysis
- Spectral features
src/eegpipe/features.py - Group statistics
src/eegpipe/stats.py
Results and reporting
- Figures and report
src/eegpipe/report.py
Demo data
- Demo generator CLI
scripts/make_demo_data.py - EEG simulator
src/eegpipe/simulate.py
Other components
- User
- EEG recordings
- Group metadata
- Analysis outputs
- Demo recordings and metadata
Connections 18
- User → Pipeline CLI: invokes
README.md - Pipeline CLI → Run configuration: loads
scripts/run_pipeline.py - Pipeline CLI → Pipeline runner: runs
scripts/run_pipeline.py - EEG recordings → Pipeline runner: provides recordings
README.md - Group metadata → Pipeline runner: provides labels
README.md - Pipeline runner → Recording loaders: loads
src/eegpipe/pipeline.py - Pipeline runner → Filter and QC: preprocesses
src/eegpipe/pipeline.py - Pipeline runner → Spectral features: extracts
src/eegpipe/pipeline.py - Pipeline runner → Group statistics: compares groups
src/eegpipe/pipeline.py - Pipeline runner → Figures and report: generates
src/eegpipe/pipeline.py - Run configuration → Pipeline runner: configures
scripts/run_pipeline.py - Run configuration → Filter and QC: sets thresholds
src/eegpipe/preprocess.py - Run configuration → Spectral features: sets bands
src/eegpipe/features.py - Pipeline runner → Analysis outputs: writes results
src/eegpipe/pipeline.py - User → Demo generator CLI: requests demo
README.md - Demo generator CLI → EEG simulator: generates data
scripts/make_demo_data.py - EEG simulator → Recording loaders: creates recordings
src/eegpipe/simulate.py - EEG simulator → Demo recordings and metadata: writes dataset
src/eegpipe/simulate.py